[oe-commits] Wenzong Fan : ntp: fix hardcode to /usr/bin/perl

git at git.openembedded.org git at git.openembedded.org
Fri Apr 25 01:21:21 UTC 2014


Module: meta-openembedded.git
Branch: master
Commit: b96ae8191dbd23b3105e324e5f4f3522664811ca
URL:    http://git.openembedded.org/?p=meta-openembedded.git&a=commit;h=b96ae8191dbd23b3105e324e5f4f3522664811ca

Author: Wenzong Fan <wenzong.fan at windriver.com>
Date:   Mon Apr 21 01:53:28 2014 -0400

ntp: fix hardcode to /usr/bin/perl

This patch properly uses the path variables and fixes ntptrace and
ntp-wait, just in case perl is not installed with the hardcode path.

Signed-off-by: Rahat Mahbub <rahat.mahbub at windriver.com>
Signed-off-by: Wenzong Fan <wenzong.fan at windriver.com>
Signed-off-by: Joe MacDonald <joe at deserted.net>

---

 meta-networking/recipes-support/ntp/ntp.inc | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/meta-networking/recipes-support/ntp/ntp.inc b/meta-networking/recipes-support/ntp/ntp.inc
index 9861fd8..49f9901 100644
--- a/meta-networking/recipes-support/ntp/ntp.inc
+++ b/meta-networking/recipes-support/ntp/ntp.inc
@@ -58,6 +58,10 @@ do_install_append() {
     sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync
     sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync
     sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${bindir}/ntpdate-sync
+    sed -i '1s,#!.*perl -w,#! ${bindir}/env perl,' ${D}${sbindir}/ntptrace
+    sed -i '/use/i use warnings;' ${D}${sbindir}/ntptrace
+    sed -i '1s,#!.*perl -w,#! ${bindir}/env perl,' ${D}${sbindir}/ntp-wait
+    sed -i '/use/i use warnings;' ${D}${sbindir}/ntp-wait
 
     install -d ${D}/${sysconfdir}/default
     install -m 644 ${WORKDIR}/ntpdate.default ${D}${sysconfdir}/default/ntpdate



More information about the Openembedded-commits mailing list