openntpd: Fix initscript and reformat .bb to match OE style guidelines
authorOyvind Repvik <nail@nslu2-linux.org>
Thu, 7 Sep 2006 12:34:00 +0000 (12:34 +0000)
committerOyvind Repvik <nail@nslu2-linux.org>
Thu, 7 Sep 2006 12:34:00 +0000 (12:34 +0000)
packages/openntpd/files/init
packages/openntpd/openntpd_3.7p1.bb

index d35c652..745f170 100644 (file)
@@ -7,7 +7,7 @@
 
 ntpd=/usr/sbin/ntpd
 test -x "$ntpd" || exit 0
-[ ! -d /var/shared/empty ] && mkdir /var/shared/empty
+[ ! -d /var/shared/empty ] && mkdir -p /var/shared/empty
 
 case "$1" in
   start)
index 6649361..4001eb7 100644 (file)
@@ -6,43 +6,41 @@ LICENSE = "BSD"
 SECTION = "console/network"
 MAINTAINER = "Oyvind Repvik <nail@nslu2-linux.org>"
 DEPENDS = "timezones"
-PR="r12"
+PR="r13"
 
 SRC_URI = "http://www.zip.com.au/~dtucker/openntpd/release/openntpd-${PV}.tar.gz \
-          file://autofoo.patch;patch=1 \
-          file://adjtimex-${PV}.patch;patch=1 \
-          file://makefile-install.patch;patch=1 \
-          file://init"
-S = "${WORKDIR}/openntpd-${PV}"
-
-INITSCRIPT_NAME = "openntpd"
-INITSCRIPT_PARAMS = "defaults"
+           file://autofoo.patch;patch=1 \
+           file://adjtimex-${PV}.patch;patch=1 \
+           file://makefile-install.patch;patch=1 \
+           file://init"
 
+S = "${WORKDIR}/openntpd-${PV}"
 
 inherit autotools update-rc.d
 
+INITSCRIPT_NAME = "openntpd"  
+INITSCRIPT_PARAMS = "defaults"
+
 EXTRA_OECONF += "CFLAGS=-DUSE_ADJTIMEX --disable-strip --prefix=/usr \
-               --sysconfdir=/etc  --with-privsep-path=/${localstatedir}/shared/empty \
-               --with-privsep-user=ntpd \
-               --with-builtin-arc4random \
-               --without-ssl-dir \
-               "
+                --sysconfdir=/etc  --with-privsep-path=/${localstatedir}/shared/empty \
+                --with-privsep-user=ntpd \
+                --with-builtin-arc4random \
+                --without-ssl-dir"
 
 do_install_prepend() {
         install -d ${D}${sysconfdir}/init.d
 }
 
 do_install_append() {
-       install -c -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/openntpd
+        install -c -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/openntpd
 }
 
 pkg_postrm () {
-       grep ntpd ${sysconfdir}/passwd && deluser ntpd 
+        grep ntpd ${sysconfdir}/passwd && deluser ntpd 
 }
 
 pkg_postinst () {
-       [ ! -d ${localstatedir}/shared ] && mkdir -p ${localstatedir}/shared
-       grep ntpd ${sysconfdir}/passwd || adduser --disabled-password --home=${localstatedir}/shared/empty --ingroup nogroup ntpd
-       chown root:root ${localstatedir}/shared/empty
+        [ ! -d ${localstatedir}/shared ] && mkdir -p ${localstatedir}/shared
+        grep ntpd ${sysconfdir}/passwd || adduser --disabled-password --home=${localstatedir}/shared/empty --ingroup nogroup ntpd
+        chown root:root ${localstatedir}/shared/empty
 }
-