]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
testing: Use a single scp command to restore defaults
authorTobias Brunner <tobias@strongswan.org>
Mon, 2 Dec 2024 18:18:56 +0000 (19:18 +0100)
committerTobias Brunner <tobias@strongswan.org>
Tue, 3 Dec 2024 07:43:45 +0000 (08:43 +0100)
This is a bit faster than two sequential calls.

testing/scripts/restore-defaults

index 0ef08f266fb20dde5930d82e71e89649b4a715ef..a88f3eb8915f72bbb31a7e4e74f2df0356c710b2 100755 (executable)
@@ -35,7 +35,6 @@ then
        for host in `ls $TESTSDIR/${testname}/hosts`
        do
                eval HOSTLOGIN="root@`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $1 }' | awk '{ print $1 }'`"
-               scp $SSHCONF -r $HOSTCONFIGDIR/default/etc $HOSTLOGIN:/ > /dev/null 2>&1
-               scp $SSHCONF -r $HOSTCONFIGDIR/${host}/etc $HOSTLOGIN:/ > /dev/null 2>&1
+               scp $SSHCONF -r $HOSTCONFIGDIR/default/etc $HOSTCONFIGDIR/${host}/etc $HOSTLOGIN:/ >/dev/null 2>&1
        done
 fi