From b0161b42945a9c853e9cf9e42892480c0ff634b3 Mon Sep 17 00:00:00 2001 From: Oyvind Repvik Date: Sun, 14 Aug 2005 15:19:52 +0000 Subject: Use sysconfdir/localstatedir instead of hardcoded paths. Create homedir in postinst --- packages/openntpd/openntpd_3.7p1.bb | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'packages/openntpd') 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 " 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 } -- cgit v1.2.3