mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-15 16:54:30 +00:00
tools: Do not wrap the pidfile into double-quotes for frrcommon.sh
The problem is that when we run watchfrr.sh/frrinit.sh, we get something like: ``` cat: '"/var/run/frr/staticd.pid"': No such file or directory cat: '"/var/run/frr/babeld.pid"': No such file or directory cat: '"/var/run/frr/zebra.pid"': No such file or directory ``` Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
This commit is contained in:
parent
3fb4bef537
commit
9dedc9eb37
@ -208,7 +208,7 @@ daemon_stop() {
|
|||||||
|
|
||||||
[ -r "$pidfile" ] || fail="pid file not found"
|
[ -r "$pidfile" ] || fail="pid file not found"
|
||||||
$all && [ -n "$fail" ] && return 0
|
$all && [ -n "$fail" ] && return 0
|
||||||
[ -z "$fail" ] && pid="$(cat \"$pidfile\")"
|
[ -z "$fail" ] && pid="$(cat "$pidfile")"
|
||||||
[ -z "$fail" -a -z "$pid" ] && fail="pid file is empty"
|
[ -z "$fail" -a -z "$pid" ] && fail="pid file is empty"
|
||||||
[ -n "$fail" ] || kill -0 "$pid" 2>/dev/null || fail="pid $pid not running"
|
[ -n "$fail" ] || kill -0 "$pid" 2>/dev/null || fail="pid $pid not running"
|
||||||
|
|
||||||
@ -242,7 +242,7 @@ daemon_status() {
|
|||||||
pidfile="$V_PATH/$daemon${inst:+-$inst}.pid"
|
pidfile="$V_PATH/$daemon${inst:+-$inst}.pid"
|
||||||
|
|
||||||
[ -r "$pidfile" ] || return 3
|
[ -r "$pidfile" ] || return 3
|
||||||
pid="$(cat \"$pidfile\")"
|
pid="$(cat "$pidfile")"
|
||||||
[ -z "$pid" ] && return 1
|
[ -z "$pid" ] && return 1
|
||||||
kill -0 "$pid" 2>/dev/null || return 1
|
kill -0 "$pid" 2>/dev/null || return 1
|
||||||
return 0
|
return 0
|
||||||
|
Loading…
Reference in New Issue
Block a user