aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-support/ntp
diff options
context:
space:
mode:
authorQiang Chen <qiang.chen@windriver.com>2013-11-19 15:50:38 -0600
committerJoe MacDonald <joe@deserted.net>2013-11-26 09:28:33 -0500
commit5f8ef9cfb23c22ba09a94d678ef1635f7495fb6c (patch)
tree38b7702986cafbb09b7a3c338850b5a2742d87f8 /meta-networking/recipes-support/ntp
parentba4f5a82bbdb6c0e89e1749887d9c4168f90363e (diff)
downloadmeta-openembedded-contrib-5f8ef9cfb23c22ba09a94d678ef1635f7495fb6c.tar.gz
ntpd: make start-stop-daemon command available for ntpd
If ntpd script is being called by a non-root user using sudo, it will fail as follows: /etc/init.d/ntpd restart Stopping ntpd: /etc/init.d/ntpd: line 29: start-stop-daemon: command not found done Starting ntpd: /etc/init.d/ntpd: line 24: start-stop-daemon: command not found done This is because /etc/init.d/ntpd calls start-stop-daemon which is in /sbin (not in the default path for non-root users) Explicitly configure the PATH to include /sbin. Signed-off-by: Qiang Chen <qiang.chen@windriver.com> Signed-off-by: Jeff Polk <jeff.polk@windriver.com> Reworked to set PATH instead of hardcode the location of start-stop-daemon Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Joe MacDonald <joe@deserted.net>
Diffstat (limited to 'meta-networking/recipes-support/ntp')
-rwxr-xr-xmeta-networking/recipes-support/ntp/files/ntpd2
1 files changed, 2 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/ntp/files/ntpd b/meta-networking/recipes-support/ntp/files/ntpd
index ae50f135d0..53fa2d1f2b 100755
--- a/meta-networking/recipes-support/ntp/files/ntpd
+++ b/meta-networking/recipes-support/ntp/files/ntpd
@@ -1,5 +1,7 @@
#! /bin/sh
#
+PATH=/sbin:/bin:/usr/bin:/usr/sbin
+
# ntpd init.d script for ntpdc from ntp.isc.org
test -x /usr/bin/ntpd -a -r /etc/ntp.conf || exit 0
# rcS contains TICKADJ