strongswan.org
Wiki/Project Management
Downloads
Gitweb
projects
/
strongswan.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
58e0b38
)
Also restore 'default' host configuration
author
Reto Buerki
<reet@codelabs.ch>
Fri, 14 Dec 2012 10:38:52 +0000
(11:38 +0100)
committer
Tobias Brunner
<tobias@strongswan.org>
Thu, 17 Jan 2013 15:54:58 +0000
(16:54 +0100)
testing/scripts/restore-defaults
patch
|
blob
|
history
diff --git
a/testing/scripts/restore-defaults
b/testing/scripts/restore-defaults
index
16714db
..
88d4f87
100755
(executable)
--- a/
testing/scripts/restore-defaults
+++ b/
testing/scripts/restore-defaults
@@
-16,10
+16,6
@@
. $PWD/scripts/function.sh
. $PWD/scripts/function.sh
-##########################################################################
-# load-testconfig requires a testname as an argument
-#
-
testname=$1
HOSTCONFIGDIR=$PWD/hosts
testname=$1
HOSTCONFIGDIR=$PWD/hosts
@@
-29,11
+25,7
@@
TESTSDIR=$BUILDDIR/tests
[ -d $TESTSDIR/$testname ] || die "Test '$testname' not found"
[ -f $TESTSDIR/$testname/test.conf ] || die "File 'test.conf' is missing"
[ -d $TESTSDIR/$testname ] || die "Test '$testname' not found"
[ -f $TESTSDIR/$testname/test.conf ] || die "File 'test.conf' is missing"
-source $TESTSDIR/$testname/test.conf
-
-##########################################################################
-# copy default host config back if necessary
-#
+. $TESTSDIR/$testname/test.conf
if [ -d $TESTSDIR/${testname}/hosts ]
then
if [ -d $TESTSDIR/${testname}/hosts ]
then
@@
-41,5
+33,6
@@
then
do
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
do
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/default/etc $HOSTLOGIN:/ > /dev/null 2>&1
done
fi
done
fi