Update of /cvsroot/leaf/src/bering-uclibc/apps/etc/skel/init.d
In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv783/skel/init.d
Modified Files:
networking
Log Message:
greatly simplified the network init.d script by putting the proc setting in
sysctl.conf like is also done upstream. This change also saves 500 bytes in the
etc package
Index: networking
===================================================================
RCS file: /cvsroot/leaf/src/bering-uclibc/apps/etc/skel/init.d/networking,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** networking 6 Aug 2006 09:04:32 -0000 1.2
--- networking 29 Aug 2006 18:02:51 -0000 1.3
***************
*** 8,78 ****
fi
- spoofprotect_rp_filter () {
- # This is the best method: turn on Source Address Verification and get
- # spoof protection on all current and future interfaces.
-
- if [ -e /proc/sys/net/ipv4/conf/all/rp_filter ]; then
- for f in /proc/sys/net/ipv4/conf/*/rp_filter; do
- echo 1 > $f
- done
- return 0
- else
- return 1
- fi
- }
-
- spoofprotect () {
- echo -n "Setting up IP spoofing protection: "
- if spoofprotect_rp_filter; then
- echo "rp_filter."
- else
- echo "FAILED"
- fi
- }
-
- ip_forward () {
- if [ -e /proc/sys/net/ipv4/ip_forward ]; then
- echo -n "Enabling packet forwarding: "
- echo 1 > /proc/sys/net/ipv4/ip_forward
- echo "done."
- fi
- }
-
- ipv6_forward () {
- if [ -e /proc/sys/net/ipv6/conf/all/forwarding ]; then
- echo -n "Enabling ipv6 packet forwarding: "
- echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
- echo "done."
- fi
- }
-
- syncookies () {
- if [ -e /proc/sys/net/ipv4/tcp_syncookies ]; then
- echo -n "Enabling TCP/IP SYN cookies: "
- echo 1 > /proc/sys/net/ipv4/tcp_syncookies
- echo "done."
- fi
- }
-
- doopt () {
- optname=$1
- default=$2
- opt=`grep "^$optname=" /etc/network/options`
- if [ -z "$opt" ]; then
- opt="$optname=$default"
- fi
- optval=${opt#$optname=}
- if [ "$optval" = "yes" ]; then
- eval $optname
- fi
- }
-
case "$1" in
start)
- doopt spoofprotect yes
- doopt syncookies no
- doopt ip_forward no
- doopt ipv6_forward no
-
echo -n "Configuring network interfaces: "
ifup -a
--- 8,13 ----
***************
*** 107,109 ****
exit 0
-
--- 42,43 ----
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
leaf-cvs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/leaf-cvs-commits