mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-02 06:03:50 +00:00
- fix order for creation for user, groups and dirs.
PR: 113473
This commit is contained in:
parent
07ea87d52e
commit
bbe73c02e9
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=193042
@ -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}/
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user