git: 9front

Download patch

ref: 8f3f3fc37c303ffbc1fce42635c2738d70abac7d
parent: 1f97b619a299431790ae73c420d212877a4f9036
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Tue Dec 22 20:41:52 EST 2020

start, stop: avoid null list in concatenation witout arguments, use $user

--- a/rc/bin/start
+++ b/rc/bin/start
@@ -1,5 +1,4 @@
 #!/bin/rc
-U=`{cat /dev/user}
-ps | sed -n '/^'$U' .*Stopped.* '$1'$/s%[^ ]*  *%~>/proc/%
+~ $#* 0 || ps | sed -n '/^'$user' .*Stopped.* '$1'$/s%[^ ]*  *%~>/proc/%
 s%  *.*%/ctl%
 s%~%echo start%p'
--- a/rc/bin/stop
+++ b/rc/bin/stop
@@ -1,5 +1,4 @@
 #!/bin/rc
-U=`{cat /dev/user}
-ps | sed -n '/^'$U' .* '$1'$/s%[^ ]*  *%~>/proc/%
+~ $#* 0 || ps | sed -n '/^'$user' .* '$1'$/s%[^ ]*  *%~>/proc/%
 s%  *.*%/ctl%
 s%~%echo stop%p'
--