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@windriver.com>
Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
This commit is contained in:
Wenzong Fan
2014-04-21 01:53:28 -04:00
committed by Joe MacDonald
parent 365125e4da
commit b96ae8191d
@@ -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