diff options
author | Tobias Brunner <tobias@strongswan.org> | 2013-03-19 15:25:38 +0100 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2013-03-19 15:25:38 +0100 |
commit | 7f0f185bedf6b67ef5dac3d74e7e4f875d95fce2 (patch) | |
tree | 3dc37f41df2b66b0c50c602b3f677cae9861b446 /testing/hosts/default/usr | |
parent | deafaf51f1c768ce1dbdc7ff7ac91f7fb4ea5e21 (diff) | |
parent | 7cc6fa1a983a668bd884e08f0e453637d4702cbe (diff) | |
download | strongswan-7f0f185bedf6b67ef5dac3d74e7e4f875d95fce2.tar.bz2 strongswan-7f0f185bedf6b67ef5dac3d74e7e4f875d95fce2.tar.xz |
Merge branch 'tkm'
This adds charon-tkm a special build of the charon IKEv2 daemon that delegates
security critical operations to a separate process (TKM = Trusted Key Manager).
Diffstat (limited to 'testing/hosts/default/usr')
-rwxr-xr-x | testing/hosts/default/usr/local/bin/expect-file | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/testing/hosts/default/usr/local/bin/expect-file b/testing/hosts/default/usr/local/bin/expect-file new file mode 100755 index 000000000..6921b6638 --- /dev/null +++ b/testing/hosts/default/usr/local/bin/expect-file @@ -0,0 +1,29 @@ +#!/bin/bash +# +# Wait until a given file appears +# +# Params: +# $1 - filename +# $2 - maximum time to wait in seconds, default is 5 seconds + +if [[ $# -lt 1 || $# -gt 2 ]] +then + echo "invalid arguments" + exit 1 +fi + +secs=$2 +[ ! $secs ] && secs=5 + +let steps=$secs*10 +for i in `seq 1 $steps` +do + # -f does not work for special files (e.g. UNIX domain sockets), use ls + # instead + ls $1 >/dev/null 2>&1 + [ $? -eq 0 ] && exit 0 + sleep 0.1 +done + +echo "File '$1' not available after $secs second(s)" +exit 1 |