svn commit: r318965 - stable/11/etc/rc.d

Nick Hibma n_hibma at FreeBSD.org
Fri May 26 19:19:49 UTC 2017


Author: n_hibma
Date: Fri May 26 19:19:47 2017
New Revision: 318965
URL: https://svnweb.freebsd.org/changeset/base/318965

Log:
  MFC 317729:
  
  	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.

Modified:
  stable/11/etc/rc.d/ipfw
  stable/11/etc/rc.d/routing
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/etc/rc.d/ipfw
==============================================================================
--- stable/11/etc/rc.d/ipfw	Fri May 26 19:11:24 2017	(r318964)
+++ stable/11/etc/rc.d/ipfw	Fri May 26 19:19:47 2017	(r318965)
@@ -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: stable/11/etc/rc.d/routing
==============================================================================
--- stable/11/etc/rc.d/routing	Fri May 26 19:11:24 2017	(r318964)
+++ stable/11/etc/rc.d/routing	Fri May 26 19:19:47 2017	(r318965)
@@ -286,7 +286,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
 }
 
 static_atm()


More information about the svn-src-all mailing list