diff options
author | Yves-Alexis Perez <corsac@debian.org> | 2013-02-07 13:27:27 +0100 |
---|---|---|
committer | Yves-Alexis Perez <corsac@debian.org> | 2013-02-07 13:27:27 +0100 |
commit | 7585facf05d927eb6df3929ce09ed5e60d905437 (patch) | |
tree | e4d14b4dc180db20356b6b01ce0112f3a2d7897e /testing/scripts/restore-defaults | |
parent | c1343b3278cdf99533b7902744d15969f9d6fdc1 (diff) | |
download | vyos-strongswan-7585facf05d927eb6df3929ce09ed5e60d905437.tar.gz vyos-strongswan-7585facf05d927eb6df3929ce09ed5e60d905437.zip |
Imported Upstream version 5.0.2
Diffstat (limited to 'testing/scripts/restore-defaults')
-rwxr-xr-x | testing/scripts/restore-defaults | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/testing/scripts/restore-defaults b/testing/scripts/restore-defaults index 64cc0262e..953548a1b 100755 --- a/testing/scripts/restore-defaults +++ b/testing/scripts/restore-defaults @@ -14,32 +14,20 @@ # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # for more details. -DIR=`dirname $0` - -source $DIR/function.sh - -[ -f $DIR/../testing.conf ] || die "Configuration file 'testing.conf' not found" - -source $DIR/../testing.conf - -########################################################################## -# load-testconfig requires a testname as an argument -# +DIR=$(dirname `readlink -f $0`) +. $DIR/../testing.conf +. $DIR/function.sh testname=$1 -HOSTCONFIGDIR=$BUILDDIR/hosts +HOSTCONFIGDIR=$DIR/../hosts TESTSDIR=$BUILDDIR/tests [ -d $TESTSDIR ] || die "Directory '$TESTSDIR' not found" [ -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 @@ -47,5 +35,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 + scp $SSHCONF -r $HOSTCONFIGDIR/default/etc $HOSTLOGIN:/ > /dev/null 2>&1 done fi |