diff options
author | Dirk Meyer <dinoex@FreeBSD.org> | 2007-06-08 13:57:13 +0000 |
---|---|---|
committer | Dirk Meyer <dinoex@FreeBSD.org> | 2007-06-08 13:57:13 +0000 |
commit | bbe73c02e9055c98d2d27b64b69cfdc2012a54df (patch) | |
tree | 6a322ede559795aa4e507e14e031639e43ec5fe0 /print/cups-base | |
parent | - update to 0.20 (diff) |
- fix order for creation for user, groups and dirs.
PR: 113473
Notes
Notes:
svn path=/head/; revision=193042
Diffstat (limited to 'print/cups-base')
-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 |