diff options
-rw-r--r-- | Makefile | 10 | ||||
-rw-r--r-- | cryptfs.bin.in | 2 |
2 files changed, 9 insertions, 3 deletions
@@ -48,9 +48,15 @@ all: cryptfs.8 cryptfs.bin cryptfs.rc cryptfs.service s@#VERSION#@$(VERSION)@g; \ " $< | \ if which "ping6" >/dev/null 2>&1; then \ - sed 's@#PING6#@ping6@'; \ + sed " \ + s@#PING4#@ping@; \ + s@#PING6#@ping6@; \ + "; \ else \ - sed 's@#PING6#@ping -6@'; \ + sed " \ + s@#PING4#@ping -4@; \ + s@#PING6#@ping -6@; \ + "; \ fi > $@ [ "$@" = "cryptfs.bin" ] && chmod +x "$@" || true [ "$@" = "cryptfs.rc" ] && chmod +x "$@" || true diff --git a/cryptfs.bin.in b/cryptfs.bin.in index 4057651..b928efb 100644 --- a/cryptfs.bin.in +++ b/cryptfs.bin.in @@ -220,7 +220,7 @@ do_mount() { host=$(extract_ssh_host "${host}") while [ $(date +%s) -lt ${max_wait} ] && \ ! timeout 1 #PING6# -c1 "${host}" >/dev/null 2>&1 && \ - ! timeout 1 ping -c1 "${host}" >/dev/null 2>&1; do + ! timeout 1 #PING4# -c1 "${host}" >/dev/null 2>&1; do >&2 printf ',' sleep 1 done |