Merge pull request #10861 from opensourcerouting/fix/replace_strings_to_tr

tools: Replace `strings` to `tr` for frrinit.sh
This commit is contained in:
Donald Sharp 2022-03-25 10:10:24 -04:00 committed by GitHub
commit 52093e0f0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -77,7 +77,7 @@ reload)
# systemd doesn't set WATCHDOG_USEC for reload commands.
watchfrr_pidfile="$V_PATH/watchfrr.pid"
watchfrr_pid="`cat \"$watchfrr_pidfile\"`"
watchfrr_cmdline="`strings /proc/$watchfrr_pid/cmdline`"
watchfrr_cmdline="`tr '\0' '\n' < /proc/$watchfrr_pid/cmdline`"
if [ -d "/proc/$watchfrr_pid" ]; then
wdt="`tr '\0' '\n' < /proc/$watchfrr_pid/environ | grep '^WATCHDOG_USEC='`"
wdt="${wdt#WATCHDOG_USEC=}"