diff options
author | dinoex <dinoex@FreeBSD.org> | 2007-06-08 21:57:13 +0800 |
---|---|---|
committer | dinoex <dinoex@FreeBSD.org> | 2007-06-08 21:57:13 +0800 |
commit | c9492477d82752f6580fb3f3267e14f80f129270 (patch) | |
tree | 45990b834733b1446233754a8524ba8a7f9d9ea6 /print | |
parent | 46a0429f386fa5a33cfd6012b9b8ab8a8a88a367 (diff) | |
download | freebsd-ports-gnome-c9492477d82752f6580fb3f3267e14f80f129270.tar.gz freebsd-ports-gnome-c9492477d82752f6580fb3f3267e14f80f129270.tar.zst freebsd-ports-gnome-c9492477d82752f6580fb3f3267e14f80f129270.zip |
- fix order for creation for user, groups and dirs.
PR: 113473
Diffstat (limited to 'print')
-rw-r--r-- | print/cups-base/Makefile | 5 | ||||
-rw-r--r-- | print/cups-base/pkg-install | 30 | ||||
-rw-r--r-- | print/cups-base/pkg-plist | 3 |
3 files changed, 7 insertions, 31 deletions
diff --git a/print/cups-base/Makefile b/print/cups-base/Makefile index 4fed545e4eb6..2101c3f9759a 100644 --- a/print/cups-base/Makefile +++ b/print/cups-base/Makefile @@ -8,7 +8,7 @@ PORTNAME= cups PORTVERSION= 1.2.10 DISTVERSIONSUFFIX= -source -PORTREVISION= 0 +PORTREVISION= 1 CATEGORIES= print MASTER_SITES= EASYSW/${PORTNAME}/${DISTVERSION} PKGNAMESUFFIX= -base${PKGNAMESUFFIX2} @@ -144,6 +144,9 @@ post-patch: pre-install: @${INSTALL} -d ${DESKTOPDIR}/ + if ! pw groupshow ${CUPSGRP}; then pw groupadd ${CUPSGRP} -g 193; fi + if ! pw usershow ${CUPSOWN}; then pw useradd ${CUPSOWN} -g ${CUPSGRP} -u 193 \ + -h - -d ${NONEXISTENT} -s /usr/sbin/nologin -c "CUPS Owner"; fi post-install: ${INSTALL} -d ${CUPS_ETCDIR}/ diff --git a/print/cups-base/pkg-install b/print/cups-base/pkg-install index 98814ed9ff28..3e25b7ae4082 100644 --- a/print/cups-base/pkg-install +++ b/print/cups-base/pkg-install @@ -16,35 +16,5 @@ POST-INSTALL) [ -e "${FILE}" ] && chmod -h 0 "${FILE}" done fi - - # Create user - USER=cups - GROUP=${USER} - UID=193 - GID=${UID} - - 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 "CUPS Owner" - then - echo "Added user \"${USER}\"." - else - echo "Adding user \"${USER}\" failed..." - exit 1 - fi - fi ;; esac diff --git a/print/cups-base/pkg-plist b/print/cups-base/pkg-plist index a148de7481dc..bb9eed486055 100644 --- a/print/cups-base/pkg-plist +++ b/print/cups-base/pkg-plist @@ -1,3 +1,6 @@ +@exec if ! pw groupshow cups 2>/dev/null; then pw groupadd cups -g 193; fi +@exec if ! pw usershow cups 2>/dev/null; then pw useradd cups -g cups -u 193 -h - -d /nonexistent -s /usr/sbin/nologin -c "CUPS Owner"; fi +@unexec if pw usershow cups; then pw userdel cups; fi @exec mkdir -p /var/spool/cups/tmp || true @exec chown -R root:daemon /var/spool/cups @exec mkdir -p /var/cache/cups || true |