Also restore 'default' host configuration
This commit is contained in:
committed by
Tobias Brunner
parent
58e0b386ea
commit
482d3ec9ff
@@ -16,10 +16,6 @@
|
|||||||
|
|
||||||
. $PWD/scripts/function.sh
|
. $PWD/scripts/function.sh
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
# load-testconfig requires a testname as an argument
|
|
||||||
#
|
|
||||||
|
|
||||||
testname=$1
|
testname=$1
|
||||||
|
|
||||||
HOSTCONFIGDIR=$PWD/hosts
|
HOSTCONFIGDIR=$PWD/hosts
|
||||||
@@ -29,11 +25,7 @@ TESTSDIR=$BUILDDIR/tests
|
|||||||
[ -d $TESTSDIR/$testname ] || die "Test '$testname' not found"
|
[ -d $TESTSDIR/$testname ] || die "Test '$testname' not found"
|
||||||
[ -f $TESTSDIR/$testname/test.conf ] || die "File 'test.conf' is missing"
|
[ -f $TESTSDIR/$testname/test.conf ] || die "File 'test.conf' is missing"
|
||||||
|
|
||||||
source $TESTSDIR/$testname/test.conf
|
. $TESTSDIR/$testname/test.conf
|
||||||
|
|
||||||
##########################################################################
|
|
||||||
# copy default host config back if necessary
|
|
||||||
#
|
|
||||||
|
|
||||||
if [ -d $TESTSDIR/${testname}/hosts ]
|
if [ -d $TESTSDIR/${testname}/hosts ]
|
||||||
then
|
then
|
||||||
@@ -41,5 +33,6 @@ then
|
|||||||
do
|
do
|
||||||
eval HOSTLOGIN="root@`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $1 }' | awk '{ print $1 }'`"
|
eval HOSTLOGIN="root@`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $1 }' | awk '{ print $1 }'`"
|
||||||
scp $SSHCONF -r $HOSTCONFIGDIR/${host}/etc $HOSTLOGIN:/ > /dev/null 2>&1
|
scp $SSHCONF -r $HOSTCONFIGDIR/${host}/etc $HOSTLOGIN:/ > /dev/null 2>&1
|
||||||
|
scp $SSHCONF -r $HOSTCONFIGDIR/default/etc $HOSTLOGIN:/ > /dev/null 2>&1
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user