summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-support/ntp
diff options
context:
space:
mode:
authorXufeng Zhang <xufeng.zhang@windriver.com>2014-03-11 13:54:09 +0800
committerJoe MacDonald <joe@deserted.net>2014-03-14 08:51:45 -0400
commit7601d0a551fba612d2497e4ecae00e1af46d9c13 (patch)
tree6a9baaa8e2deb0165356b638560fc2f5a610d9f3 /meta-networking/recipes-support/ntp
parent238093bf8c37bff8fc92341d8dcd481a2b6a6a1f (diff)
downloadmeta-openembedded-7601d0a551fba612d2497e4ecae00e1af46d9c13.tar.gz
ntp: Running ntpd daemon as ntp:ntp
Adding ntp:ntp(user:group) to system and running ntpd dameon as ntp:ntp. Signed-off-by: Xufeng Zhang <xufeng.zhang@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
-rw-r--r--meta-networking/recipes-support/ntp/ntp.inc6
2 files changed, 6 insertions, 2 deletions
diff --git a/meta-networking/recipes-support/ntp/files/ntpd b/meta-networking/recipes-support/ntp/files/ntpd
index 53fa2d1f2..f1e78aa6d 100755
--- a/meta-networking/recipes-support/ntp/files/ntpd
+++ b/meta-networking/recipes-support/ntp/files/ntpd
@@ -23,7 +23,7 @@ startdaemon(){
23 # this. If ntpd seems to disappear after a while assume TICKADJ 23 # this. If ntpd seems to disappear after a while assume TICKADJ
24 # above is set to a totally incorrect value. 24 # above is set to a totally incorrect value.
25 echo -n "Starting ntpd: " 25 echo -n "Starting ntpd: "
26 start-stop-daemon --start -x /usr/bin/ntpd -- -p /var/run/ntp.pid "$@" 26 start-stop-daemon --start -x /usr/bin/ntpd -- -u ntp:ntp -p /var/run/ntp.pid "$@"
27 echo "done" 27 echo "done"
28} 28}
29stopdaemon(){ 29stopdaemon(){
diff --git a/meta-networking/recipes-support/ntp/ntp.inc b/meta-networking/recipes-support/ntp/ntp.inc
index 8381b9e7c..7876c0b79 100644
--- a/meta-networking/recipes-support/ntp/ntp.inc
+++ b/meta-networking/recipes-support/ntp/ntp.inc
@@ -25,13 +25,17 @@ SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-${PV}.tar.g
25 file://ntpd.list \ 25 file://ntpd.list \
26" 26"
27 27
28inherit autotools update-rc.d systemd 28inherit autotools update-rc.d useradd systemd
29 29
30# The ac_cv_header_readline_history is to stop ntpdc depending on either 30# The ac_cv_header_readline_history is to stop ntpdc depending on either
31# readline or curses 31# readline or curses
32EXTRA_OECONF += "--with-net-snmp-config=no --without-ntpsnmpd ac_cv_header_readline_history_h=no" 32EXTRA_OECONF += "--with-net-snmp-config=no --without-ntpsnmpd ac_cv_header_readline_history_h=no"
33CFLAGS_append = " -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED" 33CFLAGS_append = " -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED"
34 34
35USERADD_PACKAGES = "${PN}"
36USERADD_PARAM_${PN} = "--system --home-dir /var/lib/ntp \
37 --shell /bin/false --user-group ntp"
38
35PACKAGECONFIG ??= "" 39PACKAGECONFIG ??= ""
36PACKAGECONFIG[openssl] = "--with-openssl-libdir=${STAGING_LIBDIR} \ 40PACKAGECONFIG[openssl] = "--with-openssl-libdir=${STAGING_LIBDIR} \
37 --with-openssl-incdir=${STAGING_INCDIR} \ 41 --with-openssl-incdir=${STAGING_INCDIR} \