diff options
author | Andrei Pavel <andrei@isc.org> | 2020-12-14 18:12:25 +0100 |
---|---|---|
committer | Andrei Pavel <andrei@isc.org> | 2020-12-14 18:16:05 +0100 |
commit | 72c0a679a1101aada8d22c98abf7bde615fa7a11 (patch) | |
tree | d2fc060c99b9f56c0f8686f713cbffaaae40dd70 | |
parent | [#1609] regenerated parsers (diff) | |
download | kea-72c0a679a1101aada8d22c98abf7bde615fa7a11.tar.xz kea-72c0a679a1101aada8d22c98abf7bde615fa7a11.zip |
[#1611] make date +%s -d 4 seconds work on alpineKea-1.9.3
-rw-r--r-- | src/lib/testutils/dhcp_test_lib.sh.in | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/testutils/dhcp_test_lib.sh.in b/src/lib/testutils/dhcp_test_lib.sh.in index dab439e0b3..955be6a9ba 100644 --- a/src/lib/testutils/dhcp_test_lib.sh.in +++ b/src/lib/testutils/dhcp_test_lib.sh.in @@ -423,8 +423,8 @@ get_process_name() { # Wait for file to be created. wait_for_file() { local file=${1} - timeout='4 seconds' - deadline=$(date +%s -d "${timeout}") + timeout='4' # seconds + deadline=$(($(date +%s) + timeout)) while ! test -f "${file}"; do if test "${deadline}" -lt "$(date +%s)"; then # Time is up. @@ -439,8 +439,8 @@ wait_for_file() { # Wait for process identified by PID to die. wait_for_process_to_die() { local pid=${1} - timeout='4 seconds' - deadline=$(date +%s -d "${timeout}") + timeout='4' # seconds + deadline=$(($(date +%s) + timeout)) while ps "${pid}" >/dev/null; do if test "${deadline}" -lt "$(date +%s)"; then # Time is up. |