From owner-freebsd-bugs Fri Jan 4 10:10:45 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id BC8B337B420 for ; Fri, 4 Jan 2002 10:10:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g04IA1s19608; Fri, 4 Jan 2002 10:10:01 -0800 (PST) (envelope-from gnats) Received: from fw.tovaris.com (fw-an0.tovaris.com [209.145.84.34]) by hub.freebsd.org (Postfix) with ESMTP id 56DF937B41A for ; Fri, 4 Jan 2002 10:03:50 -0800 (PST) Received: from atf.intranet (fw-an0.tovaris.com [209.145.84.34]) by fw.tovaris.com (8.11.6/8.11.6) with ESMTP id g04I3mC50246 (using TLSv1/SSLv3 with cipher EDH-RSA-DES-CBC3-SHA (168 bits) verified NO) for ; Fri, 4 Jan 2002 13:03:49 -0500 (EST) (envelope-from adrian@mail.tovaris.com) Received: (from adrian@localhost) by atf.intranet (8.11.6/8.11.6) id g04I3oM01088; Fri, 4 Jan 2002 13:03:50 -0500 (EST) (envelope-from adrian) Message-Id: <200201041803.g04I3oM01088@atf.intranet> Date: Fri, 4 Jan 2002 13:03:50 -0500 (EST) From: Adrian Filipi-Martin Reply-To: Adrian Filipi-Martin To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: misc/33544: removal of depricated sysctl flag use in /etc/rc* scripts Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 33544 >Category: misc >Synopsis: removal of depricated sysctl flag use in /etc/rc* scripts >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Jan 04 10:10:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: Adrian Filipi-Martin >Release: FreeBSD 4.4-RELEASE-p1 i386 >Organization: Ubergeeks Consulting >Environment: System: FreeBSD atf.intranet 4.4-RELEASE-p1 FreeBSD 4.4-RELEASE-p1 #24: Fri Dec 7 09:06:10 EST 2001 root@atf.intranet:/home/obj/usr/src/sys/ATF i386 >Description: The -w flag to sysctl(8) is depricated, but still used in several rc scripts. >How-To-Repeat: Read sysctl(8) and /etc/rc{,.network,.network6}. >Fix: Apply this patch. --- rc.orig Fri Jan 4 12:55:47 2002 +++ rc Fri Jan 4 12:55:56 2002 @@ -703,7 +703,7 @@ [Yy][Ee][Ss]) if [ "${kern_securelevel}" -ge 0 ]; then echo 'Raising kernel security level: ' - sysctl -w kern.securelevel=${kern_securelevel} + sysctl kern.securelevel=${kern_securelevel} fi ;; esac --- rc.network.orig Fri Jan 4 12:59:32 2002 +++ rc.network Fri Jan 4 13:00:10 2002 @@ -309,7 +309,7 @@ case ${firewall_logging} in [Yy][Ee][Ss] | '') echo 'Firewall logging=YES' - sysctl -w net.inet.ip.fw.verbose=1 >/dev/null + sysctl net.inet.ip.fw.verbose=1 >/dev/null ;; *) ;; @@ -352,77 +352,77 @@ ;; *) echo -n ' tcp extensions=NO' - sysctl -w net.inet.tcp.rfc1323=0 >/dev/null + sysctl net.inet.tcp.rfc1323=0 >/dev/null ;; esac case ${icmp_bmcastecho} in [Yy][Ee][Ss]) echo -n ' broadcast ping responses=YES' - sysctl -w net.inet.icmp.bmcastecho=1 >/dev/null + sysctl net.inet.icmp.bmcastecho=1 >/dev/null ;; esac case ${icmp_drop_redirect} in [Yy][Ee][Ss]) 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 ;; esac case ${icmp_log_redirect} in [Yy][Ee][Ss]) 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 ;; esac case ${gateway_enable} in [Yy][Ee][Ss]) echo -n ' IP gateway=YES' - sysctl -w net.inet.ip.forwarding=1 >/dev/null + sysctl net.inet.ip.forwarding=1 >/dev/null ;; esac case ${forward_sourceroute} in [Yy][Ee][Ss]) echo -n ' do source routing=YES' - sysctl -w net.inet.ip.sourceroute=1 >/dev/null + sysctl net.inet.ip.sourceroute=1 >/dev/null ;; esac case ${accept_sourceroute} in [Yy][Ee][Ss]) 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 ;; esac case ${tcp_keepalive} in [Yy][Ee][Ss]) echo -n ' TCP keepalive=YES' - sysctl -w net.inet.tcp.always_keepalive=1 >/dev/null + sysctl net.inet.tcp.always_keepalive=1 >/dev/null ;; esac case ${tcp_drop_synfin} in [Yy][Ee][Ss]) echo -n ' drop SYN+FIN packets=YES' - sysctl -w net.inet.tcp.drop_synfin=1 >/dev/null + sysctl net.inet.tcp.drop_synfin=1 >/dev/null ;; esac case ${ipxgateway_enable} in [Yy][Ee][Ss]) echo -n ' IPX gateway=YES' - sysctl -w net.ipx.ipx.ipxforwarding=1 >/dev/null + sysctl net.ipx.ipx.ipxforwarding=1 >/dev/null ;; esac case ${arpproxy_all} in [Yy][Ee][Ss]) echo -n ' ARP proxyall=YES' - sysctl -w net.link.ether.inet.proxyall=1 >/dev/null + sysctl net.link.ether.inet.proxyall=1 >/dev/null ;; esac @@ -431,7 +431,7 @@ ;; *) 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 @@ -440,7 +440,7 @@ ;; *) 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 @@ -602,14 +602,14 @@ case ${nfs_reserved_port_only} in [Yy][Ee][Ss]) echo -n ' NFS on reserved port only=YES' - sysctl -w vfs.nfs.nfs_privport=1 >/dev/null + sysctl vfs.nfs.nfs_privport=1 >/dev/null ;; esac echo -n ' nfsd'; nfsd ${nfs_server_flags} if [ -n "${nfs_bufpackets}" ]; then - sysctl -w vfs.nfs.bufpackets=${nfs_bufpackets} \ + sysctl vfs.nfs.bufpackets=${nfs_bufpackets} \ > /dev/null fi @@ -650,7 +650,7 @@ echo -n ' nfsiod'; nfsiod ${nfs_client_flags} if [ -n "${nfs_access_cache}" ]; then echo -n " NFS access cache time=${nfs_access_cache}" - sysctl -w vfs.nfs.access_cache_timeout=${nfs_access_cache} \ + sysctl vfs.nfs.access_cache_timeout=${nfs_access_cache} \ >/dev/null fi ;; @@ -764,8 +764,8 @@ ;; *) echo -n ' log_in_vain=YES' - sysctl -w net.inet.tcp.log_in_vain=1 >/dev/null - sysctl -w net.inet.udp.log_in_vain=1 >/dev/null + sysctl net.inet.tcp.log_in_vain=1 >/dev/null + sysctl net.inet.udp.log_in_vain=1 >/dev/null ;; esac --- rc.network6.orig Fri Jan 4 12:59:37 2002 +++ rc.network6 Fri Jan 4 13:00:40 2002 @@ -78,7 +78,7 @@ case ${ipv6_firewall_logging} in [Yy][Ee][Ss] | '') echo 'IPv6 Firewall logging=YES' - sysctl -w net.inet6.ip6.fw.verbose=1 >/dev/null + sysctl net.inet6.ip6.fw.verbose=1 >/dev/null ;; *) ;; @@ -108,8 +108,8 @@ case ${ipv6_gateway_enable} in [Yy][Ee][Ss]) # act as a router - sysctl -w net.inet6.ip6.forwarding=1 - sysctl -w net.inet6.ip6.accept_rtadv=0 + sysctl net.inet6.ip6.forwarding=1 + sysctl net.inet6.ip6.accept_rtadv=0 # wait for DAD for i in $ipv6_network_interfaces; do @@ -120,8 +120,8 @@ ;; *) # act as endhost - start with manual configuration - sysctl -w net.inet6.ip6.forwarding=0 - sysctl -w net.inet6.ip6.accept_rtadv=0 + sysctl net.inet6.ip6.forwarding=0 + sysctl net.inet6.ip6.accept_rtadv=0 ;; esac @@ -235,11 +235,11 @@ case ${ipv6_ipv4mapping} in [Yy][Ee][Ss]) echo -n ' IPv4 mapped IPv6 address support=YES' - sysctl -w net.inet6.ip6.v6only=0 >/dev/null + sysctl net.inet6.ip6.v6only=0 >/dev/null ;; '' | *) echo -n ' IPv4 mapped IPv6 address support=NO' - sysctl -w net.inet6.ip6.v6only=1 >/dev/null + sysctl net.inet6.ip6.v6only=1 >/dev/null ;; esac @@ -318,7 +318,7 @@ # You can configure only single interface, as # specification assumes that autoconfigured host has # single interface only. - sysctl -w net.inet6.ip6.accept_rtadv=1 + sysctl net.inet6.ip6.accept_rtadv=1 set ${rtsol_interfaces} ifconfig $1 up rtsol $1 @@ -397,7 +397,7 @@ [Nn][Oo] | '') ;; *) - sysctl -w net.inet6.ip6.keepfaith=1 + sysctl net.inet6.ip6.keepfaith=1 ifconfig faith0 up for prefix in ${ipv6_faith_prefix}; do prefixlen=`expr "${prefix}" : ".*/\(.*\)"` >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message