From 2707fd0aca75730526c232f5bebe4937b1f4a709 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 2 Sep 2014 08:00:48 +0200 Subject: use pgrep instead of pidof --- 50-ntpdate | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/50-ntpdate b/50-ntpdate index 5cb9850..4e7de9e 100644 --- a/50-ntpdate +++ b/50-ntpdate @@ -4,7 +4,7 @@ case "${reason}" in BOUND|REBIND|REBOOT|RENEW|TIMEOUT|STATIC) # sync time as soon as connection is up # this reads nameserver from /etc/ntp.conf - if ! pidof ntpd >/dev/null; then + if ! pgrep -x ntpd >/dev/null; then ntpd --quit --panicgate fi # alternatively use ntpdate and give hostname -- cgit v1.2.3-54-g00ecf