From 5eec07626b0d818455548148f50647db6a39393c Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 17 Feb 2021 09:34:44 +0100 Subject: 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 } --- cryptfs.bin.in | 4 ++-- 1 file 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 -- cgit v1.2.3-70-g09d2