mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-25 00:51:21 +00:00
Switch from old way to new way by using USERS.
PR: ports/164187 Submitted by: crees
This commit is contained in:
parent
b427b0d251
commit
abcad0b093
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=297049
1
UIDs
1
UIDs
@ -173,6 +173,7 @@ distcc:*:561:561::0:0:Distcc user:/nonexistent:/usr/sbin/nologin
|
||||
polkit:*:562:562::0:0:PolicyKit User:/nonexistent:/usr/sbin/nologin
|
||||
pulse:*:563:563::0:0:PulseAudio System User:/nonexistent:/usr/sbin/nologin
|
||||
assp:*:587:587::0:0:ASSP Anti-Spam Proxy:/var/db/assp:/usr/sbin/nologin
|
||||
avahi-autoipd:*:588:588::0:0:Avahi Autoipd Daemon user:/nonexistent:/usr/sbin/nologin
|
||||
_xsi:*:600:600::0:0:XMLSysInfo User:/nonexistent:/usr/sbin/nologin
|
||||
_tss:*:601:601:daemon:0:0:TrouSerS user:/var/empty:/usr/sbin/nologin
|
||||
_pkcs11:*:602:602:daemon:0:0:opencryptoki user:/var/empty:/usr/sbin/nologin
|
||||
|
@ -23,6 +23,9 @@ LIB_DEPENDS?= expat.6:${PORTSDIR}/textproc/expat2 \
|
||||
gdbm.4:${PORTSDIR}/databases/gdbm
|
||||
RUN_DEPENDS?= g-ir-scanner:${PORTSDIR}/devel/gobject-introspection
|
||||
|
||||
USERS?= ${PORTNAME}
|
||||
GROUPS?= ${USERS}
|
||||
|
||||
USE_GNOME?= gnomehack ltverhack glib20 intltool
|
||||
USE_GETTEXT= yes
|
||||
USE_GNOME_SUBR= yes
|
||||
@ -170,8 +173,5 @@ avahi-post-install:
|
||||
${INSTALL_DATA} ${FILESDIR}/org.freedesktop.Avahi.service \
|
||||
${LOCALBASE}/share/dbus-1/system-services
|
||||
.endif
|
||||
.if !defined(PACKAGE_BUILDING) && (${AVAHI_SLAVE}=="no" || ${AVAHI_SLAVE}=="autoipd")
|
||||
@${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
|
||||
.endif
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
|
@ -1,36 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
case $2 in
|
||||
POST-INSTALL)
|
||||
USER=avahi
|
||||
GROUP=${USER}
|
||||
UID=558
|
||||
GID=${UID}
|
||||
PW=/usr/sbin/pw
|
||||
|
||||
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 "Avahi Daemon User"
|
||||
then
|
||||
echo "Added user \"${USER}\"."
|
||||
else
|
||||
echo "Adding user \"${USER}\" failed..."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
exit 0
|
||||
;;
|
||||
esac
|
@ -15,6 +15,9 @@ COMMENT= IPv4LL network address configuration daemon
|
||||
|
||||
LIB_DEPENDS= avahi-common.3:${PORTSDIR}/net/avahi-app
|
||||
|
||||
USERS= avahi-autoipd
|
||||
GROUPS= ${USERS}
|
||||
|
||||
MASTERDIR= ${.CURDIR}/../avahi-app
|
||||
BUILD_WRKSRC= ${WRKSRC}/avahi-autoipd
|
||||
INSTALL_WRKSRC= ${BUILD_WRKSRC}
|
||||
@ -25,6 +28,5 @@ AVAHI_SLAVE= autoipd
|
||||
|
||||
MAN8= avahi-autoipd.8
|
||||
USE_GNOME= gnomehack ltverhack intltool
|
||||
PKGINSTALL= ${.CURDIR}/pkg-install
|
||||
|
||||
.include "${MASTERDIR}/Makefile"
|
||||
|
@ -1,36 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
case $2 in
|
||||
POST-INSTALL)
|
||||
USER=avahi-autoipd
|
||||
GROUP=${USER}
|
||||
UID=588
|
||||
GID=${UID}
|
||||
PW=/usr/sbin/pw
|
||||
|
||||
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 "Avahi Autoipd Daemon User"
|
||||
then
|
||||
echo "Added user \"${USER}\"."
|
||||
else
|
||||
echo "Adding user \"${USER}\" failed..."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
exit 0
|
||||
;;
|
||||
esac
|
@ -1,36 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
case $2 in
|
||||
POST-INSTALL)
|
||||
USER=avahi-autoipd
|
||||
GROUP=${USER}
|
||||
UID=588
|
||||
GID=${UID}
|
||||
PW=/usr/sbin/pw
|
||||
|
||||
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 "Avahi Daemon User"
|
||||
then
|
||||
echo "Added user \"${USER}\"."
|
||||
else
|
||||
echo "Adding user \"${USER}\" failed..."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
exit 0
|
||||
;;
|
||||
esac
|
Loading…
Reference in New Issue
Block a user