[DRBD-cvs] testing by lars; * my replacement for set -e hack did no...
drbd-user@lists.linbit.com
drbd-user@lists.linbit.com
Tue, 1 Jun 2004 16:27:35 +0200 (CEST)
DRBD CVS committal
Author : lars
Project : drbd
Module : testing
Dir : drbd/testing/CTH
Modified Files:
Tag: rel-0_7-branch
CTH_bash.sh functions.sh
Log Message:
* my replacement for set -e hack did not work out.
* don't use reattach anymore, it will die.
===================================================================
RCS file: /var/lib/cvs/drbd/drbd/testing/CTH/Attic/CTH_bash.sh,v
retrieving revision 1.1.2.6
retrieving revision 1.1.2.7
diff -u -3 -r1.1.2.6 -r1.1.2.7
--- CTH_bash.sh 1 Jun 2004 07:01:56 -0000 1.1.2.6
+++ CTH_bash.sh 1 Jun 2004 14:27:30 -0000 1.1.2.7
@@ -1,5 +1,5 @@
#!/usr/bin/env - /bin/bash
-# $Id: CTH_bash.sh,v 1.1.2.6 2004/06/01 07:01:56 lars Exp $
+# $Id: CTH_bash.sh,v 1.1.2.7 2004/06/01 14:27:30 lars Exp $
# example for scripting failures
#
@@ -45,8 +45,7 @@
#
___
- set +o errexit # disable this again, but do something similar, and
- trap 'ex=$?; echo "exit_code: $ex"; [[ $FUNCNAME ]] && return $ex' ERR # show exit codes != 0
+ trap 'ex=$?; echo "exit_code: $ex"' ERR # show exit codes != 0
if [[ -e $CASE ]] ; then
echo "now run CASE=$CASE"
source $CASE || return
===================================================================
RCS file: /var/lib/cvs/drbd/drbd/testing/CTH/Attic/functions.sh,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -u -3 -r1.1.2.4 -r1.1.2.5
--- functions.sh 1 Jun 2004 07:01:56 -0000 1.1.2.4
+++ functions.sh 1 Jun 2004 14:27:30 -0000 1.1.2.5
@@ -1,6 +1,6 @@
#!/bin/bash
# vim: set foldmethod=marker nofoldenable :
-# $Id: functions.sh,v 1.1.2.4 2004/06/01 07:01:56 lars Exp $
+# $Id: functions.sh,v 1.1.2.5 2004/06/01 14:27:30 lars Exp $
#DEBUG="-vx"
#DEBUG="-v"
@@ -313,7 +313,10 @@
: ${minor:?unknown minor number}
: ${name:?unknown resource name}
if drbdsetup /dev/nb$minor show | grep -q "^Lower device:.*null"; then
- drbdadm attach $name
+ # NO. drbdadm attach $name
+ # But rather:
+ drbdadm down $name
+ drbdadm up $name
echo "reattached $name on $HOSTNAME"
fi
}