ref: c8c5499d7fc4f7b59a12c0ae90eb4e516783f1f8
parent: c7fd8fe47a96d447d8ea327f14314fc1f55f377f
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'