]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
removed fail's if mbmon cannot start
authorarne_f <arne_f@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Sun, 10 Feb 2008 11:33:29 +0000 (11:33 +0000)
committerarne_f <arne_f@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Sun, 10 Feb 2008 11:33:29 +0000 (11:33 +0000)
changed the output of smartenables if devices not support smart

git-svn-id: http://svn.ipfire.org/svn/ipfire/branches/2.1/trunk@1194 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8

src/initscripts/init.d/collectd
src/initscripts/init.d/smartenabler

index e6ee268452d3311bceb1e4639a085f68f3aab386..db72e8455f3d4e1c1d1d9bec4fa8b15ffb4adba9 100644 (file)
@@ -13,13 +13,17 @@ case "$1" in
 #              for disk in `kudzu -qps -c HD | grep device: | cut -d" " -f2 | sort | uniq`; do boot_mesg "Bringing up hddtemp daemon for $disk ..."; /usr/sbin/hddtemp $disk -d -l localhost; evaluate_retval; done
                boot_mesg "Bringing up mbmon daemon..."
                /usr/bin/mbmon -P 411 -r
-               evaluate_retval
+               if [ ${?} = 0 ]; then
+                   echo_ok;
+               fi
                ;;
 
        stop)
-               boot_mesg "Stopping mbmon daemon..."
-               killproc /usr/bin/mbmon
-               evaluate_retval
+#              boot_mesg "Stopping mbmon daemon..."
+#              killproc /usr/bin/mbmon
+#              if [ ${?} = 0 ]; then
+#                  echo_ok;
+#              fi
 #              boot_mesg "Stopping hddtemp daemon..."
 #              killproc /usr/sbin/hddtemp
 #              evaluate_retval
index 1bf071d1e4797825e985bc8103c711f85008ead4..19403c8215c255ad357e5689a3c760b70d96714b 100644 (file)
@@ -6,11 +6,17 @@
 
 case "$1" in
        start)
+               boot_mesg -n "Enabling S.M.A.R.T.: ";
                for disk in `kudzu -qps -c HD | grep device: | cut -d" " -f2 | sort | uniq`; do 
-                 boot_mesg "Enabling S.M.A.R.T. for $disk ...";
-                 /usr/sbin/smartctl -d ata --smart=on /dev/$disk > /dev/nul;
-                 evaluate_retval;
+                   /usr/sbin/smartctl -d ata --smart=on /dev/$disk > /dev/nul;
+                   if [ ${?} = 0 ]; then 
+                       boot_mesg -n "$SUCCESS$disk$NORMAL ";
+                   else
+                       boot_mesg -n "$WARNING$disk$NORMAL ";
+                   fi
                done
+               boot_mesg;
+               echo_ok;
                ;;
 
        *)