]> git.pld-linux.org Git - packages/util-linux.git/commitdiff
- script "a little" rewriten in PLD-style
authorPaweł Gołaszewski <blues@pld-linux.org>
Sat, 30 Jun 2001 14:51:14 +0000 (14:51 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    rawdevices-init -> 1.3

rawdevices-init

index db93a40be95caf368f6ea69f55cd3fa0cc46ebc7..cf6fc472b456dace1cf706e9045c2c8f4bd8ae89 100755 (executable)
@@ -51,17 +51,30 @@ function assign_raw()
 # See how we were called.
 case "$1" in
   start)
-        # Assign devices
-        echo $"Assigning devices: "
-        assign_raw
-        echo $"done"
+       if [ ! -f /var/lock/subsys/rawdevices ]; then
+               msg_starting rawdevices
+               # Assign devices
+               echo $"Assigning devices: "
+               assign_raw
+               echo $"done"
+               RETVAL=$?
+                $RETVAL -eq 0 ] && touch /var/lock/subsys/rawdevices
+       else
+               msg_Already_Running rawdevices
+       fi
         ;;
   stop)
-        # No action to be taken here
-       echo $"No action can be taken"
+       if [ -f /var/lock/subsys/rawdevices ]; then
+               msg_stopping rawdevices
+               rm -f /var/lock/subsys/rawdevices >/dev/null 2>&1
+       else
+               msg_Not_Running rawdevices
+               exit 1
+       fi
         ;;
 
   status)
+       status rawdevices
         ID=`id -u`
         if [ $ID -eq 0 ]; then 
           raw -qa
This page took 0.064768 seconds and 4 git commands to generate.