diff options
author | Erich Eckner <git@eckner.net> | 2017-03-24 20:18:54 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2017-03-24 20:18:54 +0100 |
commit | a8d723559a90dc60857e66f957d4679d3303d49e (patch) | |
tree | 3f4a0885e51a6f9214622ef8199604d9733f9b02 | |
parent | 167cb69386d9c6dec1c283e0bbc04894ad8e641e (diff) | |
download | cryptfs-daemon-a8d723559a90dc60857e66f957d4679d3303d49e.tar.xz |
now waits until host is pingable
-rw-r--r-- | cryptfs.in | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -48,6 +48,17 @@ start) sleep 1 maxWait=$[${maxWait}-1] done + host="$( + echo "${fsTab}" | \ + grep -m1 "^\(ssh\|ftp\)fs#\S*\s\+${neededKeyFs}\s" | \ + sed "s>^\(ssh\|ftp\)fs#\([^ :@]*@\)\?\([^ :@]\+\)\(:\S\+\)\?\s\+${neededKeyFs}\s.*$>\3>" + )" + while [ ${maxWait} -gt 0 ] && ! /bin/ping -c1 ${host} &> /dev/null + do + >&2 echo -ne "," + sleep 1 + maxWait=$[${maxWait}-1] + done fi mount ${neededKeyFs} || exit $? fi |