summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-support/ntp/ntp.inc
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2013-04-13 22:49:41 +0200
committerMartin Jansa <Martin.Jansa@gmail.com>2013-04-15 16:23:17 +0200
commita45830a39bb47a9eab27980d52966226c9504ea4 (patch)
tree001209d9740e8668b2eeeac4212b3561aecebf29 /meta-networking/recipes-support/ntp/ntp.inc
parent6f48cf899aed0622f8fb26ffa144656a1143c9c5 (diff)
downloadmeta-openembedded-a45830a39bb47a9eab27980d52966226c9504ea4.tar.gz
recipes: Unify indentation
* This change is only aesthetic (unlike indentation in Python tasks). * Some recipes were using tabs. * Some were using 8 spaces. * Some were using mix or different number of spaces. * Make them consistently use 4 spaces everywhere. * Yocto styleguide advises to use tabs (but the only reason to keep tabs is the need to update a lot of recipes). Lately this advice was also merged into the styleguide on the OE wiki. * Using 4 spaces in both types of tasks is better because it's less error prone when someone is not sure if e.g. do_generate_toolchain_file() is Python or shell task and also allows to highlight every tab used in .bb, .inc, .bbappend, .bbclass as potentially bad (shouldn't be used for indenting of multiline variable assignments and cannot be used for Python tasks). * Don't indent closing quote on multiline variables we're quite inconsistent wheater it's first character on line under opening quote or under first non-whitespace character in previous line. Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Acked-by: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'meta-networking/recipes-support/ntp/ntp.inc')
-rw-r--r--meta-networking/recipes-support/ntp/ntp.inc64
1 files changed, 32 insertions, 32 deletions
diff --git a/meta-networking/recipes-support/ntp/ntp.inc b/meta-networking/recipes-support/ntp/ntp.inc
index 3f53fffa3..a604b9c53 100644
--- a/meta-networking/recipes-support/ntp/ntp.inc
+++ b/meta-networking/recipes-support/ntp/ntp.inc
@@ -20,7 +20,7 @@ SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-${PV}.tar.g
20 file://ntpdate.default \ 20 file://ntpdate.default \
21 file://ntpdate.service \ 21 file://ntpdate.service \
22 file://ntpd.service \ 22 file://ntpd.service \
23 " 23"
24 24
25inherit autotools update-rc.d systemd 25inherit autotools update-rc.d systemd
26 26
@@ -37,27 +37,27 @@ PACKAGECONFIG[openssl] = "--with-openssl-libdir=${STAGING_LIBDIR} \
37 openssl" 37 openssl"
38 38
39do_install_append() { 39do_install_append() {
40 install -d ${D}${sysconfdir}/init.d 40 install -d ${D}${sysconfdir}/init.d
41 install -m 644 ${WORKDIR}/ntp.conf ${D}${sysconfdir} 41 install -m 644 ${WORKDIR}/ntp.conf ${D}${sysconfdir}
42 install -m 755 ${WORKDIR}/ntpd ${D}${sysconfdir}/init.d 42 install -m 755 ${WORKDIR}/ntpd ${D}${sysconfdir}/init.d
43 install -d ${D}${bindir} 43 install -d ${D}${bindir}
44 install -m 755 ${WORKDIR}/ntpdate ${D}${bindir}/ntpdate-sync 44 install -m 755 ${WORKDIR}/ntpdate ${D}${bindir}/ntpdate-sync
45 45
46 # Fix hardcoded paths in scripts 46 # Fix hardcoded paths in scripts
47 sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync 47 sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync
48 sed -i 's!/usr/bin/!${bindir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync 48 sed -i 's!/usr/bin/!${bindir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync
49 sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync 49 sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync
50 sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync 50 sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync
51 sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${bindir}/ntpdate-sync 51 sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${bindir}/ntpdate-sync
52 52
53 install -d ${D}/${sysconfdir}/default 53 install -d ${D}/${sysconfdir}/default
54 install -m 644 ${WORKDIR}/ntpdate.default ${D}${sysconfdir}/default/ntpdate 54 install -m 644 ${WORKDIR}/ntpdate.default ${D}${sysconfdir}/default/ntpdate
55 install -d ${D}/${sysconfdir}/network/if-up.d 55 install -d ${D}/${sysconfdir}/network/if-up.d
56 ln -s ${bindir}/ntpdate-sync ${D}/${sysconfdir}/network/if-up.d 56 ln -s ${bindir}/ntpdate-sync ${D}/${sysconfdir}/network/if-up.d
57 57
58 install -d ${D}${systemd_unitdir}/system 58 install -d ${D}${systemd_unitdir}/system
59 install -m 0644 ${WORKDIR}/ntpdate.service ${D}${systemd_unitdir}/system/ 59 install -m 0644 ${WORKDIR}/ntpdate.service ${D}${systemd_unitdir}/system/
60 install -m 0644 ${WORKDIR}/ntpd.service ${D}${systemd_unitdir}/system/ 60 install -m 0644 ${WORKDIR}/ntpd.service ${D}${systemd_unitdir}/system/
61} 61}
62 62
63PACKAGES += "ntpdate ${PN}-tickadj ${PN}-utils" 63PACKAGES += "ntpdate ${PN}-tickadj ${PN}-utils"
@@ -89,10 +89,10 @@ FILES_${PN} = "${bindir}/ntpd ${sysconfdir}/ntp.conf ${sysconfdir}/init.d/ntpd $
89FILES_${PN}-tickadj = "${bindir}/tickadj" 89FILES_${PN}-tickadj = "${bindir}/tickadj"
90FILES_${PN}-utils = "${bindir}" 90FILES_${PN}-utils = "${bindir}"
91FILES_ntpdate = "${bindir}/ntpdate \ 91FILES_ntpdate = "${bindir}/ntpdate \
92 ${sysconfdir}/network/if-up.d/ntpdate-sync \ 92 ${sysconfdir}/network/if-up.d/ntpdate-sync \
93 ${bindir}/ntpdate-sync \ 93 ${bindir}/ntpdate-sync \
94 ${sysconfdir}/default/ntpdate \ 94 ${sysconfdir}/default/ntpdate \
95 ${systemd_unitdir}/system/ntpdate.service \ 95 ${systemd_unitdir}/system/ntpdate.service \
96" 96"
97 97
98CONFFILES_${PN} = "${sysconfdir}/ntp.conf" 98CONFFILES_${PN} = "${sysconfdir}/ntp.conf"
@@ -104,13 +104,13 @@ INITSCRIPT_PARAMS = "defaults"
104 104
105pkg_postinst_ntpdate() { 105pkg_postinst_ntpdate() {
106if test "x$D" != "x"; then 106if test "x$D" != "x"; then
107 exit 1 107 exit 1
108else 108else
109 if ! grep -q -s ntpdate /var/spool/cron/root; then 109 if ! grep -q -s ntpdate /var/spool/cron/root; then
110 echo "adding crontab" 110 echo "adding crontab"
111 test -d /var/spool/cron || mkdir -p /var/spool/cron 111 test -d /var/spool/cron || mkdir -p /var/spool/cron
112 echo "30 * * * * ${bindir}/ntpdate-sync silent" >> /var/spool/cron/root 112 echo "30 * * * * ${bindir}/ntpdate-sync silent" >> /var/spool/cron/root
113 fi 113 fi
114fi 114fi
115} 115}
116 116