diff options
author | dougb <dougb@FreeBSD.org> | 2009-07-16 00:56:10 +0800 |
---|---|---|
committer | dougb <dougb@FreeBSD.org> | 2009-07-16 00:56:10 +0800 |
commit | 494e64d35476b3d777e09b5c75c7f56d18f6f1a4 (patch) | |
tree | c74b2ceb9536b8f2ceb137209a5ae5643148edde /net-mgmt | |
parent | 5df5244832441b2891d52b6e4692f7826550fbf9 (diff) | |
download | freebsd-ports-gnome-494e64d35476b3d777e09b5c75c7f56d18f6f1a4.tar.gz freebsd-ports-gnome-494e64d35476b3d777e09b5c75c7f56d18f6f1a4.tar.zst freebsd-ports-gnome-494e64d35476b3d777e09b5c75c7f56d18f6f1a4.zip |
Fix a few "bad example" problems in the rc.d scripts that have been
propogated by copy and paste.
1. Primarily the "empty variable" default assignment, which is mostly
${name}_flags="", but fix a few others as well.
2. Where they are not already documented, add the existence of the _flags
(or other deleted empties) option to the comments, and in some cases add
comments from scratch.
3. Replace things that look like:
prefix=%%PREFIX%%
command=${prefix}/sbin/foo
to just use %%PREFIX%%. In many cases the $prefix variable is only used
once, and in some cases it is not used at all.
4. In a few cases remove ${name}_flags from command_args
5. Remove a long-stale comment about putting the port's rc.d script in
/etc/rc.d (which is no longer necessary).
No PORTREVISION bumps because all of these changes are noops.
Diffstat (limited to 'net-mgmt')
22 files changed, 15 insertions, 37 deletions
diff --git a/net-mgmt/collectd/files/collectd.in b/net-mgmt/collectd/files/collectd.in index 0dd6c3f38847..90abfad43a4d 100644 --- a/net-mgmt/collectd/files/collectd.in +++ b/net-mgmt/collectd/files/collectd.in @@ -22,6 +22,5 @@ command=%%PREFIX%%/sbin/${name} load_rc_config $name : ${collectd_enable="NO"} -: ${collectd_flags=""} run_rc_command "$1" diff --git a/net-mgmt/collectd5/files/collectd.in b/net-mgmt/collectd5/files/collectd.in index 0dd6c3f38847..90abfad43a4d 100644 --- a/net-mgmt/collectd5/files/collectd.in +++ b/net-mgmt/collectd5/files/collectd.in @@ -22,6 +22,5 @@ command=%%PREFIX%%/sbin/${name} load_rc_config $name : ${collectd_enable="NO"} -: ${collectd_flags=""} run_rc_command "$1" diff --git a/net-mgmt/darkstat/files/darkstat.in b/net-mgmt/darkstat/files/darkstat.in index 616992b82dfc..704618f495e1 100644 --- a/net-mgmt/darkstat/files/darkstat.in +++ b/net-mgmt/darkstat/files/darkstat.in @@ -42,7 +42,6 @@ load_rc_config $name : ${darkstat_dir="/var/run/darkstat"} : ${darkstat_pidname="darkstat.pid"} : ${darkstat_dropuser="nobody"} -: ${darkstat_flags=""} pidfile="${darkstat_dir}/${darkstat_pidname}" darkstat_prestart() diff --git a/net-mgmt/flow-tools-ng/files/flow_fanout.in b/net-mgmt/flow-tools-ng/files/flow_fanout.in index 1d1369989fd9..1d9ec7ff1116 100644 --- a/net-mgmt/flow-tools-ng/files/flow_fanout.in +++ b/net-mgmt/flow-tools-ng/files/flow_fanout.in @@ -83,7 +83,6 @@ load_rc_config $name : ${flow_fanout_pid="%%FLOW_CAPTURE_PIDDIR%%/flow-fanout.pid"} : ${flow_fanout_user="flowtools"} : ${flow_fanout_group="flowtools"} -: ${flow_fanout_flags=""} pidfile="${flow_fanout_pid}.${flow_fanout_port}" diff --git a/net-mgmt/flow-tools/files/flow_fanout.in b/net-mgmt/flow-tools/files/flow_fanout.in index 1d1369989fd9..1d9ec7ff1116 100644 --- a/net-mgmt/flow-tools/files/flow_fanout.in +++ b/net-mgmt/flow-tools/files/flow_fanout.in @@ -83,7 +83,6 @@ load_rc_config $name : ${flow_fanout_pid="%%FLOW_CAPTURE_PIDDIR%%/flow-fanout.pid"} : ${flow_fanout_user="flowtools"} : ${flow_fanout_group="flowtools"} -: ${flow_fanout_flags=""} pidfile="${flow_fanout_pid}.${flow_fanout_port}" diff --git a/net-mgmt/ipacctd/files/ipacctd.sh.in b/net-mgmt/ipacctd/files/ipacctd.sh.in index 09ab801da009..e48a21cc7075 100644 --- a/net-mgmt/ipacctd/files/ipacctd.sh.in +++ b/net-mgmt/ipacctd/files/ipacctd.sh.in @@ -113,7 +113,5 @@ status_cmd() load_rc_config $name : ${ipacctd_enable="NO"} -: ${ipacctd_rules=""} -: ${ipacctd_flags=""} run_rc_command "$1" diff --git a/net-mgmt/ipcad/files/ipcad.in b/net-mgmt/ipcad/files/ipcad.in index 0e459f0ca7f3..6285dfd85881 100644 --- a/net-mgmt/ipcad/files/ipcad.in +++ b/net-mgmt/ipcad/files/ipcad.in @@ -11,7 +11,7 @@ # Default is "NO". # ipcad_conf (file): Set local of config file. # Default is "%%PREFIX%%/etc/ipcad.conf". -# +# ipcad_flags="<set as needed>" . %%RC_SUBR%% @@ -22,7 +22,6 @@ load_rc_config ${name} : ${ipcad_enable="NO"} : ${ipcad_conf="%%PREFIX%%/etc/ipcad.conf"} -: ${ipcad_flags=""} required_files="${ipcad_conf}" command=%%PREFIX%%/bin/ipcad diff --git a/net-mgmt/macroscope/files/macroscope.in b/net-mgmt/macroscope/files/macroscope.in index ffb0f9879b16..82f0f66c56f7 100644 --- a/net-mgmt/macroscope/files/macroscope.in +++ b/net-mgmt/macroscope/files/macroscope.in @@ -20,8 +20,6 @@ name="macroscope" rcvar=$(set_rcvar) -prefix="%%PREFIX%%" - start_precmd() { return 0 diff --git a/net-mgmt/nagios-devel/files/nagios.sh.in b/net-mgmt/nagios-devel/files/nagios.sh.in index 52232e296618..719db899652a 100644 --- a/net-mgmt/nagios-devel/files/nagios.sh.in +++ b/net-mgmt/nagios-devel/files/nagios.sh.in @@ -34,7 +34,6 @@ reload_precmd="nagios_checkconfig" sig_reload=HUP [ -z "${nagios_enable}" ] && nagios_enable="NO" -[ -z "${nagios_flags}" ] && nagios_flags="" [ -z "${nagios_configfile}" ] && nagios_configfile="%%PREFIX%%/etc/nagios/nagios.cfg" load_rc_config "${name}" diff --git a/net-mgmt/nagios/files/nagios.in b/net-mgmt/nagios/files/nagios.in index e1afec9ced54..33356a0ee3fa 100644 --- a/net-mgmt/nagios/files/nagios.in +++ b/net-mgmt/nagios/files/nagios.in @@ -34,7 +34,6 @@ reload_precmd="nagios_checkconfig" sig_reload=HUP [ -z "${nagios_enable}" ] && nagios_enable="NO" -[ -z "${nagios_flags}" ] && nagios_flags="" [ -z "${nagios_configfile}" ] && nagios_configfile="%%PREFIX%%/etc/nagios/nagios.cfg" load_rc_config "${name}" diff --git a/net-mgmt/nagios2/files/nagios.in b/net-mgmt/nagios2/files/nagios.in index 05939dd03523..fc7176bc030a 100644 --- a/net-mgmt/nagios2/files/nagios.in +++ b/net-mgmt/nagios2/files/nagios.in @@ -1,6 +1,6 @@ #!/bin/sh # -# $FreeBSD: /tmp/pcvs/ports/net-mgmt/nagios2/files/Attic/nagios.in,v 1.1 2008-09-03 00:30:56 pgollucci Exp $ +# $FreeBSD: /tmp/pcvs/ports/net-mgmt/nagios2/files/Attic/nagios.in,v 1.2 2009-07-15 16:55:58 dougb Exp $ # # PROVIDE: nagios @@ -34,7 +34,6 @@ reload_precmd="nagios_checkconfig" sig_reload=HUP [ -z "${nagios_enable}" ] && nagios_enable="NO" -[ -z "${nagios_flags}" ] && nagios_flags="" [ -z "${nagios_configfile}" ] && nagios_configfile="%%PREFIX%%/etc/nagios/nagios.cfg" load_rc_config "${name}" diff --git a/net-mgmt/nagircbot/files/nagircbot.in b/net-mgmt/nagircbot/files/nagircbot.in index 940d69b0e383..0590d93d34b7 100644 --- a/net-mgmt/nagircbot/files/nagircbot.in +++ b/net-mgmt/nagircbot/files/nagircbot.in @@ -9,6 +9,7 @@ # Add the following lines to /etc/rc.conf to enable nagircbot: # # nagircbot_enable="YES" +# nagircbot_flags="<set as needed>" # # You must configure at least some flags to make it connect to a server. See -h. # @@ -25,7 +26,6 @@ command_args="-P $pidfile -z nagios" # set defaults nagircbot_enable=${nagircbot_enable:-"NO"} -nagircbot_flags=${nagircbot_flags:-""} load_rc_config ${name} run_rc_command "$1" diff --git a/net-mgmt/net-snmp-devel/files/snmpd.sh.in b/net-mgmt/net-snmp-devel/files/snmpd.sh.in index 0af14f41a7b0..6c17673ec5fe 100644 --- a/net-mgmt/net-snmp-devel/files/snmpd.sh.in +++ b/net-mgmt/net-snmp-devel/files/snmpd.sh.in @@ -1,6 +1,6 @@ #!/bin/sh # -# $FreeBSD: /tmp/pcvs/ports/net-mgmt/net-snmp-devel/files/Attic/snmpd.sh.in,v 1.7 2007-10-27 07:20:34 kuriyama Exp $ +# $FreeBSD: /tmp/pcvs/ports/net-mgmt/net-snmp-devel/files/Attic/snmpd.sh.in,v 1.8 2009-07-15 16:55:58 dougb Exp $ # # PROVIDE: snmpd # REQUIRE: DAEMON @@ -8,10 +8,10 @@ # Add the following line to /etc/rc.conf to enable snmpd: # # snmpd_enable="YES" +# snmpd_flags="<set as needed>" # snmpd_enable=${snmpd_enable-"NO"} -snmpd_flags=${snmpd_flags-""} snmpd_pidfile=${snmpd_pidfile-"/var/run/snmpd.pid"} snmpd_conffile=${snmpd_conffile-""} snmpd_flush_cache=${snmpd_flush_cache-"NO"} diff --git a/net-mgmt/net-snmp/files/snmpd.sh.in b/net-mgmt/net-snmp/files/snmpd.sh.in index 9b7403fff268..8c72326f3e60 100644 --- a/net-mgmt/net-snmp/files/snmpd.sh.in +++ b/net-mgmt/net-snmp/files/snmpd.sh.in @@ -8,10 +8,10 @@ # Add the following line to /etc/rc.conf to enable snmpd: # # snmpd_enable="YES" +# snmpd_flags="<set as needed>" # snmpd_enable=${snmpd_enable-"NO"} -snmpd_flags=${snmpd_flags-""} snmpd_pidfile=${snmpd_pidfile-"/var/run/snmpd.pid"} snmpd_conffile=${snmpd_conffile-""} snmpd_flush_cache=${snmpd_flush_cache-"NO"} diff --git a/net-mgmt/ng_ipacct/files/ng_ipacct.sh.in b/net-mgmt/ng_ipacct/files/ng_ipacct.sh.in index 9683fcd976c0..585a985d3b9d 100644 --- a/net-mgmt/ng_ipacct/files/ng_ipacct.sh.in +++ b/net-mgmt/ng_ipacct/files/ng_ipacct.sh.in @@ -18,7 +18,8 @@ # # Add the following line to enable `ng_ipacct': # -#ng_ipacct_enable="YES" +# ng_ipacct_enable="YES" +# ng_ipacct_flags="<set as needed>" # # See %%PREFIX%%/etc/ng_ipacct.conf for futher reference. @@ -189,6 +190,5 @@ fi load_rc_config $name : ${ng_ipacct_enable="NO"} -: ${ng_ipacct_flags=""} run_rc_command "$1" diff --git a/net-mgmt/nrpe2/files/nrpe2.in b/net-mgmt/nrpe2/files/nrpe2.in index 8cde7252158b..ba500160fe10 100644 --- a/net-mgmt/nrpe2/files/nrpe2.in +++ b/net-mgmt/nrpe2/files/nrpe2.in @@ -28,7 +28,6 @@ extra_commands="reload" sig_reload=HUP [ -z "${nrpe2_enable}" ] && nrpe2_enable="NO" -[ -z "${nrpe2_flags}" ] && nrpe2_flags="" [ -z "${nrpe2_configfile}" ] && nrpe2_configfile="%%PREFIX%%/etc/nrpe.cfg" [ -z "${nrpe2_pidfile}" ] && nrpe2_pidfile="%%NAGIOSDIR%%/nrpe2.pid" diff --git a/net-mgmt/openlldp/files/lldpd.in b/net-mgmt/openlldp/files/lldpd.in index 3c003a699300..81320ebe5e2b 100644 --- a/net-mgmt/openlldp/files/lldpd.in +++ b/net-mgmt/openlldp/files/lldpd.in @@ -27,7 +27,6 @@ command_args=">/dev/null 2>/dev/null &" # set defaults lldpd_enable=${lldpd_enable:-"NO"} -lldpd_flags=${lldpd_flags:-""} load_rc_config $name run_rc_command "$1" diff --git a/net-mgmt/openvmps/files/vmpsd.sh b/net-mgmt/openvmps/files/vmpsd.sh index 131bcd845d28..d11753110e01 100644 --- a/net-mgmt/openvmps/files/vmpsd.sh +++ b/net-mgmt/openvmps/files/vmpsd.sh @@ -6,12 +6,6 @@ # PROVIDE: vmpsd # REQUIRE: DAEMON # KEYWORD: shutdown -# -# NOTE for FreeBSD 5.0+: -# If you want this script to start with the base rc scripts -# move imapd.sh to /etc/rc.d/vmpsd - -prefix=%%PREFIX%% # Define these vmpsd_* variables in one of these files: # /etc/rc.conf @@ -21,14 +15,14 @@ prefix=%%PREFIX%% # DO NOT CHANGE THESE DEFAULT VALUES HERE # [ -z "$vmpsd_enable" ] && vmpsd_enable="NO" # Enable vmpsd -#vmpsd_program="${prefix}/sbin/vmpsd" # Location of vmpsd +#vmpsd_program="%%PREFIX%%/sbin/vmpsd" # Location of vmpsd [ -z "$vmpsd_flags" ] && vmpsd_flags="-f /usr/local/etc/vmps.db" # Flags to vmpsd program . %%RC_SUBR%% name="vmpsd" rcvar=`set_rcvar` -command="${prefix}/sbin/${name}" +command="%%PREFIX%%/sbin/${name}" load_rc_config $name run_rc_command "$1" diff --git a/net-mgmt/pnp/files/npcd.sh.in b/net-mgmt/pnp/files/npcd.sh.in index 94369f3b572f..f58cda03e4de 100644 --- a/net-mgmt/pnp/files/npcd.sh.in +++ b/net-mgmt/pnp/files/npcd.sh.in @@ -26,7 +26,6 @@ command_args="-d" pidfile=/var/run/${name}.pid : ${npcd_enable="NO"} -: ${npcd_flags=""} : ${npcd_configfile:="%%PREFIX%%/etc/pnp/npcd.cfg"} load_rc_config "${name}" diff --git a/net-mgmt/rrdbot/files/rrdbot.in b/net-mgmt/rrdbot/files/rrdbot.in index 07e586852360..8562d7d4f25b 100644 --- a/net-mgmt/rrdbot/files/rrdbot.in +++ b/net-mgmt/rrdbot/files/rrdbot.in @@ -26,11 +26,10 @@ load_rc_config $name : ${rrdbot_enable="NO"} : ${rrdbot_pidfile="/var/run/rrdbotd.pid"} -: ${rrdbot_flags=""} pidfile="${rrdbot_pidfile}" command="%%PREFIX%%/sbin/rrdbotd" -command_args="-p ${rrdbot_pidfile} ${rrdbot_flags}" +command_args="-p ${rrdbot_pidfile}" run_rc_command "$1" diff --git a/net-mgmt/smokeping/files/smokeping.in b/net-mgmt/smokeping/files/smokeping.in index d0691abe442e..a6504a5ddd8d 100644 --- a/net-mgmt/smokeping/files/smokeping.in +++ b/net-mgmt/smokeping/files/smokeping.in @@ -12,8 +12,9 @@ # # DO NOT CHANGE THESE DEFAULT VALUES HERE # +# smokeping_flags="<set as needed>" + smokeping_enable=${smokeping_enable-"NO"} -smokeping_flags=${smokeping_flags-""} smokeping_pidfile=${smokeping_pidfile-"%%PREFIX%%/var/smokeping/smokeping.pid"} smokeping_logfile=${smokeping_logfile-"/var/log/smokeping.log"} smokeping_user=${smokeping_user-"%%USER%%"} diff --git a/net-mgmt/snmptt/files/snmptt.sh.in b/net-mgmt/snmptt/files/snmptt.sh.in index 45596202bba5..d34b6dee0d5e 100644 --- a/net-mgmt/snmptt/files/snmptt.sh.in +++ b/net-mgmt/snmptt/files/snmptt.sh.in @@ -9,7 +9,8 @@ # # Add the following lines to /etc/rc.conf to enable snmptt: # -#snmptt_enable="YES" +# snmptt_enable="YES" +# snmptt_flags="<set as needed>" # # See snmptt documentation for flags. # @@ -31,7 +32,6 @@ required_files=%%PREFIX%%/etc/snmp/${name}.ini # set defaults snmptt_enable=${snmptt_enable:-"NO"} -snmptt_flags=${snmptt_flags:-""} stop_postcmd=stop_postcmd |