diff options
author | Florent Thoumie <flz@FreeBSD.org> | 2009-09-06 21:18:50 +0000 |
---|---|---|
committer | Florent Thoumie <flz@FreeBSD.org> | 2009-09-06 21:18:50 +0000 |
commit | 80ce349ead781fafb5528d69310848254d4afbf8 (patch) | |
tree | 9e4543908f3bf06a3af78267b4523928d41925b9 /sysutils | |
parent | Add haldaemon with UID/GID 560. (diff) |
Add support to create users and groups from information stored in UIDs/GIDs
files. Users and groups won't be deleted at deinstall time as we're lacking
a refcount to know if any port is using them.
Also convert a few ports while I'm here.
PR: ports/108514
Submitted by: mm, self
Notes
Notes:
svn path=/head/; revision=240964
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/hal/Makefile | 5 | ||||
-rw-r--r-- | sysutils/hal/files/pkg-install.in | 27 | ||||
-rw-r--r-- | sysutils/policykit/Makefile | 5 | ||||
-rw-r--r-- | sysutils/policykit/pkg-install | 27 |
4 files changed, 8 insertions, 56 deletions
diff --git a/sysutils/hal/Makefile b/sysutils/hal/Makefile index a0ed228cd194..c83611bfa3b3 100644 --- a/sysutils/hal/Makefile +++ b/sysutils/hal/Makefile @@ -8,7 +8,7 @@ PORTNAME= hal DISTVERSION= 0.5.11 -PORTREVISION= 25 +PORTREVISION= 26 CATEGORIES= sysutils MASTER_SITES= http://hal.freedesktop.org/releases/ @@ -50,6 +50,9 @@ CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include -DHAVE_CK_0_3" \ #HALVERSION= 0.5.10 #SNAPVERSION= 20080218 +USERS= haldaemon +GROUPS= haldaemon + USE_RC_SUBR= hald USE_GNOME_SUBR= yes DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}-${DISTVERSION} diff --git a/sysutils/hal/files/pkg-install.in b/sysutils/hal/files/pkg-install.in index 59505fc30505..253eef1f0e62 100644 --- a/sysutils/hal/files/pkg-install.in +++ b/sysutils/hal/files/pkg-install.in @@ -4,33 +4,6 @@ case $2 in POST-INSTALL) USER=haldaemon GROUP=${USER} - UID=560 - GID=${UID} - PW=/usr/sbin/pw - - if ${PW} group show "${GROUP}" 2>/dev/null; then - echo "You already have a group \"${GROUP}\", so I will use it." - else - if ${PW} groupadd ${GROUP} -g ${GID}; then - echo "Added group \"${GROUP}\"." - else - echo "Adding group \"${GROUP}\" failed..." - exit 1 - fi - fi - - if ${PW} user show "${USER}" 2>/dev/null; then - echo "You already have a user \"${USER}\", so I will use it." - else - if ${PW} useradd ${USER} -u ${UID} -g ${GROUP} -h - \ - -d "/nonexistent" -s /sbin/nologin -c "HAL Daemon User" - then - echo "Added user \"${USER}\"." - else - echo "Adding user \"${USER}\" failed..." - exit 1 - fi - fi /usr/bin/install -d -o ${USER} -g ${GROUP} /var/run/hald /usr/bin/install -d -o ${USER} -g ${GROUP} /var/cache/hald diff --git a/sysutils/policykit/Makefile b/sysutils/policykit/Makefile index c784bead4d8d..a43749208604 100644 --- a/sysutils/policykit/Makefile +++ b/sysutils/policykit/Makefile @@ -8,7 +8,7 @@ PORTNAME= policykit PORTVERSION= 0.9 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= sysutils gnome MASTER_SITES= http://hal.freedesktop.org/releases/ DISTNAME= PolicyKit-${PORTVERSION} @@ -19,6 +19,9 @@ COMMENT= Framework for controlling access to system-wide components LIB_DEPENDS= dbus-glib-1.2:${PORTSDIR}/devel/dbus-glib \ expat.6:${PORTSDIR}/textproc/expat2 +USERS= polkit +GROUPS= polkit + USE_GNOME= gnomehack glib20 intlhack USE_GMAKE= yes GNU_CONFIGURE= yes diff --git a/sysutils/policykit/pkg-install b/sysutils/policykit/pkg-install index 132e98e9f5a5..3fbb00c5f1fb 100644 --- a/sysutils/policykit/pkg-install +++ b/sysutils/policykit/pkg-install @@ -4,33 +4,6 @@ case $2 in POST-INSTALL) USER=polkit GROUP=${USER} - UID=562 - GID=${UID} - PW=/usr/sbin/pw - - if ${PW} group show "${GROUP}" 2>/dev/null; then - echo "You already have a group \"${GROUP}\", so I will use it." - else - if ${PW} groupadd ${GROUP} -g ${GID}; then - echo "Added group \"${GROUP}\"." - else - echo "Adding group \"${GROUP}\" failed..." - exit 1 - fi - fi - - if ${PW} user show "${USER}" 2>/dev/null; then - echo "You already have a user \"${USER}\", so I will use it." - else - if ${PW} useradd ${USER} -u ${UID} -g ${GROUP} -h - \ - -d "/nonexistent" -s /sbin/nologin -c "PolicyKit Daemon User" - then - echo "Added user \"${USER}\"." - else - echo "Adding user \"${USER}\" failed..." - exit 1 - fi - fi /usr/bin/install -d -o root -m 0770 -g ${GROUP} /var/run/PolicyKit /usr/bin/install -d -o root -m 0770 -g ${GROUP} /var/lib/PolicyKit |