Re: New Network sysctl.

H. Peter Anvin (hpa@transmeta.com)
19 Mar 1998 20:05:40 GMT


Followup to: <Pine.LNX.3.95.980319135431.169A-100000@chaos.analogic.com>
By author: "Richard B. Johnson" <root@chaos.analogic.com>
In newsgroup: linux.dev.kernel
>
> For those who have problems with the new /proc/sys/net/ipv4 layout...
>
> if test ${NEW_KERNEL}
> then
> echo "1" >/proc/sys/net/ipv4/ip_forward
> echo "1" >/proc/sys/net/ipv4/conf/default/proxy_arp
> echo "0" >/proc/sys/net/ipv4/conf/default/log_martians
> else
> echo "1" >/proc/sys/net/ipv4/ip_forwarding
> echo "1" >/proc/sys/net/ipv4/ip_proxy_arp
> echo "0" >/proc/sys/net/ipv4/ip_log_martians
> fi
>

How about:

if test -d /proc/sys/net/ipv4/conf ; then
echo "1" >/proc/sys/net/ipv4/ip_forward
echo "1" >/proc/sys/net/ipv4/conf/default/proxy_arp
echo "0" >/proc/sys/net/ipv4/conf/default/log_martians
else
echo "1" >/proc/sys/net/ipv4/ip_forwarding
echo "1" >/proc/sys/net/ipv4/ip_proxy_arp
echo "0" >/proc/sys/net/ipv4/ip_log_martians
fi

... seems to make more sense ...

-hpa

-- 
    PGP: 2047/2A960705 BA 03 D3 2C 14 A8 A8 BD  1E DF FE 69 EE 35 BD 74
    See http://www.zytor.com/~hpa/ for web page and full PGP public key
        I am Bahá'í -- ask me about it or see http://www.bahai.org/
   "To love another person is to see the face of God." -- Les Misérables

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu