[DRBD-cvs] scripts by phil; Merged most of David Krovich's work on t...
drbd-user@lists.linbit.com
drbd-user@lists.linbit.com
Fri, 6 Feb 2004 10:18:04 +0100 (CET)
DRBD CVS committal
Author : phil
Project : drbd
Module : scripts
Dir : drbd/scripts
Modified Files:
drbd
Log Message:
Merged most of David Krovich's work on the debian build system
===================================================================
RCS file: /var/lib/cvs/drbd/drbd/scripts/drbd,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -3 -r1.51 -r1.52
--- drbd 22 Jan 2004 14:32:51 -0000 1.51
+++ drbd 6 Feb 2004 09:17:59 -0000 1.52
@@ -62,7 +62,7 @@
#
# shouldn't there be more descriptive comments? ;)
#
-CVSID='$Id: drbd,v 1.51 2004/01/22 14:32:51 lars Exp $'
+CVSID='$Id: drbd,v 1.52 2004/02/06 09:17:59 phil Exp $'
CONTACT='Lars Ellenberg <l.g.e@web.de>, drbd-user@lists.linbit.com'
##################################################}}}1
@@ -867,6 +867,10 @@
debug 0 "sorry, this is bash, so parsing may take a while"
local PARSE=""
local TOKEN='' TOKEN_LINE='' TOKEN_LINE_NR=0
+ if [ ! -f "$CONFIG" ]; then
+ echo "drbd not configured - $CONFIG is missing";
+ exit -1;
+ fi
while get_token; do
case "$TOKEN" in
@@ -2143,6 +2147,21 @@
;;
restart) # {{{1
+ export _SCRIPT_RECURSION=yes
+ $DRBD \
+ ${OPT_CONFIG:+--config=$OPT_CONFIG} \
+ ${OPT_DUMMY:+--dummy} \
+ ${OPT_DRY_RUN:+--dry-run} \
+ $RESOURCE stop \
+ && \
+ $DRBD \
+ ${OPT_CONFIG:+--config=$OPT_CONFIG} \
+ ${OPT_DUMMY:+--dummy} \
+ ${OPT_DRY_RUN:+--dry-run} \
+ $RESOURCE start
+ ;;
+
+ force-reload) # {{{1
export _SCRIPT_RECURSION=yes
$DRBD \
${OPT_CONFIG:+--config=$OPT_CONFIG} \