Don't discard error output from sysctl(8).

Do discard standard output from the sysctl for approxy_all, and echo
what this sysctl is doing in the usual way.  This fix is probably
backwards.  We should probably just use the standard sysctl output
in all cases (it needs to have a newline filtered out).

Echo what the sysctls for nfs_reserved_port_only and nfs_access_cache
are doing.
This commit is contained in:
Bruce Evans 1999-06-05 12:06:19 +00:00
parent eed2b804bf
commit 7389b9fd55
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=47755
7 changed files with 112 additions and 98 deletions

View file

@ -1,6 +1,6 @@
#!/bin/sh - #!/bin/sh -
# #
# $Id: rc.network,v 1.44 1999/04/12 15:26:41 brian Exp $ # $Id: rc.network,v 1.45 1999/06/05 05:45:47 phk Exp $
# From: @(#)netstart 5.9 (Berkeley) 3/30/91 # From: @(#)netstart 5.9 (Berkeley) 3/30/91
# Note that almost all the user-configurable behavior is no longer in # Note that almost all the user-configurable behavior is no longer in
@ -151,48 +151,48 @@ network_pass1() {
echo -n 'Additional routing options:' echo -n 'Additional routing options:'
if [ -n "$tcp_extensions" -a "x$tcp_extensions" != "xYES" ] ; then if [ -n "$tcp_extensions" -a "x$tcp_extensions" != "xYES" ] ; then
echo -n ' tcp extensions=NO' echo -n ' tcp extensions=NO'
sysctl -w net.inet.tcp.rfc1323=0 >/dev/null 2>&1 sysctl -w net.inet.tcp.rfc1323=0 >/dev/null
fi fi
if [ -n "$log_in_vain" -a "x$log_in_vain" != "xNO" ] ; then if [ -n "$log_in_vain" -a "x$log_in_vain" != "xNO" ] ; then
echo -n ' log_in_vain=YES' echo -n ' log_in_vain=YES'
sysctl -w net.inet.tcp.log_in_vain=1 >/dev/null 2>&1 sysctl -w net.inet.tcp.log_in_vain=1 >/dev/null
sysctl -w net.inet.udp.log_in_vain=1 >/dev/null 2>&1 sysctl -w net.inet.udp.log_in_vain=1 >/dev/null
fi fi
if [ X"$icmp_bmcastecho" = X"YES" ]; then if [ X"$icmp_bmcastecho" = X"YES" ]; then
echo -n ' broadcast ping responses=YES' echo -n ' broadcast ping responses=YES'
sysctl -w net.inet.icmp.bmcastecho=1 >/dev/null 2>&1 sysctl -w net.inet.icmp.bmcastecho=1 >/dev/null
fi fi
if [ "X$gateway_enable" = X"YES" ]; then if [ "X$gateway_enable" = X"YES" ]; then
echo -n ' IP gateway=YES' echo -n ' IP gateway=YES'
sysctl -w net.inet.ip.forwarding=1 >/dev/null 2>&1 sysctl -w net.inet.ip.forwarding=1 >/dev/null
fi fi
if [ "X$forward_sourceroute" = X"YES" ]; then if [ "X$forward_sourceroute" = X"YES" ]; then
echo -n ' do source routing=YES' echo -n ' do source routing=YES'
sysctl -w net.inet.ip.sourceroute=1 >/dev/null 2>&1 sysctl -w net.inet.ip.sourceroute=1 >/dev/null
fi fi
if [ "X$accept_sourceroute" = X"YES" ]; then if [ "X$accept_sourceroute" = X"YES" ]; then
echo -n ' accept source routing=YES' echo -n ' accept source routing=YES'
sysctl -w net.inet.ip.accept_sourceroute=1 >/dev/null 2>&1 sysctl -w net.inet.ip.accept_sourceroute=1 >/dev/null
fi fi
if [ "X$tcp_keepalive" = X"YES" ]; then if [ "X$tcp_keepalive" = X"YES" ]; then
echo -n ' TCP keepalive=YES' echo -n ' TCP keepalive=YES'
sysctl -w net.inet.tcp.always_keepalive=1 >/dev/null 2>&1 sysctl -w net.inet.tcp.always_keepalive=1 >/dev/null
fi fi
if [ "X$ipxgateway_enable" = X"YES" ]; then if [ "X$ipxgateway_enable" = X"YES" ]; then
echo -n ' IPX gateway=YES' echo -n ' IPX gateway=YES'
sysctl -w net.ipx.ipx.ipxforwarding=1 >/dev/null 2>&1 sysctl -w net.ipx.ipx.ipxforwarding=1 >/dev/null
fi fi
if [ "X$arpproxy_all" = X"YES" ]; then if [ "X$arpproxy_all" = X"YES" ]; then
echo -n ' enabling ARP_PROXY_ALL: ' echo -n ' ARP proxyall=YES'
sysctl -w net.link.ether.inet.proxyall=1 2>&1 sysctl -w net.link.ether.inet.proxyall=1 >/dev/null
fi fi
echo '.' echo '.'
@ -289,7 +289,8 @@ network_pass3() {
fi fi
mountd ${mountd_flags} mountd ${mountd_flags}
if [ "X${nfs_reserved_port_only}" = X"YES" ]; then if [ "X${nfs_reserved_port_only}" = X"YES" ]; then
sysctl -w vfs.nfs.nfs_privport=1 >/dev/null 2>&1 echo -n ' NFS on reserved port only=YES'
sysctl -w vfs.nfs.nfs_privport=1 >/dev/null
fi fi
echo -n ' nfsd'; nfsd ${nfs_server_flags} echo -n ' nfsd'; nfsd ${nfs_server_flags}
if [ "X$rpc_lockd_enable" = X"YES" ]; then if [ "X$rpc_lockd_enable" = X"YES" ]; then
@ -303,8 +304,9 @@ network_pass3() {
if [ "X${nfs_client_enable}" = X"YES" ]; then if [ "X${nfs_client_enable}" = X"YES" ]; then
echo -n ' nfsiod'; nfsiod ${nfs_client_flags} echo -n ' nfsiod'; nfsiod ${nfs_client_flags}
if [ "X${nfs_access_cache}" != X ]; then if [ "X${nfs_access_cache}" != X ]; then
echo -n " NFS access cache time=${nfs_access_cache}"
sysctl -w vfs.nfs.access_cache_timeout=${nfs_access_cache} \ sysctl -w vfs.nfs.access_cache_timeout=${nfs_access_cache} \
>/dev/null 2>&1 >/dev/null
fi fi
fi fi

View file

@ -1,6 +1,6 @@
#!/bin/sh - #!/bin/sh -
# #
# $Id: rc.network,v 1.44 1999/04/12 15:26:41 brian Exp $ # $Id: rc.network,v 1.45 1999/06/05 05:45:47 phk Exp $
# From: @(#)netstart 5.9 (Berkeley) 3/30/91 # From: @(#)netstart 5.9 (Berkeley) 3/30/91
# Note that almost all the user-configurable behavior is no longer in # Note that almost all the user-configurable behavior is no longer in
@ -151,48 +151,48 @@ network_pass1() {
echo -n 'Additional routing options:' echo -n 'Additional routing options:'
if [ -n "$tcp_extensions" -a "x$tcp_extensions" != "xYES" ] ; then if [ -n "$tcp_extensions" -a "x$tcp_extensions" != "xYES" ] ; then
echo -n ' tcp extensions=NO' echo -n ' tcp extensions=NO'
sysctl -w net.inet.tcp.rfc1323=0 >/dev/null 2>&1 sysctl -w net.inet.tcp.rfc1323=0 >/dev/null
fi fi
if [ -n "$log_in_vain" -a "x$log_in_vain" != "xNO" ] ; then if [ -n "$log_in_vain" -a "x$log_in_vain" != "xNO" ] ; then
echo -n ' log_in_vain=YES' echo -n ' log_in_vain=YES'
sysctl -w net.inet.tcp.log_in_vain=1 >/dev/null 2>&1 sysctl -w net.inet.tcp.log_in_vain=1 >/dev/null
sysctl -w net.inet.udp.log_in_vain=1 >/dev/null 2>&1 sysctl -w net.inet.udp.log_in_vain=1 >/dev/null
fi fi
if [ X"$icmp_bmcastecho" = X"YES" ]; then if [ X"$icmp_bmcastecho" = X"YES" ]; then
echo -n ' broadcast ping responses=YES' echo -n ' broadcast ping responses=YES'
sysctl -w net.inet.icmp.bmcastecho=1 >/dev/null 2>&1 sysctl -w net.inet.icmp.bmcastecho=1 >/dev/null
fi fi
if [ "X$gateway_enable" = X"YES" ]; then if [ "X$gateway_enable" = X"YES" ]; then
echo -n ' IP gateway=YES' echo -n ' IP gateway=YES'
sysctl -w net.inet.ip.forwarding=1 >/dev/null 2>&1 sysctl -w net.inet.ip.forwarding=1 >/dev/null
fi fi
if [ "X$forward_sourceroute" = X"YES" ]; then if [ "X$forward_sourceroute" = X"YES" ]; then
echo -n ' do source routing=YES' echo -n ' do source routing=YES'
sysctl -w net.inet.ip.sourceroute=1 >/dev/null 2>&1 sysctl -w net.inet.ip.sourceroute=1 >/dev/null
fi fi
if [ "X$accept_sourceroute" = X"YES" ]; then if [ "X$accept_sourceroute" = X"YES" ]; then
echo -n ' accept source routing=YES' echo -n ' accept source routing=YES'
sysctl -w net.inet.ip.accept_sourceroute=1 >/dev/null 2>&1 sysctl -w net.inet.ip.accept_sourceroute=1 >/dev/null
fi fi
if [ "X$tcp_keepalive" = X"YES" ]; then if [ "X$tcp_keepalive" = X"YES" ]; then
echo -n ' TCP keepalive=YES' echo -n ' TCP keepalive=YES'
sysctl -w net.inet.tcp.always_keepalive=1 >/dev/null 2>&1 sysctl -w net.inet.tcp.always_keepalive=1 >/dev/null
fi fi
if [ "X$ipxgateway_enable" = X"YES" ]; then if [ "X$ipxgateway_enable" = X"YES" ]; then
echo -n ' IPX gateway=YES' echo -n ' IPX gateway=YES'
sysctl -w net.ipx.ipx.ipxforwarding=1 >/dev/null 2>&1 sysctl -w net.ipx.ipx.ipxforwarding=1 >/dev/null
fi fi
if [ "X$arpproxy_all" = X"YES" ]; then if [ "X$arpproxy_all" = X"YES" ]; then
echo -n ' enabling ARP_PROXY_ALL: ' echo -n ' ARP proxyall=YES'
sysctl -w net.link.ether.inet.proxyall=1 2>&1 sysctl -w net.link.ether.inet.proxyall=1 >/dev/null
fi fi
echo '.' echo '.'
@ -289,7 +289,8 @@ network_pass3() {
fi fi
mountd ${mountd_flags} mountd ${mountd_flags}
if [ "X${nfs_reserved_port_only}" = X"YES" ]; then if [ "X${nfs_reserved_port_only}" = X"YES" ]; then
sysctl -w vfs.nfs.nfs_privport=1 >/dev/null 2>&1 echo -n ' NFS on reserved port only=YES'
sysctl -w vfs.nfs.nfs_privport=1 >/dev/null
fi fi
echo -n ' nfsd'; nfsd ${nfs_server_flags} echo -n ' nfsd'; nfsd ${nfs_server_flags}
if [ "X$rpc_lockd_enable" = X"YES" ]; then if [ "X$rpc_lockd_enable" = X"YES" ]; then
@ -303,8 +304,9 @@ network_pass3() {
if [ "X${nfs_client_enable}" = X"YES" ]; then if [ "X${nfs_client_enable}" = X"YES" ]; then
echo -n ' nfsiod'; nfsiod ${nfs_client_flags} echo -n ' nfsiod'; nfsiod ${nfs_client_flags}
if [ "X${nfs_access_cache}" != X ]; then if [ "X${nfs_access_cache}" != X ]; then
echo -n " NFS access cache time=${nfs_access_cache}"
sysctl -w vfs.nfs.access_cache_timeout=${nfs_access_cache} \ sysctl -w vfs.nfs.access_cache_timeout=${nfs_access_cache} \
>/dev/null 2>&1 >/dev/null
fi fi
fi fi

View file

@ -1,6 +1,6 @@
#!/bin/sh - #!/bin/sh -
# #
# $Id: rc.network,v 1.44 1999/04/12 15:26:41 brian Exp $ # $Id: rc.network,v 1.45 1999/06/05 05:45:47 phk Exp $
# From: @(#)netstart 5.9 (Berkeley) 3/30/91 # From: @(#)netstart 5.9 (Berkeley) 3/30/91
# Note that almost all the user-configurable behavior is no longer in # Note that almost all the user-configurable behavior is no longer in
@ -151,48 +151,48 @@ network_pass1() {
echo -n 'Additional routing options:' echo -n 'Additional routing options:'
if [ -n "$tcp_extensions" -a "x$tcp_extensions" != "xYES" ] ; then if [ -n "$tcp_extensions" -a "x$tcp_extensions" != "xYES" ] ; then
echo -n ' tcp extensions=NO' echo -n ' tcp extensions=NO'
sysctl -w net.inet.tcp.rfc1323=0 >/dev/null 2>&1 sysctl -w net.inet.tcp.rfc1323=0 >/dev/null
fi fi
if [ -n "$log_in_vain" -a "x$log_in_vain" != "xNO" ] ; then if [ -n "$log_in_vain" -a "x$log_in_vain" != "xNO" ] ; then
echo -n ' log_in_vain=YES' echo -n ' log_in_vain=YES'
sysctl -w net.inet.tcp.log_in_vain=1 >/dev/null 2>&1 sysctl -w net.inet.tcp.log_in_vain=1 >/dev/null
sysctl -w net.inet.udp.log_in_vain=1 >/dev/null 2>&1 sysctl -w net.inet.udp.log_in_vain=1 >/dev/null
fi fi
if [ X"$icmp_bmcastecho" = X"YES" ]; then if [ X"$icmp_bmcastecho" = X"YES" ]; then
echo -n ' broadcast ping responses=YES' echo -n ' broadcast ping responses=YES'
sysctl -w net.inet.icmp.bmcastecho=1 >/dev/null 2>&1 sysctl -w net.inet.icmp.bmcastecho=1 >/dev/null
fi fi
if [ "X$gateway_enable" = X"YES" ]; then if [ "X$gateway_enable" = X"YES" ]; then
echo -n ' IP gateway=YES' echo -n ' IP gateway=YES'
sysctl -w net.inet.ip.forwarding=1 >/dev/null 2>&1 sysctl -w net.inet.ip.forwarding=1 >/dev/null
fi fi
if [ "X$forward_sourceroute" = X"YES" ]; then if [ "X$forward_sourceroute" = X"YES" ]; then
echo -n ' do source routing=YES' echo -n ' do source routing=YES'
sysctl -w net.inet.ip.sourceroute=1 >/dev/null 2>&1 sysctl -w net.inet.ip.sourceroute=1 >/dev/null
fi fi
if [ "X$accept_sourceroute" = X"YES" ]; then if [ "X$accept_sourceroute" = X"YES" ]; then
echo -n ' accept source routing=YES' echo -n ' accept source routing=YES'
sysctl -w net.inet.ip.accept_sourceroute=1 >/dev/null 2>&1 sysctl -w net.inet.ip.accept_sourceroute=1 >/dev/null
fi fi
if [ "X$tcp_keepalive" = X"YES" ]; then if [ "X$tcp_keepalive" = X"YES" ]; then
echo -n ' TCP keepalive=YES' echo -n ' TCP keepalive=YES'
sysctl -w net.inet.tcp.always_keepalive=1 >/dev/null 2>&1 sysctl -w net.inet.tcp.always_keepalive=1 >/dev/null
fi fi
if [ "X$ipxgateway_enable" = X"YES" ]; then if [ "X$ipxgateway_enable" = X"YES" ]; then
echo -n ' IPX gateway=YES' echo -n ' IPX gateway=YES'
sysctl -w net.ipx.ipx.ipxforwarding=1 >/dev/null 2>&1 sysctl -w net.ipx.ipx.ipxforwarding=1 >/dev/null
fi fi
if [ "X$arpproxy_all" = X"YES" ]; then if [ "X$arpproxy_all" = X"YES" ]; then
echo -n ' enabling ARP_PROXY_ALL: ' echo -n ' ARP proxyall=YES'
sysctl -w net.link.ether.inet.proxyall=1 2>&1 sysctl -w net.link.ether.inet.proxyall=1 >/dev/null
fi fi
echo '.' echo '.'
@ -289,7 +289,8 @@ network_pass3() {
fi fi
mountd ${mountd_flags} mountd ${mountd_flags}
if [ "X${nfs_reserved_port_only}" = X"YES" ]; then if [ "X${nfs_reserved_port_only}" = X"YES" ]; then
sysctl -w vfs.nfs.nfs_privport=1 >/dev/null 2>&1 echo -n ' NFS on reserved port only=YES'
sysctl -w vfs.nfs.nfs_privport=1 >/dev/null
fi fi
echo -n ' nfsd'; nfsd ${nfs_server_flags} echo -n ' nfsd'; nfsd ${nfs_server_flags}
if [ "X$rpc_lockd_enable" = X"YES" ]; then if [ "X$rpc_lockd_enable" = X"YES" ]; then
@ -303,8 +304,9 @@ network_pass3() {
if [ "X${nfs_client_enable}" = X"YES" ]; then if [ "X${nfs_client_enable}" = X"YES" ]; then
echo -n ' nfsiod'; nfsiod ${nfs_client_flags} echo -n ' nfsiod'; nfsiod ${nfs_client_flags}
if [ "X${nfs_access_cache}" != X ]; then if [ "X${nfs_access_cache}" != X ]; then
echo -n " NFS access cache time=${nfs_access_cache}"
sysctl -w vfs.nfs.access_cache_timeout=${nfs_access_cache} \ sysctl -w vfs.nfs.access_cache_timeout=${nfs_access_cache} \
>/dev/null 2>&1 >/dev/null
fi fi
fi fi

View file

@ -1,6 +1,6 @@
#!/bin/sh - #!/bin/sh -
# #
# $Id: rc.network,v 1.44 1999/04/12 15:26:41 brian Exp $ # $Id: rc.network,v 1.45 1999/06/05 05:45:47 phk Exp $
# From: @(#)netstart 5.9 (Berkeley) 3/30/91 # From: @(#)netstart 5.9 (Berkeley) 3/30/91
# Note that almost all the user-configurable behavior is no longer in # Note that almost all the user-configurable behavior is no longer in
@ -151,48 +151,48 @@ network_pass1() {
echo -n 'Additional routing options:' echo -n 'Additional routing options:'
if [ -n "$tcp_extensions" -a "x$tcp_extensions" != "xYES" ] ; then if [ -n "$tcp_extensions" -a "x$tcp_extensions" != "xYES" ] ; then
echo -n ' tcp extensions=NO' echo -n ' tcp extensions=NO'
sysctl -w net.inet.tcp.rfc1323=0 >/dev/null 2>&1 sysctl -w net.inet.tcp.rfc1323=0 >/dev/null
fi fi
if [ -n "$log_in_vain" -a "x$log_in_vain" != "xNO" ] ; then if [ -n "$log_in_vain" -a "x$log_in_vain" != "xNO" ] ; then
echo -n ' log_in_vain=YES' echo -n ' log_in_vain=YES'
sysctl -w net.inet.tcp.log_in_vain=1 >/dev/null 2>&1 sysctl -w net.inet.tcp.log_in_vain=1 >/dev/null
sysctl -w net.inet.udp.log_in_vain=1 >/dev/null 2>&1 sysctl -w net.inet.udp.log_in_vain=1 >/dev/null
fi fi
if [ X"$icmp_bmcastecho" = X"YES" ]; then if [ X"$icmp_bmcastecho" = X"YES" ]; then
echo -n ' broadcast ping responses=YES' echo -n ' broadcast ping responses=YES'
sysctl -w net.inet.icmp.bmcastecho=1 >/dev/null 2>&1 sysctl -w net.inet.icmp.bmcastecho=1 >/dev/null
fi fi
if [ "X$gateway_enable" = X"YES" ]; then if [ "X$gateway_enable" = X"YES" ]; then
echo -n ' IP gateway=YES' echo -n ' IP gateway=YES'
sysctl -w net.inet.ip.forwarding=1 >/dev/null 2>&1 sysctl -w net.inet.ip.forwarding=1 >/dev/null
fi fi
if [ "X$forward_sourceroute" = X"YES" ]; then if [ "X$forward_sourceroute" = X"YES" ]; then
echo -n ' do source routing=YES' echo -n ' do source routing=YES'
sysctl -w net.inet.ip.sourceroute=1 >/dev/null 2>&1 sysctl -w net.inet.ip.sourceroute=1 >/dev/null
fi fi
if [ "X$accept_sourceroute" = X"YES" ]; then if [ "X$accept_sourceroute" = X"YES" ]; then
echo -n ' accept source routing=YES' echo -n ' accept source routing=YES'
sysctl -w net.inet.ip.accept_sourceroute=1 >/dev/null 2>&1 sysctl -w net.inet.ip.accept_sourceroute=1 >/dev/null
fi fi
if [ "X$tcp_keepalive" = X"YES" ]; then if [ "X$tcp_keepalive" = X"YES" ]; then
echo -n ' TCP keepalive=YES' echo -n ' TCP keepalive=YES'
sysctl -w net.inet.tcp.always_keepalive=1 >/dev/null 2>&1 sysctl -w net.inet.tcp.always_keepalive=1 >/dev/null
fi fi
if [ "X$ipxgateway_enable" = X"YES" ]; then if [ "X$ipxgateway_enable" = X"YES" ]; then
echo -n ' IPX gateway=YES' echo -n ' IPX gateway=YES'
sysctl -w net.ipx.ipx.ipxforwarding=1 >/dev/null 2>&1 sysctl -w net.ipx.ipx.ipxforwarding=1 >/dev/null
fi fi
if [ "X$arpproxy_all" = X"YES" ]; then if [ "X$arpproxy_all" = X"YES" ]; then
echo -n ' enabling ARP_PROXY_ALL: ' echo -n ' ARP proxyall=YES'
sysctl -w net.link.ether.inet.proxyall=1 2>&1 sysctl -w net.link.ether.inet.proxyall=1 >/dev/null
fi fi
echo '.' echo '.'
@ -289,7 +289,8 @@ network_pass3() {
fi fi
mountd ${mountd_flags} mountd ${mountd_flags}
if [ "X${nfs_reserved_port_only}" = X"YES" ]; then if [ "X${nfs_reserved_port_only}" = X"YES" ]; then
sysctl -w vfs.nfs.nfs_privport=1 >/dev/null 2>&1 echo -n ' NFS on reserved port only=YES'
sysctl -w vfs.nfs.nfs_privport=1 >/dev/null
fi fi
echo -n ' nfsd'; nfsd ${nfs_server_flags} echo -n ' nfsd'; nfsd ${nfs_server_flags}
if [ "X$rpc_lockd_enable" = X"YES" ]; then if [ "X$rpc_lockd_enable" = X"YES" ]; then
@ -303,8 +304,9 @@ network_pass3() {
if [ "X${nfs_client_enable}" = X"YES" ]; then if [ "X${nfs_client_enable}" = X"YES" ]; then
echo -n ' nfsiod'; nfsiod ${nfs_client_flags} echo -n ' nfsiod'; nfsiod ${nfs_client_flags}
if [ "X${nfs_access_cache}" != X ]; then if [ "X${nfs_access_cache}" != X ]; then
echo -n " NFS access cache time=${nfs_access_cache}"
sysctl -w vfs.nfs.access_cache_timeout=${nfs_access_cache} \ sysctl -w vfs.nfs.access_cache_timeout=${nfs_access_cache} \
>/dev/null 2>&1 >/dev/null
fi fi
fi fi

View file

@ -1,6 +1,6 @@
#!/bin/sh - #!/bin/sh -
# #
# $Id: rc.network,v 1.44 1999/04/12 15:26:41 brian Exp $ # $Id: rc.network,v 1.45 1999/06/05 05:45:47 phk Exp $
# From: @(#)netstart 5.9 (Berkeley) 3/30/91 # From: @(#)netstart 5.9 (Berkeley) 3/30/91
# Note that almost all the user-configurable behavior is no longer in # Note that almost all the user-configurable behavior is no longer in
@ -151,48 +151,48 @@ network_pass1() {
echo -n 'Additional routing options:' echo -n 'Additional routing options:'
if [ -n "$tcp_extensions" -a "x$tcp_extensions" != "xYES" ] ; then if [ -n "$tcp_extensions" -a "x$tcp_extensions" != "xYES" ] ; then
echo -n ' tcp extensions=NO' echo -n ' tcp extensions=NO'
sysctl -w net.inet.tcp.rfc1323=0 >/dev/null 2>&1 sysctl -w net.inet.tcp.rfc1323=0 >/dev/null
fi fi
if [ -n "$log_in_vain" -a "x$log_in_vain" != "xNO" ] ; then if [ -n "$log_in_vain" -a "x$log_in_vain" != "xNO" ] ; then
echo -n ' log_in_vain=YES' echo -n ' log_in_vain=YES'
sysctl -w net.inet.tcp.log_in_vain=1 >/dev/null 2>&1 sysctl -w net.inet.tcp.log_in_vain=1 >/dev/null
sysctl -w net.inet.udp.log_in_vain=1 >/dev/null 2>&1 sysctl -w net.inet.udp.log_in_vain=1 >/dev/null
fi fi
if [ X"$icmp_bmcastecho" = X"YES" ]; then if [ X"$icmp_bmcastecho" = X"YES" ]; then
echo -n ' broadcast ping responses=YES' echo -n ' broadcast ping responses=YES'
sysctl -w net.inet.icmp.bmcastecho=1 >/dev/null 2>&1 sysctl -w net.inet.icmp.bmcastecho=1 >/dev/null
fi fi
if [ "X$gateway_enable" = X"YES" ]; then if [ "X$gateway_enable" = X"YES" ]; then
echo -n ' IP gateway=YES' echo -n ' IP gateway=YES'
sysctl -w net.inet.ip.forwarding=1 >/dev/null 2>&1 sysctl -w net.inet.ip.forwarding=1 >/dev/null
fi fi
if [ "X$forward_sourceroute" = X"YES" ]; then if [ "X$forward_sourceroute" = X"YES" ]; then
echo -n ' do source routing=YES' echo -n ' do source routing=YES'
sysctl -w net.inet.ip.sourceroute=1 >/dev/null 2>&1 sysctl -w net.inet.ip.sourceroute=1 >/dev/null
fi fi
if [ "X$accept_sourceroute" = X"YES" ]; then if [ "X$accept_sourceroute" = X"YES" ]; then
echo -n ' accept source routing=YES' echo -n ' accept source routing=YES'
sysctl -w net.inet.ip.accept_sourceroute=1 >/dev/null 2>&1 sysctl -w net.inet.ip.accept_sourceroute=1 >/dev/null
fi fi
if [ "X$tcp_keepalive" = X"YES" ]; then if [ "X$tcp_keepalive" = X"YES" ]; then
echo -n ' TCP keepalive=YES' echo -n ' TCP keepalive=YES'
sysctl -w net.inet.tcp.always_keepalive=1 >/dev/null 2>&1 sysctl -w net.inet.tcp.always_keepalive=1 >/dev/null
fi fi
if [ "X$ipxgateway_enable" = X"YES" ]; then if [ "X$ipxgateway_enable" = X"YES" ]; then
echo -n ' IPX gateway=YES' echo -n ' IPX gateway=YES'
sysctl -w net.ipx.ipx.ipxforwarding=1 >/dev/null 2>&1 sysctl -w net.ipx.ipx.ipxforwarding=1 >/dev/null
fi fi
if [ "X$arpproxy_all" = X"YES" ]; then if [ "X$arpproxy_all" = X"YES" ]; then
echo -n ' enabling ARP_PROXY_ALL: ' echo -n ' ARP proxyall=YES'
sysctl -w net.link.ether.inet.proxyall=1 2>&1 sysctl -w net.link.ether.inet.proxyall=1 >/dev/null
fi fi
echo '.' echo '.'
@ -289,7 +289,8 @@ network_pass3() {
fi fi
mountd ${mountd_flags} mountd ${mountd_flags}
if [ "X${nfs_reserved_port_only}" = X"YES" ]; then if [ "X${nfs_reserved_port_only}" = X"YES" ]; then
sysctl -w vfs.nfs.nfs_privport=1 >/dev/null 2>&1 echo -n ' NFS on reserved port only=YES'
sysctl -w vfs.nfs.nfs_privport=1 >/dev/null
fi fi
echo -n ' nfsd'; nfsd ${nfs_server_flags} echo -n ' nfsd'; nfsd ${nfs_server_flags}
if [ "X$rpc_lockd_enable" = X"YES" ]; then if [ "X$rpc_lockd_enable" = X"YES" ]; then
@ -303,8 +304,9 @@ network_pass3() {
if [ "X${nfs_client_enable}" = X"YES" ]; then if [ "X${nfs_client_enable}" = X"YES" ]; then
echo -n ' nfsiod'; nfsiod ${nfs_client_flags} echo -n ' nfsiod'; nfsiod ${nfs_client_flags}
if [ "X${nfs_access_cache}" != X ]; then if [ "X${nfs_access_cache}" != X ]; then
echo -n " NFS access cache time=${nfs_access_cache}"
sysctl -w vfs.nfs.access_cache_timeout=${nfs_access_cache} \ sysctl -w vfs.nfs.access_cache_timeout=${nfs_access_cache} \
>/dev/null 2>&1 >/dev/null
fi fi
fi fi

View file

@ -1,6 +1,6 @@
#!/bin/sh - #!/bin/sh -
# #
# $Id: rc.network,v 1.44 1999/04/12 15:26:41 brian Exp $ # $Id: rc.network,v 1.45 1999/06/05 05:45:47 phk Exp $
# From: @(#)netstart 5.9 (Berkeley) 3/30/91 # From: @(#)netstart 5.9 (Berkeley) 3/30/91
# Note that almost all the user-configurable behavior is no longer in # Note that almost all the user-configurable behavior is no longer in
@ -151,48 +151,48 @@ network_pass1() {
echo -n 'Additional routing options:' echo -n 'Additional routing options:'
if [ -n "$tcp_extensions" -a "x$tcp_extensions" != "xYES" ] ; then if [ -n "$tcp_extensions" -a "x$tcp_extensions" != "xYES" ] ; then
echo -n ' tcp extensions=NO' echo -n ' tcp extensions=NO'
sysctl -w net.inet.tcp.rfc1323=0 >/dev/null 2>&1 sysctl -w net.inet.tcp.rfc1323=0 >/dev/null
fi fi
if [ -n "$log_in_vain" -a "x$log_in_vain" != "xNO" ] ; then if [ -n "$log_in_vain" -a "x$log_in_vain" != "xNO" ] ; then
echo -n ' log_in_vain=YES' echo -n ' log_in_vain=YES'
sysctl -w net.inet.tcp.log_in_vain=1 >/dev/null 2>&1 sysctl -w net.inet.tcp.log_in_vain=1 >/dev/null
sysctl -w net.inet.udp.log_in_vain=1 >/dev/null 2>&1 sysctl -w net.inet.udp.log_in_vain=1 >/dev/null
fi fi
if [ X"$icmp_bmcastecho" = X"YES" ]; then if [ X"$icmp_bmcastecho" = X"YES" ]; then
echo -n ' broadcast ping responses=YES' echo -n ' broadcast ping responses=YES'
sysctl -w net.inet.icmp.bmcastecho=1 >/dev/null 2>&1 sysctl -w net.inet.icmp.bmcastecho=1 >/dev/null
fi fi
if [ "X$gateway_enable" = X"YES" ]; then if [ "X$gateway_enable" = X"YES" ]; then
echo -n ' IP gateway=YES' echo -n ' IP gateway=YES'
sysctl -w net.inet.ip.forwarding=1 >/dev/null 2>&1 sysctl -w net.inet.ip.forwarding=1 >/dev/null
fi fi
if [ "X$forward_sourceroute" = X"YES" ]; then if [ "X$forward_sourceroute" = X"YES" ]; then
echo -n ' do source routing=YES' echo -n ' do source routing=YES'
sysctl -w net.inet.ip.sourceroute=1 >/dev/null 2>&1 sysctl -w net.inet.ip.sourceroute=1 >/dev/null
fi fi
if [ "X$accept_sourceroute" = X"YES" ]; then if [ "X$accept_sourceroute" = X"YES" ]; then
echo -n ' accept source routing=YES' echo -n ' accept source routing=YES'
sysctl -w net.inet.ip.accept_sourceroute=1 >/dev/null 2>&1 sysctl -w net.inet.ip.accept_sourceroute=1 >/dev/null
fi fi
if [ "X$tcp_keepalive" = X"YES" ]; then if [ "X$tcp_keepalive" = X"YES" ]; then
echo -n ' TCP keepalive=YES' echo -n ' TCP keepalive=YES'
sysctl -w net.inet.tcp.always_keepalive=1 >/dev/null 2>&1 sysctl -w net.inet.tcp.always_keepalive=1 >/dev/null
fi fi
if [ "X$ipxgateway_enable" = X"YES" ]; then if [ "X$ipxgateway_enable" = X"YES" ]; then
echo -n ' IPX gateway=YES' echo -n ' IPX gateway=YES'
sysctl -w net.ipx.ipx.ipxforwarding=1 >/dev/null 2>&1 sysctl -w net.ipx.ipx.ipxforwarding=1 >/dev/null
fi fi
if [ "X$arpproxy_all" = X"YES" ]; then if [ "X$arpproxy_all" = X"YES" ]; then
echo -n ' enabling ARP_PROXY_ALL: ' echo -n ' ARP proxyall=YES'
sysctl -w net.link.ether.inet.proxyall=1 2>&1 sysctl -w net.link.ether.inet.proxyall=1 >/dev/null
fi fi
echo '.' echo '.'
@ -289,7 +289,8 @@ network_pass3() {
fi fi
mountd ${mountd_flags} mountd ${mountd_flags}
if [ "X${nfs_reserved_port_only}" = X"YES" ]; then if [ "X${nfs_reserved_port_only}" = X"YES" ]; then
sysctl -w vfs.nfs.nfs_privport=1 >/dev/null 2>&1 echo -n ' NFS on reserved port only=YES'
sysctl -w vfs.nfs.nfs_privport=1 >/dev/null
fi fi
echo -n ' nfsd'; nfsd ${nfs_server_flags} echo -n ' nfsd'; nfsd ${nfs_server_flags}
if [ "X$rpc_lockd_enable" = X"YES" ]; then if [ "X$rpc_lockd_enable" = X"YES" ]; then
@ -303,8 +304,9 @@ network_pass3() {
if [ "X${nfs_client_enable}" = X"YES" ]; then if [ "X${nfs_client_enable}" = X"YES" ]; then
echo -n ' nfsiod'; nfsiod ${nfs_client_flags} echo -n ' nfsiod'; nfsiod ${nfs_client_flags}
if [ "X${nfs_access_cache}" != X ]; then if [ "X${nfs_access_cache}" != X ]; then
echo -n " NFS access cache time=${nfs_access_cache}"
sysctl -w vfs.nfs.access_cache_timeout=${nfs_access_cache} \ sysctl -w vfs.nfs.access_cache_timeout=${nfs_access_cache} \
>/dev/null 2>&1 >/dev/null
fi fi
fi fi

View file

@ -1,6 +1,6 @@
#!/bin/sh - #!/bin/sh -
# #
# $Id: rc.network,v 1.44 1999/04/12 15:26:41 brian Exp $ # $Id: rc.network,v 1.45 1999/06/05 05:45:47 phk Exp $
# From: @(#)netstart 5.9 (Berkeley) 3/30/91 # From: @(#)netstart 5.9 (Berkeley) 3/30/91
# Note that almost all the user-configurable behavior is no longer in # Note that almost all the user-configurable behavior is no longer in
@ -151,48 +151,48 @@ network_pass1() {
echo -n 'Additional routing options:' echo -n 'Additional routing options:'
if [ -n "$tcp_extensions" -a "x$tcp_extensions" != "xYES" ] ; then if [ -n "$tcp_extensions" -a "x$tcp_extensions" != "xYES" ] ; then
echo -n ' tcp extensions=NO' echo -n ' tcp extensions=NO'
sysctl -w net.inet.tcp.rfc1323=0 >/dev/null 2>&1 sysctl -w net.inet.tcp.rfc1323=0 >/dev/null
fi fi
if [ -n "$log_in_vain" -a "x$log_in_vain" != "xNO" ] ; then if [ -n "$log_in_vain" -a "x$log_in_vain" != "xNO" ] ; then
echo -n ' log_in_vain=YES' echo -n ' log_in_vain=YES'
sysctl -w net.inet.tcp.log_in_vain=1 >/dev/null 2>&1 sysctl -w net.inet.tcp.log_in_vain=1 >/dev/null
sysctl -w net.inet.udp.log_in_vain=1 >/dev/null 2>&1 sysctl -w net.inet.udp.log_in_vain=1 >/dev/null
fi fi
if [ X"$icmp_bmcastecho" = X"YES" ]; then if [ X"$icmp_bmcastecho" = X"YES" ]; then
echo -n ' broadcast ping responses=YES' echo -n ' broadcast ping responses=YES'
sysctl -w net.inet.icmp.bmcastecho=1 >/dev/null 2>&1 sysctl -w net.inet.icmp.bmcastecho=1 >/dev/null
fi fi
if [ "X$gateway_enable" = X"YES" ]; then if [ "X$gateway_enable" = X"YES" ]; then
echo -n ' IP gateway=YES' echo -n ' IP gateway=YES'
sysctl -w net.inet.ip.forwarding=1 >/dev/null 2>&1 sysctl -w net.inet.ip.forwarding=1 >/dev/null
fi fi
if [ "X$forward_sourceroute" = X"YES" ]; then if [ "X$forward_sourceroute" = X"YES" ]; then
echo -n ' do source routing=YES' echo -n ' do source routing=YES'
sysctl -w net.inet.ip.sourceroute=1 >/dev/null 2>&1 sysctl -w net.inet.ip.sourceroute=1 >/dev/null
fi fi
if [ "X$accept_sourceroute" = X"YES" ]; then if [ "X$accept_sourceroute" = X"YES" ]; then
echo -n ' accept source routing=YES' echo -n ' accept source routing=YES'
sysctl -w net.inet.ip.accept_sourceroute=1 >/dev/null 2>&1 sysctl -w net.inet.ip.accept_sourceroute=1 >/dev/null
fi fi
if [ "X$tcp_keepalive" = X"YES" ]; then if [ "X$tcp_keepalive" = X"YES" ]; then
echo -n ' TCP keepalive=YES' echo -n ' TCP keepalive=YES'
sysctl -w net.inet.tcp.always_keepalive=1 >/dev/null 2>&1 sysctl -w net.inet.tcp.always_keepalive=1 >/dev/null
fi fi
if [ "X$ipxgateway_enable" = X"YES" ]; then if [ "X$ipxgateway_enable" = X"YES" ]; then
echo -n ' IPX gateway=YES' echo -n ' IPX gateway=YES'
sysctl -w net.ipx.ipx.ipxforwarding=1 >/dev/null 2>&1 sysctl -w net.ipx.ipx.ipxforwarding=1 >/dev/null
fi fi
if [ "X$arpproxy_all" = X"YES" ]; then if [ "X$arpproxy_all" = X"YES" ]; then
echo -n ' enabling ARP_PROXY_ALL: ' echo -n ' ARP proxyall=YES'
sysctl -w net.link.ether.inet.proxyall=1 2>&1 sysctl -w net.link.ether.inet.proxyall=1 >/dev/null
fi fi
echo '.' echo '.'
@ -289,7 +289,8 @@ network_pass3() {
fi fi
mountd ${mountd_flags} mountd ${mountd_flags}
if [ "X${nfs_reserved_port_only}" = X"YES" ]; then if [ "X${nfs_reserved_port_only}" = X"YES" ]; then
sysctl -w vfs.nfs.nfs_privport=1 >/dev/null 2>&1 echo -n ' NFS on reserved port only=YES'
sysctl -w vfs.nfs.nfs_privport=1 >/dev/null
fi fi
echo -n ' nfsd'; nfsd ${nfs_server_flags} echo -n ' nfsd'; nfsd ${nfs_server_flags}
if [ "X$rpc_lockd_enable" = X"YES" ]; then if [ "X$rpc_lockd_enable" = X"YES" ]; then
@ -303,8 +304,9 @@ network_pass3() {
if [ "X${nfs_client_enable}" = X"YES" ]; then if [ "X${nfs_client_enable}" = X"YES" ]; then
echo -n ' nfsiod'; nfsiod ${nfs_client_flags} echo -n ' nfsiod'; nfsiod ${nfs_client_flags}
if [ "X${nfs_access_cache}" != X ]; then if [ "X${nfs_access_cache}" != X ]; then
echo -n " NFS access cache time=${nfs_access_cache}"
sysctl -w vfs.nfs.access_cache_timeout=${nfs_access_cache} \ sysctl -w vfs.nfs.access_cache_timeout=${nfs_access_cache} \
>/dev/null 2>&1 >/dev/null
fi fi
fi fi