summaryrefslogtreecommitdiff
path: root/rc
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2020-12-23 01:41:52 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2020-12-23 01:41:52 +0100
commitc8c5499d7fc4f7b59a12c0ae90eb4e516783f1f8 (patch)
tree15d4142c65ad2d49988de2a825d222efb56180c5 /rc
parentc7fd8fe47a96d447d8ea327f14314fc1f55f377f (diff)
downloadplan9front-c8c5499d7fc4f7b59a12c0ae90eb4e516783f1f8.tar.xz
start, stop: avoid null list in concatenation witout arguments, use $user
Diffstat (limited to 'rc')
-rwxr-xr-xrc/bin/start3
-rwxr-xr-xrc/bin/stop3
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'