summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-support/ntp
diff options
context:
space:
mode:
authorXufeng Zhang <xufeng.zhang@windriver.com>2014-03-11 13:54:10 +0800
committerJoe MacDonald <joe@deserted.net>2014-03-14 08:51:45 -0400
commited0a2852ecc75d5dd87ab556f698ea2816b18bd5 (patch)
treebc51b5bcf07133253d5d31905a9fe15d1fd6e225 /meta-networking/recipes-support/ntp
parent7601d0a551fba612d2497e4ecae00e1af46d9c13 (diff)
downloadmeta-openembedded-ed0a2852ecc75d5dd87ab556f698ea2816b18bd5.tar.gz
ntp: Moving relevant files from /usr/bin to /usr/sbin
"--with-binsubdir" controls whether we use bin_PROGRAMS or sbin_PROGRAMS while installing executable files in ntp Makefile, in order to install all the relevant files in /usr/sbin instead of /usr/bin, we can pass "--with-binsubdir=sbin" in ntp configure cmdline. Accordingly, updating the path for the files which are contained in rpm packages. 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/ntpd8
-rwxr-xr-xmeta-networking/recipes-support/ntp/files/ntpdate6
-rw-r--r--meta-networking/recipes-support/ntp/ntp.inc12
-rw-r--r--meta-networking/recipes-support/ntp/ntp/ntpd.service2
-rw-r--r--meta-networking/recipes-support/ntp/ntp/sntp.service2
5 files changed, 15 insertions, 15 deletions
diff --git a/meta-networking/recipes-support/ntp/files/ntpd b/meta-networking/recipes-support/ntp/files/ntpd
index f1e78aa6d..a62b8ce69 100755
--- a/meta-networking/recipes-support/ntp/files/ntpd
+++ b/meta-networking/recipes-support/ntp/files/ntpd
@@ -3,7 +3,7 @@
3PATH=/sbin:/bin:/usr/bin:/usr/sbin 3PATH=/sbin:/bin:/usr/bin:/usr/sbin
4 4
5# ntpd init.d script for ntpdc from ntp.isc.org 5# ntpd init.d script for ntpdc from ntp.isc.org
6test -x /usr/bin/ntpd -a -r /etc/ntp.conf || exit 0 6test -x /usr/sbin/ntpd -a -r /etc/ntp.conf || exit 0
7# rcS contains TICKADJ 7# rcS contains TICKADJ
8test -r /etc/default/rcS && . /etc/default/rcS 8test -r /etc/default/rcS && . /etc/default/rcS
9 9
@@ -11,9 +11,9 @@ test -r /etc/default/rcS && . /etc/default/rcS
11settick(){ 11settick(){
12 # If TICKADJ is set we *must* adjust it before we start, because the 12 # If TICKADJ is set we *must* adjust it before we start, because the
13 # driftfile relies on the correct setting 13 # driftfile relies on the correct setting
14 test -n "$TICKADJ" -a -x /usr/bin/tickadj && { 14 test -n "$TICKADJ" -a -x /usr/sbin/tickadj && {
15 echo -n "Setting tick to $TICKADJ: " 15 echo -n "Setting tick to $TICKADJ: "
16 /usr/bin/tickadj "$TICKADJ" 16 /usr/sbin/tickadj "$TICKADJ"
17 echo "done" 17 echo "done"
18 } 18 }
19} 19}
@@ -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 -- -u ntp:ntp -p /var/run/ntp.pid "$@" 26 start-stop-daemon --start -x /usr/sbin/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/files/ntpdate b/meta-networking/recipes-support/ntp/files/ntpdate
index ab0551c5a..17b64d133 100755
--- a/meta-networking/recipes-support/ntp/files/ntpdate
+++ b/meta-networking/recipes-support/ntp/files/ntpdate
@@ -1,8 +1,8 @@
1#!/bin/sh 1#!/bin/sh
2 2
3PATH=/sbin:/bin:/usr/bin 3PATH=/sbin:/bin:/usr/bin:/usr/sbin
4 4
5test -x /usr/bin/ntpdate || exit 0 5test -x /usr/sbin/ntpdate || exit 0
6 6
7if test -f /etc/default/ntpdate ; then 7if test -f /etc/default/ntpdate ; then
8. /etc/default/ntpdate 8. /etc/default/ntpdate
@@ -40,7 +40,7 @@ if [ -x /usr/bin/lockfile-create ]; then
40 LOCKTOUCHPID="$!" 40 LOCKTOUCHPID="$!"
41fi 41fi
42 42
43if /usr/bin/ntpdate -s $OPTS $NTPSERVERS 2>/dev/null; then 43if /usr/sbin/ntpdate -s $OPTS $NTPSERVERS 2>/dev/null; then
44 if [ "$UPDATE_HWCLOCK" = "yes" ]; then 44 if [ "$UPDATE_HWCLOCK" = "yes" ]; then
45 hwclock --systohc || : 45 hwclock --systohc || :
46 fi 46 fi
diff --git a/meta-networking/recipes-support/ntp/ntp.inc b/meta-networking/recipes-support/ntp/ntp.inc
index 7876c0b79..9c3e0d16c 100644
--- a/meta-networking/recipes-support/ntp/ntp.inc
+++ b/meta-networking/recipes-support/ntp/ntp.inc
@@ -29,7 +29,7 @@ inherit 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 --with-binsubdir=sbin"
33CFLAGS_append = " -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED" 33CFLAGS_append = " -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED"
34 34
35USERADD_PACKAGES = "${PN}" 35USERADD_PACKAGES = "${PN}"
@@ -101,18 +101,18 @@ RCONFLICTS_ntpdate += "ntpdate-systemd"
101 101
102RSUGGESTS_${PN} = "iana-etc" 102RSUGGESTS_${PN} = "iana-etc"
103 103
104FILES_${PN} = "${bindir}/ntpd ${sysconfdir}/ntp.conf ${sysconfdir}/init.d/ntpd ${sbindir} ${libdir} \ 104FILES_${PN} = "${sbindir}/ntpd ${sysconfdir}/ntp.conf ${sysconfdir}/init.d/ntpd ${libdir} \
105 ${systemd_unitdir}/ntp-units.d/60-ntpd.list \ 105 ${systemd_unitdir}/ntp-units.d/60-ntpd.list \
106" 106"
107FILES_${PN}-tickadj = "${bindir}/tickadj" 107FILES_${PN}-tickadj = "${sbindir}/tickadj"
108FILES_${PN}-utils = "${bindir}" 108FILES_${PN}-utils = "${sbindir}"
109FILES_ntpdate = "${bindir}/ntpdate \ 109FILES_ntpdate = "${sbindir}/ntpdate \
110 ${sysconfdir}/network/if-up.d/ntpdate-sync \ 110 ${sysconfdir}/network/if-up.d/ntpdate-sync \
111 ${bindir}/ntpdate-sync \ 111 ${bindir}/ntpdate-sync \
112 ${sysconfdir}/default/ntpdate \ 112 ${sysconfdir}/default/ntpdate \
113 ${systemd_unitdir}/system/ntpdate.service \ 113 ${systemd_unitdir}/system/ntpdate.service \
114" 114"
115FILES_sntp = "${bindir}/sntp \ 115FILES_sntp = "${sbindir}/sntp \
116 ${sysconfdir}/default/sntp \ 116 ${sysconfdir}/default/sntp \
117 " 117 "
118 118
diff --git a/meta-networking/recipes-support/ntp/ntp/ntpd.service b/meta-networking/recipes-support/ntp/ntp/ntpd.service
index eb9c0308c..b7c426864 100644
--- a/meta-networking/recipes-support/ntp/ntp/ntpd.service
+++ b/meta-networking/recipes-support/ntp/ntp/ntpd.service
@@ -5,7 +5,7 @@ After=network.target
5[Service] 5[Service]
6Type=forking 6Type=forking
7PIDFile=/run/ntpd.pid 7PIDFile=/run/ntpd.pid
8ExecStart=/usr/bin/ntpd -p /run/ntpd.pid -g 8ExecStart=/usr/sbin/ntpd -p /run/ntpd.pid -g
9 9
10[Install] 10[Install]
11WantedBy=multi-user.target 11WantedBy=multi-user.target
diff --git a/meta-networking/recipes-support/ntp/ntp/sntp.service b/meta-networking/recipes-support/ntp/ntp/sntp.service
index 0f09e4347..4898b8a70 100644
--- a/meta-networking/recipes-support/ntp/ntp/sntp.service
+++ b/meta-networking/recipes-support/ntp/ntp/sntp.service
@@ -5,7 +5,7 @@ After=network.target
5[Service] 5[Service]
6Type=oneshot 6Type=oneshot
7EnvironmentFile=-/etc/default/sntp 7EnvironmentFile=-/etc/default/sntp
8ExecStart=/usr/bin/sntp -s $NTPSERVER 8ExecStart=/usr/sbin/sntp -s $NTPSERVER
9 9
10[Install] 10[Install]
11WantedBy=multi-user.target 11WantedBy=multi-user.target