--- files/pkg-install.in 2010-02-07 21:34:20.000000000 +0100 +++ /dev/null 2010-06-17 20:11:00.000000000 +0200 @@ -1,65 +0,0 @@ -#!/bin/sh - -user=saned -group=saned - -ask() { - local question default answer - - question=$1 - default=$2 - if [ -z "${PACKAGE_BUILDING}" ]; then - read -p "${question} [${default}]? " answer - fi - if [ x${answer} = x ]; then - answer=${default} - fi - echo ${answer} -} - -yesno() { - local dflt question answer - - question=$1 - dflt=$2 - while :; do - answer=$(ask "${question}" "${dflt}") - case "${answer}" in - [Yy]*) return 0;; - [Nn]*) return 1;; - esac - echo "Please answer yes or no." - done -} - -if [ x"$2" = xPRE-INSTALL ]; then - if /usr/sbin/pw groupshow "${group}" 2>/dev/null; then - echo "You already have a group \"${group}\", so I will use it." - else - echo "You need a group \"${group}\"." - if ([ -n "$BATCH" ] || yesno "Would you like me to create it" y); then - /usr/sbin/pw groupadd ${group} -g 194 -h - || exit - echo "Done." - else - echo "Please create it, and try again." - exit 1 - fi - fi - - if /usr/sbin/pw user show "${user}" 2>/dev/null; then - echo "You already have a user \"${user}\", so I will use it." - pw usermod "${user}" -d /nonexistent - else - echo "You need a user \"${user}\"." - if ([ -n "$BATCH" ] || yesno "Would you like me to create it" y); then - /usr/sbin/pw useradd ${user} -u 194 -g ${group} -h - \ - -d /nonexistent -s /bin/sh -c "SANE Scanner Daemon" || exit - echo "Done." - else - echo "Please create it, and try again." - exit 1 - fi - fi - - # TODO: Fix logging. -fi --- /usr/ports/GIDs.orig 2010-06-17 20:17:01.000000000 +0200 +++ /usr/ports/GIDs 2010-06-17 20:17:14.000000000 +0200 @@ -82,6 +82,7 @@ noc:*:182: moinmoin:*:192: cups:*:193: +saned:*:194: sympa:*:200: dspam:*:202: git:*:211: --- /usr/ports/UIDs.orig 2010-06-17 20:18:22.000000000 +0200 +++ /usr/ports/UIDs 2010-06-17 20:18:42.000000000 +0200 @@ -90,6 +90,7 @@ noc:*:182:182::0:0:NOC pseudo-user:/usr/local/noc:/bin/sh moinmoin:*:192:192::0:0:MoinMoin User:/nonexistent:/usr/sbin/nologin cups:*:193:193::0:0:Cups Owner:/nonexistent:/usr/sbin/nologin +saned:*:194:194::0:0:SANE Scanner Daemon:/nonexistent:/bin/sh sympa:*:200:200::0:0:Sympa Owner:/nonexistent:/usr/sbin/nologin privoxy:*:201:201::0:0:Privoxy proxy user:/nonexistent:/usr/sbin/nologin dspam:*:202:202::0:0:Dspam:/nonexistent:/usr/sbin/nologin --- Makefile.orig 2010-06-17 20:09:35.000000000 +0200 +++ Makefile 2010-06-17 20:20:56.000000000 +0200 @@ -42,7 +42,10 @@ USE_LDCONFIG= yes USE_RC_SUBR= saned -SUB_FILES+= pkg-install pkg-message +SUB_FILES+= pkg-message + +USERS= saned +GROUPS= saned .include "Makefile.man" .include @@ -95,10 +98,6 @@ s|-lpthread|${PTHREAD_LIBS}|g' ${WRKSRC}/configure @(cd ${WRKSRC}/po; ${BASENAME} -s .po `${LS} *.po` > LINGUAS) -# Pass BATCH to pkg-install for Evil Things(tm) -pre-install: - @BATCH="${BATCH}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL - post-install: @${CAT} ${PKGMESSAGE}