FreeBSD Bugzilla – Attachment 126191 Details for
Bug 169918
[PATCH] net-mgmt/nrpe2: Support USERS/GROUPS
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch-nrpe2-USERS-GROUPS.txt
patch-nrpe2-USERS-GROUPS.txt (text/plain), 3.41 KB, created by
Bryan Drewery
on 2012-07-16 21:50:12 UTC
(
hide
)
Description:
patch-nrpe2-USERS-GROUPS.txt
Filename:
MIME Type:
Creator:
Bryan Drewery
Created:
2012-07-16 21:50:12 UTC
Size:
3.41 KB
patch
obsolete
>diff -ur /usr/ports/net-mgmt/nrpe2.orig/Makefile ./Makefile >--- /usr/ports/net-mgmt/nrpe2.orig/Makefile 2012-07-16 15:37:21.000000000 -0500 >+++ ./Makefile 2012-07-16 15:42:12.000000000 -0500 >@@ -30,6 +30,8 @@ > NAGIOSUSER?= nagios > NAGIOSGROUP?= nagios > NAGIOSDIR?= /var/spool/nagios >+USERS= ${NAGIOSUSER} >+GROUPS= ${NAGIOSGROUP} > > NAGIOSUID= 181 > NAGIOSGID= ${NAGIOSUID} >diff -ur /usr/ports/net-mgmt/nrpe2.orig/files/pkg-deinstall.in ./files/pkg-deinstall.in >--- /usr/ports/net-mgmt/nrpe2.orig/files/pkg-deinstall.in 2012-07-16 15:37:21.000000000 -0500 >+++ ./files/pkg-deinstall.in 2012-07-16 15:42:08.000000000 -0500 >@@ -4,18 +4,8 @@ > # > > NAGIOSDIR=%%NAGIOSDIR%% >-NAGIOSUSER=%%NAGIOSUSER%% >-NAGIOSGROUP=%%NAGIOSGROUP%% > > if [ "$2" = "POST-DEINSTALL" ]; then >- if /usr/sbin/pw group show "${NAGIOSGROUP}" 2>&1 >/dev/null; then >- echo "You should manually remove the \"${NAGIOSGROUP}\" group." >- fi >- >- if /usr/sbin/pw user show "${NAGIOSUSER}" 2>&1 >/dev/null; then >- echo "You should manually remove the \"${NAGIOSUSER}\" user." >- fi >- > if [ -e "${NAGIOSDIR}" ]; then > echo "You should manually remove the \"${NAGIOSDIR}\" directory." > fi >diff -ur /usr/ports/net-mgmt/nrpe2.orig/files/pkg-install.in ./files/pkg-install.in >--- /usr/ports/net-mgmt/nrpe2.orig/files/pkg-install.in 2012-07-16 15:37:21.000000000 -0500 >+++ ./files/pkg-install.in 2012-07-16 15:39:12.000000000 -0500 >@@ -9,69 +9,7 @@ > NAGIOSUID=%%NAGIOSUID%% > NAGIOSGID=%%NAGIOSGID%% > >-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 default question answer >- >- question=$1 >- default=$2 >- while :; do >- answer=$(ask "${question}" "${default}") >- case "${answer}" in >- [Yy][Ee][Ss]|[Yy]) >- return 0 >- ;; >- [Nn][Oo]|[Nn]) >- return 1 >- ;; >- esac >- echo "Please answer yes or no." >- done >-} >- >-if [ "$2" = "PRE-INSTALL" ]; then >- if /usr/sbin/pw group show "${NAGIOSGROUP}" 2>&1 >/dev/null; then >- echo "You already have a \"${NAGIOSGROUP}\" group, so I will use it." >- else >- echo "You need a \"${NAGIOSGROUP}\" group." >- if yesno "Would you like me to create it" "YES"; then >- /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." >- exit 1 >- fi >- fi >- >- if /usr/sbin/pw user show "${NAGIOSUSER}" 2>&1 >/dev/null; then >- echo "You already have a \"${NAGIOSUSER}\" user, so I will use it." >- else >- echo "You need a \"${NAGIOSUSER}\" user." >- if yesno "Would you like me to create it" "YES"; then >- /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." >- exit 1 >- fi >- fi >-elif [ "$2" = "POST-INSTALL" ]; then >+if [ "$2" = "POST-INSTALL" ]; then > if [ ! -e "${NAGIOSDIR}" ]; then > /bin/mkdir -p "${NAGIOSDIR}" > /bin/chmod 775 "${NAGIOSDIR}"
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 169918
: 126191