mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
Check that the lock file was not removed too early
When named fails to starts due to not being able to obtain
a lock on the lock file that lock file should remain. Check
that the lock file exists before and after the attempt to
start a second instance of named.
(cherry picked from commit 811c9ee7d1)
This commit is contained in:
parent
534cadba3a
commit
74ab7e4660
1 changed files with 2 additions and 0 deletions
|
|
@ -81,12 +81,14 @@ status=$((status+ret))
|
|||
n=$((n+1))
|
||||
echo_i "verifying that named checks for conflicting named processes ($n)"
|
||||
ret=0
|
||||
test -f ns2/named.lock || ret=1
|
||||
testpid=$(run_named ns2 named$n.run -c named-alt2.conf -D runtime-ns2-extra-2 -X named.lock)
|
||||
test -n "$testpid" || ret=1
|
||||
retry_quiet 10 check_named_log "another named process" ns2/named$n.run || ret=1
|
||||
test -n "$testpid" && retry_quiet 10 check_pid $testpid || ret=1
|
||||
test -n "$testpid" && kill -15 $testpid > kill$n.out 2>&1 && ret=1
|
||||
test -n "$testpid" && retry_quiet 10 check_pid $testpid || ret=1
|
||||
test -f ns2/named.lock || ret=1
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue