summaryrefslogtreecommitdiff
path: root/netbase
diff options
context:
space:
mode:
authorChris Larson <clarson@kergoth.com>2004-11-09 00:36:47 +0000
committerChris Larson <clarson@kergoth.com>2004-11-09 00:36:47 +0000
commitf96441b9faf769c9ecdd4d338b605ea3d0cc4010 (patch)
treeedb17ec2c4ea13c5acb1c7350957a249a820e28d /netbase
parentb6588aa6851fb220cedc387d21c51513ef8d67f4 (diff)
Disable bk EOLN_NATIVE conversions on all files in packages FILESPATHs, to prevent it screwing up patches.
BKrev: 4190111fA4MuVozAqwE7xOSL9fr-TA
Diffstat (limited to 'netbase')
-rw-r--r--netbase/netbase/beagle/interfaces18
-rw-r--r--netbase/netbase/busybox.patch13
-rw-r--r--netbase/netbase/epia/interfaces10
-rw-r--r--netbase/netbase/hosts2
-rw-r--r--netbase/netbase/init102
-rw-r--r--netbase/netbase/interfaces18
-rw-r--r--netbase/netbase/options3
-rw-r--r--netbase/netbase/xxs1500/interfaces15
8 files changed, 181 insertions, 0 deletions
diff --git a/netbase/netbase/beagle/interfaces b/netbase/netbase/beagle/interfaces
index e69de29bb2..73a109088b 100644
--- a/netbase/netbase/beagle/interfaces
+++ b/netbase/netbase/beagle/interfaces
@@ -0,0 +1,18 @@
+# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
+
+# The loopback interface
+auto lo usbf
+iface lo inet loopback
+
+# Wireless interfaces
+iface wlan0 inet dhcp
+wireless_mode managed
+iface atml0 inet dhcp
+
+# Wired or wireless interfaces
+iface eth0 inet dhcp
+iface eth1 inet dhcp
+
+# Zaurus usbnet
+iface usbf inet dhcp
+
diff --git a/netbase/netbase/busybox.patch b/netbase/netbase/busybox.patch
index e69de29bb2..845bb421ed 100644
--- a/netbase/netbase/busybox.patch
+++ b/netbase/netbase/busybox.patch
@@ -0,0 +1,13 @@
+--- netbase-3.18.orig/debian/networking.init.d~busybox
++++ netbase-3.18.orig/debian/networking.init.d
+@@ -15,8 +15,8 @@
+ # 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
++ for f in /proc/sys/net/ipv4/conf/*; do
++ echo 1 > $f/rp_filter
+ done
+ return 0
+ else
diff --git a/netbase/netbase/epia/interfaces b/netbase/netbase/epia/interfaces
index e69de29bb2..673618f636 100644
--- a/netbase/netbase/epia/interfaces
+++ b/netbase/netbase/epia/interfaces
@@ -0,0 +1,10 @@
+# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
+
+# The loopback interface
+auto lo
+iface lo inet loopback
+
+# Ethernet
+auto eth0
+iface eth0 inet dhcp
+
diff --git a/netbase/netbase/hosts b/netbase/netbase/hosts
index e69de29bb2..2f332451b5 100644
--- a/netbase/netbase/hosts
+++ b/netbase/netbase/hosts
@@ -0,0 +1,2 @@
+127.0.0.1 localhost.localdomain localhost
+
diff --git a/netbase/netbase/init b/netbase/netbase/init
index e69de29bb2..8d6b9aa426 100644
--- a/netbase/netbase/init
+++ b/netbase/netbase/init
@@ -0,0 +1,102 @@
+#!/bin/sh
+#
+# manage network interfaces and configure some networking options
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+
+if ! [ -x /sbin/ifup ]; then
+ exit 0
+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/*; do
+ [ -e $f/rp_filter ] && echo 1 > $f/rp_filter
+ 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
+}
+
+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
+
+ echo -n "Configuring network interfaces... "
+ ifup -a
+ echo "done."
+ ;;
+ stop)
+ if sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\1 \2/p' /proc/mounts |
+ grep -q "^/ nfs$"; then
+ echo "NOT deconfiguring network interfaces: / is an NFS mount"
+ elif sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\1 \2/p' /proc/mounts |
+ grep -q "^/ smbfs$"; then
+ echo "NOT deconfiguring network interfaces: / is an SMB mount"
+ elif sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\2/p' /proc/mounts |
+ grep -qE '^(nfs|smbfs|ncp|coda)$'; then
+ echo "NOT deconfiguring network interfaces: network shares still mounted."
+ else
+ echo -n "Deconfiguring network interfaces... "
+ ifdown -a
+ echo "done."
+ fi
+ ;;
+ force-reload|restart)
+ echo -n "Reconfiguring network interfaces... "
+ ifdown -a
+ ifup -a
+ echo "done."
+ ;;
+ *)
+ echo "Usage: /etc/init.d/networking {start|stop|restart|force-reload}"
+ exit 1
+ ;;
+esac
+
+exit 0
+
diff --git a/netbase/netbase/interfaces b/netbase/netbase/interfaces
index e69de29bb2..908d074061 100644
--- a/netbase/netbase/interfaces
+++ b/netbase/netbase/interfaces
@@ -0,0 +1,18 @@
+# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
+
+# The loopback interface
+auto lo
+iface lo inet loopback
+
+# Wireless interfaces
+iface wlan0 inet dhcp
+wireless_mode managed
+iface atml0 inet dhcp
+
+# Wired or wireless interfaces
+iface eth0 inet dhcp
+iface eth1 inet dhcp
+
+# Zaurus usbnet
+iface usbd0 inet dhcp
+
diff --git a/netbase/netbase/options b/netbase/netbase/options
index e69de29bb2..2000189d19 100644
--- a/netbase/netbase/options
+++ b/netbase/netbase/options
@@ -0,0 +1,3 @@
+ip_forward=no
+spoofprotect=yes
+syncookies=no
diff --git a/netbase/netbase/xxs1500/interfaces b/netbase/netbase/xxs1500/interfaces
index e69de29bb2..23ccccd2dd 100644
--- a/netbase/netbase/xxs1500/interfaces
+++ b/netbase/netbase/xxs1500/interfaces
@@ -0,0 +1,15 @@
+# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
+
+# The loopback interface
+auto lo
+iface lo inet loopback
+
+# Ethernet
+auto eth0 eth1
+iface eth0 inet static
+ address 192.168.127.1
+ netmask 255.255.255.0
+
+iface eth1 inet static
+ address 192.168.128.1
+ netmask 255.255.255.0