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

Philipp Reisner philipp.reisner at linbit.com
Wed Dec 22 14:05:06 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.


On Friday 17 December 2004 16:54, Roberto Nibali wrote:
> 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):
>

Well, you patch would apply to 0.7.5 . Since 0.7.6 it
looks like this:

    stop)
 echo -n "Stopping all DRBD resources"
 if [ -e $PROC_DRBD ] ; then
  $DRBDADM down all
  $RMMOD drbd
 fi
 [ -f /var/lock/subsys/drbd ] && rm /var/lock/subsys/drbd
 echo "."
 ;;

...which makes the stop command idempotent.

-Philipp
-- 
: Dipl-Ing Philipp Reisner                      Tel +43-1-8178292-50 :
: LINBIT Information Technologies GmbH          Fax +43-1-8178292-82 :
: Schönbrunnerstr 244, 1120 Vienna, Austria    http://www.linbit.com :



More information about the drbd-user mailing list