1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-19 08:13:21 +00:00

- Use registered UID and GID. See UPDATING for migration.

PR:		ports/111345
Submitted by:	Jarrod Sayers <jarrod at netleader.com.au> (maintainer)
This commit is contained in:
Rong-En Fan 2007-04-07 14:25:48 +00:00
parent ab669e88f6
commit 4c6bb71802
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=189432
4 changed files with 26 additions and 4 deletions

View File

@ -7,6 +7,7 @@
PORTNAME= nagios
PORTVERSION= 2.8
PORTREVISION= 1
CATEGORIES= net-mgmt
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= nagios
@ -32,6 +33,9 @@ NAGIOSUSER?= nagios
NAGIOSGROUP?= nagios
NAGIOSDIR?= /var/spool/nagios
NAGIOSUID= 181
NAGIOSGID= ${NAGIOSUID}
NAGIOSWWWDIR?= www/nagios
NAGIOSHTMURL?= /nagios
NAGIOSCGIURL?= ${NAGIOSHTMURL}/cgi-bin
@ -74,6 +78,8 @@ PLIST_SUB= NAGIOSDIR=${NAGIOSDIR} \
NAGIOSWWWDIR=${NAGIOSWWWDIR} \
NAGIOSUSER=${NAGIOSUSER} \
NAGIOSGROUP=${NAGIOSGROUP} \
NAGIOSUID=${NAGIOSUID} \
NAGIOSGID=${NAGIOSGID} \
NAGIOSHTMURL=${NAGIOSHTMURL} \
NAGIOSCGIURL=${NAGIOSCGIURL} \
WWWGRP=${WWWGRP}

View File

@ -6,6 +6,8 @@
NAGIOSDIR=%%NAGIOSDIR%%
NAGIOSUSER=%%NAGIOSUSER%%
NAGIOSGROUP=%%NAGIOSGROUP%%
NAGIOSUID=%%NAGIOSUID%%
NAGIOSGID=%%NAGIOSGID%%
ask() {
local question default answer
@ -46,7 +48,8 @@ if [ "$2" = "PRE-INSTALL" ]; then
else
echo "You need a \"${NAGIOSGROUP}\" group."
if yesno "Would you like me to create it" "YES"; then
/usr/sbin/pw groupadd "${NAGIOSGROUP}" -h - || exit
/usr/sbin/pw groupadd "${NAGIOSGROUP}" -g "${NAGIOSGID}" -h - || \
/usr/sbin/pw groupadd "${NAGIOSGROUP}" -h - || exit
echo "Done."
else
echo "Please create the \"${NAGIOSGROUP}\" group manually and try again."
@ -59,7 +62,9 @@ if [ "$2" = "PRE-INSTALL" ]; then
else
echo "You need a \"${NAGIOSUSER}\" user."
if yesno "Would you like me to create it" "YES"; then
/usr/sbin/pw useradd "${NAGIOSUSER}" -g "${NAGIOSGROUP}" -h - -d "${NAGIOSDIR}" \
/usr/sbin/pw useradd "${NAGIOSUSER}" -u "${NAGIOSUID}" -g "${NAGIOSGROUP}" -h - -d "${NAGIOSDIR}" \
-s /sbin/nologin -c "Nagios pseudo-user" || \
/usr/sbin/pw useradd "${NAGIOSUSER}" -g "${NAGIOSGROUP}" -h - -d "${NAGIOSDIR}" \
-s /sbin/nologin -c "Nagios pseudo-user" || exit
else
echo "Please create the \"${NAGIOSUSER}\" user manually and try again."

View File

@ -7,6 +7,7 @@
PORTNAME= nagios
PORTVERSION= 2.8
PORTREVISION= 1
CATEGORIES= net-mgmt
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= nagios
@ -32,6 +33,9 @@ NAGIOSUSER?= nagios
NAGIOSGROUP?= nagios
NAGIOSDIR?= /var/spool/nagios
NAGIOSUID= 181
NAGIOSGID= ${NAGIOSUID}
NAGIOSWWWDIR?= www/nagios
NAGIOSHTMURL?= /nagios
NAGIOSCGIURL?= ${NAGIOSHTMURL}/cgi-bin
@ -74,6 +78,8 @@ PLIST_SUB= NAGIOSDIR=${NAGIOSDIR} \
NAGIOSWWWDIR=${NAGIOSWWWDIR} \
NAGIOSUSER=${NAGIOSUSER} \
NAGIOSGROUP=${NAGIOSGROUP} \
NAGIOSUID=${NAGIOSUID} \
NAGIOSGID=${NAGIOSGID} \
NAGIOSHTMURL=${NAGIOSHTMURL} \
NAGIOSCGIURL=${NAGIOSCGIURL} \
WWWGRP=${WWWGRP}

View File

@ -6,6 +6,8 @@
NAGIOSDIR=%%NAGIOSDIR%%
NAGIOSUSER=%%NAGIOSUSER%%
NAGIOSGROUP=%%NAGIOSGROUP%%
NAGIOSUID=%%NAGIOSUID%%
NAGIOSGID=%%NAGIOSGID%%
ask() {
local question default answer
@ -46,7 +48,8 @@ if [ "$2" = "PRE-INSTALL" ]; then
else
echo "You need a \"${NAGIOSGROUP}\" group."
if yesno "Would you like me to create it" "YES"; then
/usr/sbin/pw groupadd "${NAGIOSGROUP}" -h - || exit
/usr/sbin/pw groupadd "${NAGIOSGROUP}" -g "${NAGIOSGID}" -h - || \
/usr/sbin/pw groupadd "${NAGIOSGROUP}" -h - || exit
echo "Done."
else
echo "Please create the \"${NAGIOSGROUP}\" group manually and try again."
@ -59,7 +62,9 @@ if [ "$2" = "PRE-INSTALL" ]; then
else
echo "You need a \"${NAGIOSUSER}\" user."
if yesno "Would you like me to create it" "YES"; then
/usr/sbin/pw useradd "${NAGIOSUSER}" -g "${NAGIOSGROUP}" -h - -d "${NAGIOSDIR}" \
/usr/sbin/pw useradd "${NAGIOSUSER}" -u "${NAGIOSUID}" -g "${NAGIOSGROUP}" -h - -d "${NAGIOSDIR}" \
-s /sbin/nologin -c "Nagios pseudo-user" || \
/usr/sbin/pw useradd "${NAGIOSUSER}" -g "${NAGIOSGROUP}" -h - -d "${NAGIOSDIR}" \
-s /sbin/nologin -c "Nagios pseudo-user" || exit
else
echo "Please create the \"${NAGIOSUSER}\" user manually and try again."