Author: n_hibma
Date: Wed May  3 08:10:03 2017
New Revision: 317729
URL: https://svnweb.freebsd.org/changeset/base/317729

Log:
  Silence sysctl in startup scripts.
  
  This makes 'stop' behave consistently with 'start' in the script.
  Also use $SYSCTL instead of sysctl for consistency within that script.
  
  MFC after:    3 weeks

Modified:
  head/etc/rc.d/ipfw
  head/etc/rc.d/routing

Modified: head/etc/rc.d/ipfw
==============================================================================
--- head/etc/rc.d/ipfw  Wed May  3 07:53:15 2017        (r317728)
+++ head/etc/rc.d/ipfw  Wed May  3 08:10:03 2017        (r317729)
@@ -56,7 +56,7 @@ ipfw_start()
        #
        if checkyesno firewall_logging; then
                echo 'Firewall logging enabled.'
-               sysctl net.inet.ip.fw.verbose=1 >/dev/null
+               ${SYSCTL} net.inet.ip.fw.verbose=1 >/dev/null
        fi
        if checkyesno firewall_logif; then
                ifconfig ipfw0 create
@@ -78,11 +78,11 @@ ipfw_poststart()
 
        # Enable the firewall
        #
-       if ! ${SYSCTL} net.inet.ip.fw.enable=1 1>/dev/null 2>&1; then
+       if ! ${SYSCTL} net.inet.ip.fw.enable=1 >/dev/null 2>&1; then
                warn "failed to enable IPv4 firewall"
        fi
        if afexists inet6; then
-               if ! ${SYSCTL} net.inet6.ip6.fw.enable=1 1>/dev/null 2>&1
+               if ! ${SYSCTL} net.inet6.ip6.fw.enable=1 >/dev/null 2>&1
                then
                        warn "failed to enable IPv6 firewall"
                fi
@@ -95,9 +95,9 @@ ipfw_stop()
 
        # Disable the firewall
        #
-       ${SYSCTL} net.inet.ip.fw.enable=0
+       ${SYSCTL} net.inet.ip.fw.enable=0 >/dev/null
        if afexists inet6; then
-               ${SYSCTL} net.inet6.ip6.fw.enable=0
+               ${SYSCTL} net.inet6.ip6.fw.enable=0 >/dev/null
        fi
 
        # Stop firewall coscripts

Modified: head/etc/rc.d/routing
==============================================================================
--- head/etc/rc.d/routing       Wed May  3 07:53:15 2017        (r317728)
+++ head/etc/rc.d/routing       Wed May  3 08:10:03 2017        (r317729)
@@ -281,7 +281,7 @@ static_inet6()
        esac
 
        ifconfig ${ipv6_default_interface} inet6 defaultif
-       sysctl net.inet6.ip6.use_defaultzone=1
+       ${SYSCTL} net.inet6.ip6.use_defaultzone=1 > /dev/null
 }
 
 ropts_init()
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to