diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2020-12-23 01:41:52 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2020-12-23 01:41:52 +0100 |
commit | c8c5499d7fc4f7b59a12c0ae90eb4e516783f1f8 (patch) | |
tree | 15d4142c65ad2d49988de2a825d222efb56180c5 /rc | |
parent | c7fd8fe47a96d447d8ea327f14314fc1f55f377f (diff) | |
download | plan9front-c8c5499d7fc4f7b59a12c0ae90eb4e516783f1f8.tar.xz |
start, stop: avoid null list in concatenation witout arguments, use $user
Diffstat (limited to 'rc')
-rwxr-xr-x | rc/bin/start | 3 | ||||
-rwxr-xr-x | rc/bin/stop | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/rc/bin/start b/rc/bin/start index f8d423c6e..e9913c1cf 100755 --- 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' diff --git a/rc/bin/stop b/rc/bin/stop index c7f9f9a51..996471bcc 100755 --- 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' |