FreeBSD Bugzilla – Attachment 135459 Details for
Bug 180336
[PATCH] sysutils/apcupsd: support multiple instances of apcupsd
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
patch.txt
patch.txt (text/plain), 1.26 KB, created by
Craig Leres
on 2013-07-05 23:30:00 UTC
(
hide
)
Description:
patch.txt
Filename:
MIME Type:
Creator:
Craig Leres
Created:
2013-07-05 23:30:00 UTC
Size:
1.26 KB
patch
obsolete
>--- files/apcupsd.in.orig 2013-07-05 14:16:30.000000000 -0700 >+++ files/apcupsd.in 2013-07-05 14:16:38.000000000 -0700 >@@ -11,8 +11,9 @@ > # > # apcupsd_enable (bool): Set to "NO" by default. > # Set it to "YES" to enable apcupsd. >-# apcupsd_args (str): Custom additional arguments to be passed >-# to apcupsd (default empty). >+# apcupsd_flags (str): Custom additional arguments to be passed >+# to apcupsd (default --kill-on-powerfail). >+# apcupsd_configs (str): A list of configs to run multiple instances. > # > > . /etc/rc.subr >@@ -24,11 +25,26 @@ > > : ${apcupsd_enable="NO"} > : ${apcupsd_flags="--kill-on-powerfail"} >-: ${apcupsd_pidfile="/var/run/apcupsd.pid"} >-: ${apcupsd_lockfile="/var/spool/lock/apcupsd.lock"} > > pidfile="/var/run/apcupsd.pid" >-required_files="%%ETCDIR%%/apcupsd.conf" >+required_files="${apcupsd_configs:-%%ETCDIR%%/apcupsd.conf}" > command="%%PREFIX%%/sbin/apcupsd" > >-run_rc_command "$1" >+case ${apcupsd_configs} in >+ >+'') >+ # One instance with the default config >+ run_rc_command "$1" >+ ;; >+ >+*) >+ # One or more instance >+ dn="`/usr/bin/dirname ${pidfile}`" >+ for config in ${apcupsd_configs}; do >+ base="`/usr/bin/basename ${config} .conf`" >+ pidfile="${dn}/${base}.pid" >+ command_args="-f ${config} -P ${pidfile}" >+ run_rc_command "$1" >+ done >+ ;; >+esac
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 Raw
Actions:
View
Attachments on
bug 180336
:
135459
|
144988
|
145176