Author: glen                         Date: Sun Jan 28 12:27:11 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- output somekind of status as this service is not daemon

---- Files affected:
SOURCES:
   util-linux-blockdev.init (1.12 -> 1.13) 

---- Diffs:

================================================================
Index: SOURCES/util-linux-blockdev.init
diff -u SOURCES/util-linux-blockdev.init:1.12 
SOURCES/util-linux-blockdev.init:1.13
--- SOURCES/util-linux-blockdev.init:1.12       Sun Jan 28 13:19:50 2007
+++ SOURCES/util-linux-blockdev.init    Sun Jan 28 13:27:06 2007
@@ -80,8 +80,33 @@
        start
        ;;
   status)
-       status blockdev
-       exit $?
+       if [ "$blockdevs" ]; then
+               echo "blockdev configured for:"
+               for var in $blockdevs; do
+                       drive=${var#BLOCKDEV_}
+                       echo -n "- $drive: "
+
+                       if [ -d "/sys/block/${drive}" -a -e "/dev/${drive}" ]; 
then
+                               realdrive="/dev/${drive}"
+                       elif [ -e "/dev/mapper/${drive}" ]; then
+                               realdrive="/dev/mapper/${drive}"
+                       elif drive=$(echo $drive | tr _ -) && [ -d 
"/sys/block/${drive}" -a -e "/dev/${drive}" ]; then
+                               realdrive="/dev/${drive}"
+                       elif [ -e "/dev/mapper/${drive}" ]; then
+                               realdrive="/dev/mapper/${drive}"
+                       fi
+
+                       eval PARAMS=\$$var
+                       if [ -n "$realdrive" ]; then
+                               echo "${PARAMS}; device=$realdrive"
+                       else
+                               echo "${PARAMS}; device not present"
+                       fi
+
+               done
+       else
+               echo "no devices configured for blockdev"
+       fi
        ;;
   *)
        msg_usage "$0 {start|stop|restart|force-reload|status}"
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/SOURCES/util-linux-blockdev.init?r1=1.12&r2=1.13&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to