Openembedded Devel Discussions
 help / color / mirror / Atom feed
From: Mark Hatle <mark.hatle@windriver.com>
To: <openembedded-devel@lists.openembedded.org>
Subject: [meta-networking][PATCH 3/3] ntpd: make start-stop-daemon command available for ntpd
Date: Tue, 19 Nov 2013 15:50:38 -0600	[thread overview]
Message-ID: <1384897838-11066-4-git-send-email-mark.hatle@windriver.com> (raw)
In-Reply-To: <1384897838-11066-1-git-send-email-mark.hatle@windriver.com>

From: Qiang Chen <qiang.chen@windriver.com>

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>
---
 meta-networking/recipes-support/ntp/files/ntpd | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta-networking/recipes-support/ntp/files/ntpd b/meta-networking/recipes-support/ntp/files/ntpd
index ae50f13..53fa2d1 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
-- 
1.8.1.2.545.g2f19ada



  parent reply	other threads:[~2013-11-19 21:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-19 21:50 [meta-networking][PATCH 0/3] misc fixes Mark Hatle
2013-11-19 21:50 ` [meta-networking][PATCH 1/3] quagga: Fix watchquagga initscript problem Mark Hatle
2013-11-26 16:24   ` Joe MacDonald
2013-11-19 21:50 ` [meta-networking][PATCH 2/3] proftpd: Convert proftpd group to system scope Mark Hatle
2013-11-26  2:54   ` Joe MacDonald
2013-11-19 21:50 ` Mark Hatle [this message]
2013-11-26 16:25   ` [meta-networking][PATCH 3/3] ntpd: make start-stop-daemon command available for ntpd Joe MacDonald

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1384897838-11066-4-git-send-email-mark.hatle@windriver.com \
    --to=mark.hatle@windriver.com \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox