diff options
author | Donatas Abraitis <donatas@opensourcerouting.org> | 2022-07-08 18:11:17 +0200 |
---|---|---|
committer | Donatas Abraitis <donatas@opensourcerouting.org> | 2022-07-11 13:47:09 +0200 |
commit | 9dedc9eb37688fe420a382ff385243b6711080c6 (patch) | |
tree | 8b488efc2f4eb7422a4f52ec876dfb8edf3bfe62 /tools | |
parent | Merge pull request #11579 from opensourcerouting/fix/revert_isis_fast_reroute (diff) | |
download | frr-9dedc9eb37688fe420a382ff385243b6711080c6.tar.xz frr-9dedc9eb37688fe420a382ff385243b6711080c6.zip |
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>
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/frrcommon.sh.in | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/frrcommon.sh.in b/tools/frrcommon.sh.in index 3344ff495..6eb3223fa 100755 --- a/tools/frrcommon.sh.in +++ b/tools/frrcommon.sh.in @@ -208,7 +208,7 @@ daemon_stop() { [ -r "$pidfile" ] || fail="pid file not found" $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" [ -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" [ -r "$pidfile" ] || return 3 - pid="$(cat \"$pidfile\")" + pid="$(cat "$pidfile")" [ -z "$pid" ] && return 1 kill -0 "$pid" 2>/dev/null || return 1 return 0 |