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 /dns | |
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 'dns')
-rw-r--r-- | dns/dns_balance/files/dns_balance.sh.in | 5 | ||||
-rw-r--r-- | dns/nsd2/files/nsd.sh.in | 10 | ||||
-rw-r--r-- | dns/powerdns-devel/files/pdns-devel.in | 4 | ||||
-rw-r--r-- | dns/powerdns-recursor/files/pdns-recursor.in | 4 | ||||
-rw-r--r-- | dns/powerdns/files/pdns.in | 4 | ||||
-rw-r--r-- | dns/totd/files/totd.in | 13 |
6 files changed, 17 insertions, 23 deletions
diff --git a/dns/dns_balance/files/dns_balance.sh.in b/dns/dns_balance/files/dns_balance.sh.in index 1dbe5dd7f01f..e7add698b4bb 100644 --- a/dns/dns_balance/files/dns_balance.sh.in +++ b/dns/dns_balance/files/dns_balance.sh.in @@ -5,6 +5,10 @@ # PROVIDE: dns_balance # REQUIRE: DAEMON +# Add the following line to /etc/rc.conf to enable dns_balance +# dns_balance_enable="YES" +# dns_balance_flags="<set as needed>" + . %%RC_SUBR%% name=dns_balance @@ -14,7 +18,6 @@ load_rc_config ${name} : ${dns_balance_enable="NO"} : ${dns_balance_logfile="/var/log/${name}.log"} : ${dns_balance_pidfile="/var/log/${name}.pid"} -: ${dns_balance_flags=""} command="%%PREFIX%%/sbin/${name}" command_args="-l ${dns_balance_logfile} -p ${dns_balance_pidfile}" diff --git a/dns/nsd2/files/nsd.sh.in b/dns/nsd2/files/nsd.sh.in index da99a593d964..b8e2881047e0 100644 --- a/dns/nsd2/files/nsd.sh.in +++ b/dns/nsd2/files/nsd.sh.in @@ -5,27 +5,25 @@ # PROVIDE: nsd # REQUIRE: DAEMON # -# Add the following line to /etc/rc.conf to enable nsd: +# Add the following lines to /etc/rc.conf to enable nsd: # # nsd_enable="YES" -# +# nsd_flags="<set as needed>" + . %%RC_SUBR%% name=nsd rcvar=`set_rcvar` -prefix=%%PREFIX%% - required_files=%%NSDDIR%%/nsd.zones -command=/usr/local/sbin/${name} +command=%%PREFIX%%/sbin/${name} pidfile=/var/run/${name}.pid # set defaults nsd_enable=${nsd_enable:-"NO"} -nsd_flags=${nsd_flags:-""} load_rc_config ${name} run_rc_command "$1" diff --git a/dns/powerdns-devel/files/pdns-devel.in b/dns/powerdns-devel/files/pdns-devel.in index f53389a7fdac..54037e068a59 100644 --- a/dns/powerdns-devel/files/pdns-devel.in +++ b/dns/powerdns-devel/files/pdns-devel.in @@ -10,7 +10,8 @@ # # Add the following lines to /etc/rc.conf to enable powerdns: # -#pdns_enable="YES" +# pdns_enable="YES" +# pdns_flags="<set as needed>" # # See pdns_server(8) for flags. # @@ -26,7 +27,6 @@ command=%%PREFIX%%/sbin/pdns_server pdns_enable=${pdns_enable:-"NO"} pdns_conf=${pdns_conf:-"%%PREFIX%%/etc/pdns/pdns.conf"} -pdns_flags=${pdns_flags:-""} load_rc_config ${name} diff --git a/dns/powerdns-recursor/files/pdns-recursor.in b/dns/powerdns-recursor/files/pdns-recursor.in index c08c4fd4210b..f828e180a28c 100644 --- a/dns/powerdns-recursor/files/pdns-recursor.in +++ b/dns/powerdns-recursor/files/pdns-recursor.in @@ -11,7 +11,8 @@ # # Add the following lines to /etc/rc.conf to enable pdns_recursor: # -#pdns_recursor_enable="YES" +# pdns_recursor_enable="YES" +# pdns_recursor_flags="<set as needed>" # # See pdns_recursor(8) for flags. # @@ -27,7 +28,6 @@ command=%%PREFIX%%/sbin/pdns_recursor pdns_recursor_enable=${pdns_recursor_enable:-"NO"} pdns_recursor_conf=${pdns_recursor_conf:-"%%PREFIX%%/etc/pdns/recursor.conf"} -pdns_recursor_flags=${pdns_recursor_flags:-""} load_rc_config ${name} diff --git a/dns/powerdns/files/pdns.in b/dns/powerdns/files/pdns.in index 714ff93eba67..65260e2dbf34 100644 --- a/dns/powerdns/files/pdns.in +++ b/dns/powerdns/files/pdns.in @@ -10,7 +10,8 @@ # # Add the following lines to /etc/rc.conf to enable powerdns: # -#pdns_enable="YES" +# pdns_enable="YES" +# pdns_flags="<set as needed>" # # See pdns_server(8) for flags. # @@ -26,7 +27,6 @@ command=%%PREFIX%%/sbin/pdns_server pdns_enable=${pdns_enable:-"NO"} pdns_conf=${pdns_conf:-"%%PREFIX%%/etc/pdns/pdns.conf"} -pdns_flags=${pdns_flags:-""} load_rc_config ${name} diff --git a/dns/totd/files/totd.in b/dns/totd/files/totd.in index 287f20207e9f..9710c6477f38 100644 --- a/dns/totd/files/totd.in +++ b/dns/totd/files/totd.in @@ -6,12 +6,6 @@ # PROVIDE: totd # REQUIRE: SERVERS # BEFORE: DAEMON -# -# NOTE for FreeBSD 5.0+: -# If you want this script to start with the base rc scripts -# move totd.sh to /etc/rc.d/totd - -prefix=%%PREFIX%% # Define these totd_* variables in one of these files: # /etc/rc.conf @@ -21,16 +15,15 @@ prefix=%%PREFIX%% # DO NOT CHANGE THESE DEFAULT VALUES HERE # totd_enable=${totd_enable:-"NO"} # Enable totd -#totd_program="${prefix}/sbin/totd" # Location of totd -totd_flags=${totd_flags:-""} # Flags to totd program +# totd_flags="<set as needed>" . %%RC_SUBR%% name="totd" rcvar=`set_rcvar` -command="${prefix}/sbin/${name}" +command="%%PREFIX%%/sbin/${name}" pidfile="/var/run/${name}.pid" -required_files="${prefix}/etc/${name}.conf" +required_files="%%PREFIX%%/etc/${name}.conf" load_rc_config $name run_rc_command "$1" |