summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOyvind Repvik <nail@nslu2-linux.org>2005-08-14 15:19:52 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2005-08-14 15:19:52 +0000
commitb0161b42945a9c853e9cf9e42892480c0ff634b3 (patch)
tree1c8a63c2fcb241973aa13123f1427bec8559adaf
parent285312fd74ae999433d163dff3e63bb194224571 (diff)
Use sysconfdir/localstatedir instead of hardcoded paths. Create homedir in postinst
-rw-r--r--packages/openntpd/openntpd_3.7p1.bb11
1 files changed, 6 insertions, 5 deletions
diff --git a/packages/openntpd/openntpd_3.7p1.bb b/packages/openntpd/openntpd_3.7p1.bb
index 3ca809f002..5204f34bb3 100644
--- a/packages/openntpd/openntpd_3.7p1.bb
+++ b/packages/openntpd/openntpd_3.7p1.bb
@@ -6,7 +6,7 @@ LICENSE = "BSD"
SECTION = "console/network"
MAINTAINER = "Oyvind Repvik <nail@nslu2-linux.org>"
DEPENDS = "timezones"
-PR="r7"
+PR="r8"
SRC_URI = "http://www.zip.com.au/~dtucker/openntpd/release/openntpd-${PV}.tar.gz \
file://autofoo.patch;patch=1 \
@@ -22,7 +22,7 @@ INITSCRIPT_PARAMS = "defaults"
inherit autotools update-rc.d
EXTRA_OECONF += "CFLAGS=-DUSE_ADJTIMEX --disable-strip --prefix=/usr \
- --sysconfdir=/etc --with-privsep-path=/var/shared/empty \
+ --sysconfdir=/etc --with-privsep-path=/${localstatedir}/shared/empty \
--with-privsep-user=ntpd"
do_install_prepend() {
@@ -34,11 +34,12 @@ do_install_append() {
}
pkg_postrm () {
- grep ntpd /etc/passwd && deluser ntpd
+ grep ntpd ${sysconfdir}/passwd && deluser ntpd
}
pkg_postinst () {
- grep ntpd /etc/passwd || adduser --disabled-password --home=/var/shared/empty --ingroup nogroup ntpd
- chown root:root /var/shared/empty
+ mkdir -p ${localstatedir}/shared/empty
+ grep ntpd ${sysconfdir}/passwd || adduser --disabled-password --home=${localstatedir}/shared/empty --ingroup nogroup ntpd
+ chown root:root ${localstatedir}/shared/empty
}