diff options
author | emaste <emaste@FreeBSD.org> | 2011-03-30 01:19:00 +0000 |
---|---|---|
committer | emaste <emaste@FreeBSD.org> | 2011-03-30 01:19:00 +0000 |
commit | 47909b5bffde5646bc91092a047f79d1b5bf2bbd (patch) | |
tree | f237a9e5d6ed49257c45f87919451376fa0b54a8 /etc | |
parent | a9eba0596c4e413de61c0d0960d01c83a16b0feb (diff) | |
download | FreeBSD-src-47909b5bffde5646bc91092a047f79d1b5bf2bbd.zip FreeBSD-src-47909b5bffde5646bc91092a047f79d1b5bf2bbd.tar.gz |
Replace ${SYSCTL_W} with ${SYSCTL} in rc.d scripts, as they are identical.
This is a further clean up after r202988.
SYSCTL_W is still initialized in rc.subr as some ports may still use it.
Diffstat (limited to 'etc')
-rwxr-xr-x | etc/rc.d/faith | 4 | ||||
-rwxr-xr-x | etc/rc.d/hostid | 4 | ||||
-rwxr-xr-x | etc/rc.d/initrandom | 12 | ||||
-rwxr-xr-x | etc/rc.d/ipfw | 8 | ||||
-rwxr-xr-x | etc/rc.d/jail | 4 | ||||
-rwxr-xr-x | etc/rc.d/netoptions | 32 | ||||
-rwxr-xr-x | etc/rc.d/routing | 36 | ||||
-rwxr-xr-x | etc/rc.d/securelevel | 2 |
8 files changed, 51 insertions, 51 deletions
diff --git a/etc/rc.d/faith b/etc/rc.d/faith index 9994114..4790ebd 100755 --- a/etc/rc.d/faith +++ b/etc/rc.d/faith @@ -21,7 +21,7 @@ faith_up() *) echo "Configuring IPv6-to-IPv4 TCP relay capturing interface:" \ " faith0." - ${SYSCTL_W} net.inet6.ip6.keepfaith=1 + ${SYSCTL} net.inet6.ip6.keepfaith=1 ifconfig faith0 create >/dev/null 2>&1 ifconfig faith0 up for prefix in ${ipv6_faith_prefix}; do @@ -48,7 +48,7 @@ faith_down() { echo "Removing IPv6-to-IPv4 TCP relay capturing interface: faith0." ifconfig faith0 destroy - ${SYSCTL_W} net.inet6.ip6.keepfaith=0 + ${SYSCTL} net.inet6.ip6.keepfaith=0 case ${ipv6_faith_prefix} in [Nn][Oo] | '') diff --git a/etc/rc.d/hostid b/etc/rc.d/hostid index 20f8502..c4545bd 100755 --- a/etc/rc.d/hostid +++ b/etc/rc.d/hostid @@ -50,9 +50,9 @@ hostid_set() # Set both kern.hostuuid and kern.hostid. # check_startmsgs && echo "Setting hostuuid: ${uuid}." - ${SYSCTL_W} kern.hostuuid="${uuid}" >/dev/null + ${SYSCTL} kern.hostuuid="${uuid}" >/dev/null check_startmsgs && echo "Setting hostid: ${id}." - ${SYSCTL_W} kern.hostid=${id} >/dev/null + ${SYSCTL} kern.hostid=${id} >/dev/null } hostid_hardware() diff --git a/etc/rc.d/initrandom b/etc/rc.d/initrandom index c42490e..fcc047b 100755 --- a/etc/rc.d/initrandom +++ b/etc/rc.d/initrandom @@ -31,24 +31,24 @@ initrandom_start() if [ -w /dev/random ]; then if checkyesno harvest_interrupt; then - ${SYSCTL_W} kern.random.sys.harvest.interrupt=1 >/dev/null + ${SYSCTL} kern.random.sys.harvest.interrupt=1 >/dev/null echo -n ' interrupts' else - ${SYSCTL_W} kern.random.sys.harvest.interrupt=0 >/dev/null + ${SYSCTL} kern.random.sys.harvest.interrupt=0 >/dev/null fi if checkyesno harvest_ethernet; then - ${SYSCTL_W} kern.random.sys.harvest.ethernet=1 >/dev/null + ${SYSCTL} kern.random.sys.harvest.ethernet=1 >/dev/null echo -n ' ethernet' else - ${SYSCTL_W} kern.random.sys.harvest.ethernet=0 >/dev/null + ${SYSCTL} kern.random.sys.harvest.ethernet=0 >/dev/null fi if checkyesno harvest_p_to_p; then - ${SYSCTL_W} kern.random.sys.harvest.point_to_point=1 >/dev/null + ${SYSCTL} kern.random.sys.harvest.point_to_point=1 >/dev/null echo -n ' point_to_point' else - ${SYSCTL_W} kern.random.sys.harvest.point_to_point=0 >/dev/null + ${SYSCTL} kern.random.sys.harvest.point_to_point=0 >/dev/null fi fi diff --git a/etc/rc.d/ipfw b/etc/rc.d/ipfw index 3818bfc..4beb609 100755 --- a/etc/rc.d/ipfw +++ b/etc/rc.d/ipfw @@ -73,11 +73,11 @@ ipfw_poststart() # Enable the firewall # - if ! ${SYSCTL_W} net.inet.ip.fw.enable=1 1>/dev/null 2>&1; then + if ! ${SYSCTL} net.inet.ip.fw.enable=1 1>/dev/null 2>&1; then warn "failed to enable IPv4 firewall" fi if afexists inet6; then - if ! ${SYSCTL_W} net.inet6.ip6.fw.enable=1 1>/dev/null 2>&1 + if ! ${SYSCTL} net.inet6.ip6.fw.enable=1 1>/dev/null 2>&1 then warn "failed to enable IPv6 firewall" fi @@ -90,9 +90,9 @@ ipfw_stop() # Disable the firewall # - ${SYSCTL_W} net.inet.ip.fw.enable=0 + ${SYSCTL} net.inet.ip.fw.enable=0 if afexists inet6; then - ${SYSCTL_W} net.inet6.ip6.fw.enable=0 + ${SYSCTL} net.inet6.ip6.fw.enable=0 fi # Stop firewall coscripts diff --git a/etc/rc.d/jail b/etc/rc.d/jail index 70e151d..09170bd 100755 --- a/etc/rc.d/jail +++ b/etc/rc.d/jail @@ -219,12 +219,12 @@ set_sysctl() if checkyesno $_knob ; then if [ "$_current" -ne 1 ]; then echo -n " ${_msg}=YES" - ${SYSCTL_W} 1>/dev/null ${_mib}=1 + ${SYSCTL} 1>/dev/null ${_mib}=1 fi else if [ "$_current" -ne 0 ]; then echo -n " ${_msg}=NO" - ${SYSCTL_W} 1>/dev/null ${_mib}=0 + ${SYSCTL} 1>/dev/null ${_mib}=0 fi fi } diff --git a/etc/rc.d/netoptions b/etc/rc.d/netoptions index 433ce82..09ed6ef 100755 --- a/etc/rc.d/netoptions +++ b/etc/rc.d/netoptions @@ -40,44 +40,44 @@ netoptions_inet() [12]) netoptions_init echo -n " log_in_vain=${log_in_vain}" - ${SYSCTL_W} net.inet.tcp.log_in_vain=${log_in_vain} >/dev/null - ${SYSCTL_W} net.inet.udp.log_in_vain=${log_in_vain} >/dev/null + ${SYSCTL} net.inet.tcp.log_in_vain=${log_in_vain} >/dev/null + ${SYSCTL} net.inet.udp.log_in_vain=${log_in_vain} >/dev/null ;; *) - ${SYSCTL_W} net.inet.tcp.log_in_vain=0 >/dev/null - ${SYSCTL_W} net.inet.udp.log_in_vain=0 >/dev/null + ${SYSCTL} net.inet.tcp.log_in_vain=0 >/dev/null + ${SYSCTL} net.inet.udp.log_in_vain=0 >/dev/null ;; esac if checkyesno tcp_extensions; then - ${SYSCTL_W} net.inet.tcp.rfc1323=1 >/dev/null + ${SYSCTL} net.inet.tcp.rfc1323=1 >/dev/null else netoptions_init echo -n " rfc1323 extensions=${tcp_extensions}" - ${SYSCTL_W} net.inet.tcp.rfc1323=0 >/dev/null + ${SYSCTL} net.inet.tcp.rfc1323=0 >/dev/null fi if checkyesno tcp_keepalive; then - ${SYSCTL_W} net.inet.tcp.always_keepalive=1 >/dev/null + ${SYSCTL} net.inet.tcp.always_keepalive=1 >/dev/null else netoptions_init echo -n " TCP keepalive=${tcp_keepalive}" - ${SYSCTL_W} net.inet.tcp.always_keepalive=0 >/dev/null + ${SYSCTL} net.inet.tcp.always_keepalive=0 >/dev/null fi if checkyesno tcp_drop_synfin; then netoptions_init echo -n " drop SYN+FIN packets=${tcp_drop_synfin}" - ${SYSCTL_W} net.inet.tcp.drop_synfin=1 >/dev/null + ${SYSCTL} net.inet.tcp.drop_synfin=1 >/dev/null else - ${SYSCTL_W} net.inet.tcp.drop_synfin=0 >/dev/null + ${SYSCTL} net.inet.tcp.drop_synfin=0 >/dev/null fi case ${ip_portrange_first} in [0-9]*) netoptions_init echo -n " ip_portrange_first=$ip_portrange_first" - ${SYSCTL_W} net.inet.ip.portrange.first=$ip_portrange_first >/dev/null + ${SYSCTL} net.inet.ip.portrange.first=$ip_portrange_first >/dev/null ;; esac @@ -85,7 +85,7 @@ netoptions_inet() [0-9]*) netoptions_init echo -n " ip_portrange_last=$ip_portrange_last" - ${SYSCTL_W} net.inet.ip.portrange.last=$ip_portrange_last >/dev/null + ${SYSCTL} net.inet.ip.portrange.last=$ip_portrange_last >/dev/null ;; esac } @@ -95,16 +95,16 @@ netoptions_inet6() if checkyesno ipv6_ipv4mapping; then netoptions_init echo -n " ipv4-mapped-ipv6=${ipv6_ipv4mapping}" - ${SYSCTL_W} net.inet6.ip6.v6only=0 >/dev/null + ${SYSCTL} net.inet6.ip6.v6only=0 >/dev/null else - ${SYSCTL_W} net.inet6.ip6.v6only=1 >/dev/null + ${SYSCTL} net.inet6.ip6.v6only=1 >/dev/null fi if checkyesno ipv6_privacy; then netoptions_init echo -n " IPv6 Privacy Addresses" - ${SYSCTL_W} net.inet6.ip6.use_tempaddr=1 >/dev/null - ${SYSCTL_W} net.inet6.ip6.prefer_tempaddr=1 >/dev/null + ${SYSCTL} net.inet6.ip6.use_tempaddr=1 >/dev/null + ${SYSCTL} net.inet6.ip6.prefer_tempaddr=1 >/dev/null fi } diff --git a/etc/rc.d/routing b/etc/rc.d/routing index 30242fc..add1e0a 100755 --- a/etc/rc.d/routing +++ b/etc/rc.d/routing @@ -264,57 +264,57 @@ options_inet() if checkyesno icmp_bmcastecho; then ropts_init echo -n ' broadcast ping responses=YES' - ${SYSCTL_W} net.inet.icmp.bmcastecho=1 > /dev/null + ${SYSCTL} net.inet.icmp.bmcastecho=1 > /dev/null else - ${SYSCTL_W} net.inet.icmp.bmcastecho=0 > /dev/null + ${SYSCTL} net.inet.icmp.bmcastecho=0 > /dev/null fi if checkyesno icmp_drop_redirect; then ropts_init echo -n ' ignore ICMP redirect=YES' - ${SYSCTL_W} net.inet.icmp.drop_redirect=1 > /dev/null + ${SYSCTL} net.inet.icmp.drop_redirect=1 > /dev/null else - ${SYSCTL_W} net.inet.icmp.drop_redirect=0 > /dev/null + ${SYSCTL} net.inet.icmp.drop_redirect=0 > /dev/null fi if checkyesno icmp_log_redirect; then ropts_init echo -n ' log ICMP redirect=YES' - ${SYSCTL_W} net.inet.icmp.log_redirect=1 > /dev/null + ${SYSCTL} net.inet.icmp.log_redirect=1 > /dev/null else - ${SYSCTL_W} net.inet.icmp.log_redirect=0 > /dev/null + ${SYSCTL} net.inet.icmp.log_redirect=0 > /dev/null fi if checkyesno gateway_enable; then ropts_init echo -n ' IPv4 gateway=YES' - ${SYSCTL_W} net.inet.ip.forwarding=1 > /dev/null + ${SYSCTL} net.inet.ip.forwarding=1 > /dev/null else - ${SYSCTL_W} net.inet.ip.forwarding=0 > /dev/null + ${SYSCTL} net.inet.ip.forwarding=0 > /dev/null fi if checkyesno forward_sourceroute; then ropts_init echo -n ' do source routing=YES' - ${SYSCTL_W} net.inet.ip.sourceroute=1 > /dev/null + ${SYSCTL} net.inet.ip.sourceroute=1 > /dev/null else - ${SYSCTL_W} net.inet.ip.sourceroute=0 > /dev/null + ${SYSCTL} net.inet.ip.sourceroute=0 > /dev/null fi if checkyesno accept_sourceroute; then ropts_init echo -n ' accept source routing=YES' - ${SYSCTL_W} net.inet.ip.accept_sourceroute=1 > /dev/null + ${SYSCTL} net.inet.ip.accept_sourceroute=1 > /dev/null else - ${SYSCTL_W} net.inet.ip.accept_sourceroute=0 > /dev/null + ${SYSCTL} net.inet.ip.accept_sourceroute=0 > /dev/null fi if checkyesno arpproxy_all; then ropts_init echo -n ' ARP proxyall=YES' - ${SYSCTL_W} net.link.ether.inet.proxyall=1 > /dev/null + ${SYSCTL} net.link.ether.inet.proxyall=1 > /dev/null else - ${SYSCTL_W} net.link.ether.inet.proxyall=0 > /dev/null + ${SYSCTL} net.link.ether.inet.proxyall=0 > /dev/null fi } @@ -323,9 +323,9 @@ options_inet6() if checkyesno ipv6_gateway_enable; then ropts_init echo -n ' IPv6 gateway=YES' - ${SYSCTL_W} net.inet6.ip6.forwarding=1 > /dev/null + ${SYSCTL} net.inet6.ip6.forwarding=1 > /dev/null else - ${SYSCTL_W} net.inet6.ip6.forwarding=0 > /dev/null + ${SYSCTL} net.inet6.ip6.forwarding=0 > /dev/null fi } @@ -338,9 +338,9 @@ options_ipx() if checkyesno ipxgateway_enable; then ropts_init echo -n ' IPX gateway=YES' - ${SYSCTL_W} net.ipx.ipx.ipxforwarding=1 > /dev/null + ${SYSCTL} net.ipx.ipx.ipxforwarding=1 > /dev/null else - ${SYSCTL_W} net.ipx.ipx.ipxforwarding=0 > /dev/null + ${SYSCTL} net.ipx.ipx.ipxforwarding=0 > /dev/null fi } diff --git a/etc/rc.d/securelevel b/etc/rc.d/securelevel index 620a22e..f179004 100755 --- a/etc/rc.d/securelevel +++ b/etc/rc.d/securelevel @@ -20,7 +20,7 @@ securelevel_start() { if [ ${kern_securelevel} -ge 0 ]; then echo 'Raising kernel security level: ' - ${SYSCTL_W} kern.securelevel=${kern_securelevel} + ${SYSCTL} kern.securelevel=${kern_securelevel} fi } |