dc3bae68a2422ead82a12fa8480417fd4e351cdd added strings command, which is wrong.
It requires additional package to be installed on the system (binutils).
Let's just get use `tr`.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
# 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=}"