diff options
author | flz <flz@FreeBSD.org> | 2009-09-07 05:18:50 +0800 |
---|---|---|
committer | flz <flz@FreeBSD.org> | 2009-09-07 05:18:50 +0800 |
commit | aee1abb61b78c082c5d83f9b84996a4e129322b3 (patch) | |
tree | 72655187281a51d755f8177c7c85e0ad80cec664 /x11 | |
parent | 97fa68f3fea860d6efa872e0a7eb28125abed8a2 (diff) | |
download | freebsd-ports-gnome-aee1abb61b78c082c5d83f9b84996a4e129322b3.tar.gz freebsd-ports-gnome-aee1abb61b78c082c5d83f9b84996a4e129322b3.tar.zst freebsd-ports-gnome-aee1abb61b78c082c5d83f9b84996a4e129322b3.zip |
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
Diffstat (limited to 'x11')
-rw-r--r-- | x11/gdm/Makefile | 5 | ||||
-rw-r--r-- | x11/gdm/pkg-install | 30 |
2 files changed, 4 insertions, 31 deletions
diff --git a/x11/gdm/Makefile b/x11/gdm/Makefile index 4d9d5e2e3165..9a6e1a7baf58 100644 --- a/x11/gdm/Makefile +++ b/x11/gdm/Makefile @@ -8,7 +8,7 @@ PORTNAME= gdm PORTVERSION= 2.26.1 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= x11 gnome MASTER_SITES= GNOME DIST_SUBDIR= gnome2 @@ -24,6 +24,9 @@ RUN_DEPENDS= zenity:${PORTSDIR}/x11/zenity \ ${LOCALBASE}/libexec/gnome-settings-daemon:${PORTSDIR}/sysutils/gnome-settings-daemon \ gnome-session:${PORTSDIR}/x11/gnome-session +USERS= gdm +GROUPS= gdm + USE_BZIP2= yes USE_GETTEXT= yes USE_LDCONFIG= yes diff --git a/x11/gdm/pkg-install b/x11/gdm/pkg-install index 788a1a610c81..4adf27abbb43 100644 --- a/x11/gdm/pkg-install +++ b/x11/gdm/pkg-install @@ -4,40 +4,10 @@ case $2 in POST-INSTALL) USER=gdm GROUP=${USER} - UID=92 - GID=${UID} - PW=/usr/sbin/pw CHMOD=/bin/chmod CHOWN=/usr/sbin/chown MKDIR=/bin/mkdir - 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." - uhome=`${PW} user show ${USER} | awk -F: '{print $9}'` - if [ x"${uhome}" = x"/nonexistent" -o x"${uhome}" = x"/var/gdm" ]; then - ${PW} usermod ${USER} -d "${PKG_PREFIX}/etc/gdm/home" - fi - else - if ${PW} useradd ${USER} -u ${UID} -g ${GROUP} -h - \ - -d "${PKG_PREFIX}/etc/gdm/home" -s /sbin/nologin -c "GNOME Display Manager" - then - echo "Added user \"${USER}\"." - else - echo "Adding user \"${USER}\" failed..." - exit 1 - fi - fi ${MKDIR} -p /var/gdm ${MKDIR} -p /var/log/gdm ${CHMOD} 0755 /var/log/gdm |