diff options
author | Yves-Alexis Perez <corsac@debian.org> | 2013-10-17 21:23:38 +0200 |
---|---|---|
committer | Yves-Alexis Perez <corsac@debian.org> | 2013-10-17 21:23:38 +0200 |
commit | 9d37ad77ef660b92ea51b69d74e14f931d2a04e2 (patch) | |
tree | d6bbb4a5fed1959f8675df9ee7c03713b543fcc9 /testing/scripts/restore-defaults | |
parent | 104f57d4b0fb6d7547d6898352eaa5fb4b222010 (diff) | |
parent | e5ee4e7fcdd58b7d86bf1b458da2c63e8e19627b (diff) | |
download | vyos-strongswan-9d37ad77ef660b92ea51b69d74e14f931d2a04e2.tar.gz vyos-strongswan-9d37ad77ef660b92ea51b69d74e14f931d2a04e2.zip |
Merge tag 'v5.1.0-1' into sid
tag strongSwan 5.1.0-1
Diffstat (limited to 'testing/scripts/restore-defaults')
-rwxr-xr-x | testing/scripts/restore-defaults | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/testing/scripts/restore-defaults b/testing/scripts/restore-defaults index 64cc0262e..173baf820 100755 --- a/testing/scripts/restore-defaults +++ b/testing/scripts/restore-defaults @@ -14,32 +14,21 @@ # 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 +SSHCONF="-F $DIR/../ssh_config" 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 +36,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 |