X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=rawdevices.init;h=739ec4c4bd032c891ddcf876dd6c629fbc553763;hb=a38c175f8a4fb2a004f7b29eddc40632a128a09c;hp=b05680665c4704f9b4960561f863a6d2df7b6689;hpb=b06f504632ef6b1ae6422288730de3f0d4507f19;p=packages%2Futil-linux.git diff --git a/rawdevices.init b/rawdevices.init index b056806..739ec4c 100644 --- a/rawdevices.init +++ b/rawdevices.init @@ -50,10 +50,7 @@ function assign_raw() done } - -# See how we were called. -case "$1" in - start|reload) +start() { if [ ! -f /var/lock/subsys/rawdevices ]; then msg_starting rawdevices ok @@ -62,8 +59,9 @@ case "$1" in else msg_already_running rawdevices fi - ;; - stop) +} + +stop() { if [ -f /var/lock/subsys/rawdevices ]; then msg_stopping rawdevices busy @@ -72,10 +70,19 @@ case "$1" in else msg_not_running rawdevices fi +} + +# See how we were called. +case "$1" in + start|reload) + start + ;; + stop) + stop ;; status) - ID=`id -u` - if [ $ID -eq 0 ]; then + id=`id -u` + if [ "$id" -eq 0 ]; then raw -qa else # don't remove the space at the end!!! @@ -83,8 +90,8 @@ case "$1" in fi ;; restart|force-reload) - $0 stop - $0 start + stop + start ;; *)