Skip to content

Commit

Permalink
Suggest NUT_QUIET_INIT_UPSNOTIFY=true in sample init-scripts [#2136]
Browse files Browse the repository at this point in the history
Signed-off-by: Jim Klimov <[email protected]>
  • Loading branch information
jimklimov committed Oct 29, 2023
1 parent d0a8c8a commit b8699df
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 1 deletion.
3 changes: 3 additions & 0 deletions scripts/Aix/nut.init.in
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ NUTUSER="@RUN_AS_USER@"
NUTGROUP="@RUN_AS_GROUP@"
NUT_VAR_LOCK="/var/locks/ups"

NUT_QUIET_INIT_UPSNOTIFY=true
export NUT_QUIET_INIT_UPSNOTIFY

if [ -f "$CONFIG" ] ; then
. "$CONFIG"

Expand Down
3 changes: 3 additions & 0 deletions scripts/HP-UX/nut-drvctl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ umask 022
PATH=/usr/sbin:/usr/bin:/sbin
export PATH

NUT_QUIET_INIT_UPSNOTIFY=true
export NUT_QUIET_INIT_UPSNOTIFY

WHAT='NUT UPS driver (Network UPS Tools -- http://www.exploits.org/nut)'
WHAT_PATH=/opt/nut/bin/upsdrvctl
WHAT_CONFIG=/etc/rc.config.d/nut-drvctl
Expand Down
3 changes: 3 additions & 0 deletions scripts/HP-UX/nut-upsd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ umask 022
PATH=/usr/sbin:/usr/bin:/sbin
export PATH

NUT_QUIET_INIT_UPSNOTIFY=true
export NUT_QUIET_INIT_UPSNOTIFY

WHAT='NUT UPS daemon (Network UPS Tools -- http://www.exploits.org/nut)'
WHAT_PATH=/opt/nut/sbin/upsd
WHAT_CONFIG=/etc/rc.config.d/nut-upsd
Expand Down
3 changes: 3 additions & 0 deletions scripts/HP-UX/nut-upsmon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ umask 022
PATH=/usr/sbin:/usr/bin:/sbin
export PATH

NUT_QUIET_INIT_UPSNOTIFY=true
export NUT_QUIET_INIT_UPSNOTIFY

WHAT='NUT UPS monitor (Network UPS Tools -- http://www.exploits.org/nut)'
WHAT_PATH=/opt/nut/sbin/upsmon
WHAT_CONFIG=/etc/rc.config.d/nut-upsmon
Expand Down
3 changes: 3 additions & 0 deletions scripts/RedHat/upsd.in
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ fi
# if there are no config file, bail out
[ -f "$UPSDCONF" ] && [ -f "$UPSCONF" ] || exit 0

NUT_QUIET_INIT_UPSNOTIFY=true
export NUT_QUIET_INIT_UPSNOTIFY

runcmd() {
echo -n "$1 "
shift
Expand Down
3 changes: 3 additions & 0 deletions scripts/RedHat/upsmon.in
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ if [ -n "$NUT_SBINDIR" -a -d "$NUT_SBINDIR" ]; then
PATH="$NUT_SBINDIR:$PATH"
fi

NUT_QUIET_INIT_UPSNOTIFY=true
export NUT_QUIET_INIT_UPSNOTIFY

# See how we are called.
case "$1" in
start)
Expand Down
4 changes: 4 additions & 0 deletions scripts/Solaris/nut.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ NUT_SBIN_DIR="${NUT_DIR}/sbin"
NUT_LIB_DIR="${NUT_DIR}/lib"
CONFIG="@CONFPATH@/nut.conf"

# We anticipate some tighter integration with SMF later:
#NUT_QUIET_INIT_UPSNOTIFY=true
#export NUT_QUIET_INIT_UPSNOTIFY

if [ -f "$CONFIG" ] ; then
. "$CONFIG"
fi
Expand Down
4 changes: 4 additions & 0 deletions scripts/Solaris/svc-nut-monitor.in
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ CONFIG="@CONFPATH@/nut.conf"
NUTUSER="@RUN_AS_USER@"
NUTGROUP="@RUN_AS_GROUP@"

# We anticipate some tighter integration with SMF later:
#NUT_QUIET_INIT_UPSNOTIFY=true
#export NUT_QUIET_INIT_UPSNOTIFY

if [ -f "$CONFIG" ] ; then
. "$CONFIG"
fi
Expand Down
4 changes: 4 additions & 0 deletions scripts/Solaris/svc-nut-server.in
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ NUTGROUP="`svcprop -p nut/NUTGROUP $SMF_FMRI`" \
&& [ -n "$NUTGROUP" ] \
|| NUTGROUP="@RUN_AS_GROUP@"

# We anticipate some tighter integration with SMF later:
#NUT_QUIET_INIT_UPSNOTIFY=true
#export NUT_QUIET_INIT_UPSNOTIFY

if [ -f "$CONFIG" ] ; then
. "$CONFIG"
fi
Expand Down
5 changes: 4 additions & 1 deletion scripts/Solaris8/S99upsmon
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ export PATH

UPSDPATH=/usr/local/ups/sbin

NUT_QUIET_INIT_UPSNOTIFY=true
export NUT_QUIET_INIT_UPSNOTIFY

# See how we are called.
case "$1" in
'start')
Expand All @@ -19,7 +22,7 @@ case "$1" in
$UPSDPATH/upsmon >/dev/console 2>&1
touch /var/lock/subsys/upsmon
fi
;;
;;
'stop')
echo "NUT Stopping UPS monitor "
/usr/bin/pkill -x upsmon
Expand Down

0 comments on commit b8699df

Please sign in to comment.