diff options
Diffstat (limited to 'security/drweb-sendmail')
-rw-r--r-- | security/drweb-sendmail/Makefile | 3 | ||||
-rw-r--r-- | security/drweb-sendmail/pkg-deinstall | 22 | ||||
-rw-r--r-- | security/drweb-sendmail/pkg-install (renamed from security/drweb-sendmail/scripts/post-install) | 13 |
3 files changed, 34 insertions, 4 deletions
diff --git a/security/drweb-sendmail/Makefile b/security/drweb-sendmail/Makefile index 99a2ffb96119..0affc10fae0e 100644 --- a/security/drweb-sendmail/Makefile +++ b/security/drweb-sendmail/Makefile @@ -7,7 +7,7 @@ PORTNAME= drweb_sendmail PORTVERSION= 4.26 -PORTREVISION= 10 +PORTREVISION= 11 CATEGORIES= security mail MASTER_SITES= http://www.drweb.ru/ftp/web_pub/ DISTNAME= drwebd-${PORTVERSION}-freebsd4 @@ -120,6 +120,7 @@ do-install: fi post-install: + PKG_PREFIX=${PREFIX} ./pkg-install ${PKGNAME} POST-INSTALL @echo @${CAT} pkg-message @echo diff --git a/security/drweb-sendmail/pkg-deinstall b/security/drweb-sendmail/pkg-deinstall new file mode 100644 index 000000000000..fe71e9e62b5e --- /dev/null +++ b/security/drweb-sendmail/pkg-deinstall @@ -0,0 +1,22 @@ +#!/bin/sh +# $FreeBSD$ +# + +if [ "$2" != "POST-DEINSTALL" ]; then + exit 0 +fi + +USER=drweb +ex=0 + +if pw usershow "${USER}" 2>/dev/null 1>&2; then + if pw userdel ${USER}; then + echo "Delete user/group \"${USER}\"." + else + echo "Deleting user/group \"${USER}\" failed..." + ex=1 + fi +fi + +[ "$ex" = "1" ] && exit 1 +exit 0 diff --git a/security/drweb-sendmail/scripts/post-install b/security/drweb-sendmail/pkg-install index 5d88802e161c..fa61bd10429e 100644 --- a/security/drweb-sendmail/scripts/post-install +++ b/security/drweb-sendmail/pkg-install @@ -1,11 +1,18 @@ #!/bin/sh -ex=0 +# $FreeBSD$ +# + +if [ "$2" != "POST-INSTALL" ]; then + exit 0 +fi + USER=drweb GROUP=${USER} UID=426 GID=${UID} +ex=0 -if ! pw group show "${GROUP}" 2>/dev/null 1>&2; then +if ! pw groupshow "${GROUP}" 2>/dev/null 1>&2; then if pw groupadd ${GROUP} -g ${GID}; then echo "Added group \"${GROUP}\"." else @@ -14,7 +21,7 @@ if ! pw group show "${GROUP}" 2>/dev/null 1>&2; then fi fi -if ! pw user show "${USER}" 2>/dev/null 1>&2; then +if ! pw usershow "${USER}" 2>/dev/null 1>&2; then if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \ -s "/sbin/nologin" -d "/nonexistent" -c "Dr. Web Scanner" then |