[DRBD-user] [PATCH][drbd-0.7.6] check for proc-fs entry on rc script shutdown

Roberto Nibali ratz at tac.ch
Fri Dec 17 16:54:46 CET 2004

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


Hello,

The currect rc script /etc/init.d/drbd does not check if the drbd kernel module 
is loaded. This wouldn't be a problem normally but in our distribution we need 
to have a certain noiseless output and without the following patch I get a lot 
of warnings with the default config file installed when drbdadm down all is callled.

Please consider applying this chunk (could be whitespace mangled):

--- drbd.orig   2004-12-17 09:53:12 +0100
+++ drbd        2004-12-17 09:55:39 +0100
@@ -90,10 +90,14 @@
         ;;
      stop)
         echo -n "Stopping all DRBD resources"
-       $DRBDADM down all
-       $RMMOD drbd
-       [ -f /var/lock/subsys/drbd ] && rm /var/lock/subsys/drbd
-       echo "."
+       if [ -e $PROC_DRBD ]; then
+           $DRBDADM down all
+           $RMMOD drbd
+           [ -f /var/lock/subsys/drbd ] && rm /var/lock/subsys/drbd
+           echo "."
+       else
+           echo " --> already down."
+       fi
         ;;
      status)
         # NEEDS to be heartbeat friendly...

Best regards,
Roberto Nibali, ratz
-- 
-------------------------------------------------------------
addr://Rathausgasse 31, CH-5001 Aarau  tel://++41 62 823 9355
http://www.terreactive.com             fax://++41 62 823 9356
-------------------------------------------------------------
terreActive AG                       Wir sichern Ihren Erfolg
-------------------------------------------------------------



More information about the drbd-user mailing list