diff options
author | Erich Eckner <git@eckner.net> | 2021-02-17 09:34:44 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2021-02-17 09:34:44 +0100 |
commit | 5eec07626b0d818455548148f50647db6a39393c (patch) | |
tree | 774130140b26e8588d3c525d6bcb62e607d9eae2 | |
parent | cfed84826acdf6aafb35ee0de7acb29f07834898 (diff) | |
download | cryptfs-daemon-5eec07626b0d818455548148f50647db6a39393c.tar.xz |
cryptfs.bin.in: add hard timeout to ping - it hangs on the banpi
infinite loop: {
getrandom(0xbe8c7800, 4, GRND_NONBLOCK) = -1 ENOSYS (Function not implemented)
clock_gettime(CLOCK_REALTIME, {tv_sec=1613550946, tv_nsec=963097902}) = 0
getpid() = 3209
getuid32() = 0
}
-rw-r--r-- | cryptfs.bin.in | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cryptfs.bin.in b/cryptfs.bin.in index d7ba868..8465c70 100644 --- a/cryptfs.bin.in +++ b/cryptfs.bin.in @@ -209,8 +209,8 @@ do_mount() { ) host=$(extract_ssh_host "${host}") while [ $(date +%s) -lt ${max_wait} ] && \ - ! #PING6# -c1 "${host}" >/dev/null 2>&1 && \ - ! ping -c1 "${host}" >/dev/null 2>&1; do + ! timeout 1 #PING6# -c1 "${host}" >/dev/null 2>&1 && \ + ! timeout 1 ping -c1 "${host}" >/dev/null 2>&1; do >&2 printf ',' sleep 1 done |