summaryrefslogtreecommitdiffstats
path: root/meta/packages/netbase
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2006-07-21 10:10:31 +0000
committerRichard Purdie <richard@openedhand.com>2006-07-21 10:10:31 +0000
commitb2f192faabe412adce79534e22efe9fb69ee40e2 (patch)
tree7076c49d4286f8a1733650bd8fbc7161af200d57 /meta/packages/netbase
parent2cf0eadf9f730027833af802d7e6c90b44248f80 (diff)
downloadpoky-b2f192faabe412adce79534e22efe9fb69ee40e2.tar.gz
Rename /openembedded/ -> /meta/
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@530 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/netbase')
-rw-r--r--meta/packages/netbase/netbase/busybox.patch13
-rw-r--r--meta/packages/netbase/netbase/colinux/interfaces8
-rw-r--r--meta/packages/netbase/netbase/epia/interfaces10
-rw-r--r--meta/packages/netbase/netbase/hosts2
-rw-r--r--meta/packages/netbase/netbase/init102
-rw-r--r--meta/packages/netbase/netbase/interfaces43
-rw-r--r--meta/packages/netbase/netbase/mtx-1/interfaces29
-rw-r--r--meta/packages/netbase/netbase/openmn/hosts2
-rw-r--r--meta/packages/netbase/netbase/openmn/interfaces10
-rw-r--r--meta/packages/netbase/netbase/options3
-rw-r--r--meta/packages/netbase/netbase/tosa/interfaces24
-rw-r--r--meta/packages/netbase/netbase/wrt54/interfaces23
-rw-r--r--meta/packages/netbase/netbase/xxs1500/interfaces15
-rw-r--r--meta/packages/netbase/netbase_4.21.bb42
14 files changed, 326 insertions, 0 deletions
diff --git a/meta/packages/netbase/netbase/busybox.patch b/meta/packages/netbase/netbase/busybox.patch
new file mode 100644
index 0000000000..845bb421ed
--- /dev/null
+++ b/meta/packages/netbase/netbase/busybox.patch
@@ -0,0 +1,13 @@
1--- netbase-3.18.orig/debian/networking.init.d~busybox
2+++ netbase-3.18.orig/debian/networking.init.d
3@@ -15,8 +15,8 @@
4 # spoof protection on all current and future interfaces.
5
6 if [ -e /proc/sys/net/ipv4/conf/all/rp_filter ]; then
7- for f in /proc/sys/net/ipv4/conf/*/rp_filter; do
8- echo 1 > $f
9+ for f in /proc/sys/net/ipv4/conf/*; do
10+ echo 1 > $f/rp_filter
11 done
12 return 0
13 else
diff --git a/meta/packages/netbase/netbase/colinux/interfaces b/meta/packages/netbase/netbase/colinux/interfaces
new file mode 100644
index 0000000000..0e495e164e
--- /dev/null
+++ b/meta/packages/netbase/netbase/colinux/interfaces
@@ -0,0 +1,8 @@
1# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
2
3# The loopback interface
4auto lo
5iface lo inet loopback
6
7# Wired or wireless interfaces
8iface eth0 inet dhcp
diff --git a/meta/packages/netbase/netbase/epia/interfaces b/meta/packages/netbase/netbase/epia/interfaces
new file mode 100644
index 0000000000..673618f636
--- /dev/null
+++ b/meta/packages/netbase/netbase/epia/interfaces
@@ -0,0 +1,10 @@
1# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
2
3# The loopback interface
4auto lo
5iface lo inet loopback
6
7# Ethernet
8auto eth0
9iface eth0 inet dhcp
10
diff --git a/meta/packages/netbase/netbase/hosts b/meta/packages/netbase/netbase/hosts
new file mode 100644
index 0000000000..2f332451b5
--- /dev/null
+++ b/meta/packages/netbase/netbase/hosts
@@ -0,0 +1,2 @@
1127.0.0.1 localhost.localdomain localhost
2
diff --git a/meta/packages/netbase/netbase/init b/meta/packages/netbase/netbase/init
new file mode 100644
index 0000000000..8d6b9aa426
--- /dev/null
+++ b/meta/packages/netbase/netbase/init
@@ -0,0 +1,102 @@
1#!/bin/sh
2#
3# manage network interfaces and configure some networking options
4
5PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
6
7if ! [ -x /sbin/ifup ]; then
8 exit 0
9fi
10
11spoofprotect_rp_filter () {
12 # This is the best method: turn on Source Address Verification and get
13 # spoof protection on all current and future interfaces.
14
15 if [ -e /proc/sys/net/ipv4/conf/all/rp_filter ]; then
16 for f in /proc/sys/net/ipv4/conf/*; do
17 [ -e $f/rp_filter ] && echo 1 > $f/rp_filter
18 done
19 return 0
20 else
21 return 1
22 fi
23}
24
25spoofprotect () {
26 echo -n "Setting up IP spoofing protection: "
27 if spoofprotect_rp_filter; then
28 echo "rp_filter."
29 else
30 echo "FAILED."
31 fi
32}
33
34ip_forward () {
35 if [ -e /proc/sys/net/ipv4/ip_forward ]; then
36 echo -n "Enabling packet forwarding... "
37 echo 1 > /proc/sys/net/ipv4/ip_forward
38 echo "done."
39 fi
40}
41
42syncookies () {
43 if [ -e /proc/sys/net/ipv4/tcp_syncookies ]; then
44 echo -n "Enabling TCP/IP SYN cookies... "
45 echo 1 > /proc/sys/net/ipv4/tcp_syncookies
46 echo "done."
47 fi
48}
49
50doopt () {
51 optname=$1
52 default=$2
53 opt=`grep "^$optname=" /etc/network/options`
54 if [ -z "$opt" ]; then
55 opt="$optname=$default"
56 fi
57 optval=${opt#$optname=}
58 if [ "$optval" = "yes" ]; then
59 eval $optname
60 fi
61}
62
63case "$1" in
64 start)
65 doopt spoofprotect yes
66 doopt syncookies no
67 doopt ip_forward no
68
69 echo -n "Configuring network interfaces... "
70 ifup -a
71 echo "done."
72 ;;
73 stop)
74 if sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\1 \2/p' /proc/mounts |
75 grep -q "^/ nfs$"; then
76 echo "NOT deconfiguring network interfaces: / is an NFS mount"
77 elif sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\1 \2/p' /proc/mounts |
78 grep -q "^/ smbfs$"; then
79 echo "NOT deconfiguring network interfaces: / is an SMB mount"
80 elif sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\2/p' /proc/mounts |
81 grep -qE '^(nfs|smbfs|ncp|coda)$'; then
82 echo "NOT deconfiguring network interfaces: network shares still mounted."
83 else
84 echo -n "Deconfiguring network interfaces... "
85 ifdown -a
86 echo "done."
87 fi
88 ;;
89 force-reload|restart)
90 echo -n "Reconfiguring network interfaces... "
91 ifdown -a
92 ifup -a
93 echo "done."
94 ;;
95 *)
96 echo "Usage: /etc/init.d/networking {start|stop|restart|force-reload}"
97 exit 1
98 ;;
99esac
100
101exit 0
102
diff --git a/meta/packages/netbase/netbase/interfaces b/meta/packages/netbase/netbase/interfaces
new file mode 100644
index 0000000000..fbeb14ffbc
--- /dev/null
+++ b/meta/packages/netbase/netbase/interfaces
@@ -0,0 +1,43 @@
1# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
2
3# The loopback interface
4auto lo
5iface lo inet loopback
6
7# Wireless interfaces
8iface wlan0 inet dhcp
9wireless_mode managed
10wireless_essid any
11iface atml0 inet dhcp
12
13# Wired or wireless interfaces
14iface eth0 inet dhcp
15iface eth1 inet dhcp
16
17# Ethernet/RNDIS gadget (g_ether)
18# ... or on host side, usbnet and random hwaddr
19iface usb0 inet static
20 address 192.168.0.202
21 netmask 255.255.255.0
22 network 192.168.0.0
23 gateway 192.168.0.200
24
25
26# Zaurus 2.4 Lineo net_fd; obsolete
27iface usbd0 inet static
28 address 192.168.129.201
29 netmask 255.255.255.0
30 network 192.168.129.0
31 gateway 192.168.129.200
32
33# iPAQ 2.4 mach-sa1100/usb-eth
34# (192.168.0.202 is the iPAQ's IP, 192.168.0.200 is the host's IP)
35iface usbf inet static
36 address 192.168.0.202
37 netmask 255.255.255.0
38 network 192.168.0.0
39 gateway 192.168.0.200
40
41# Bluetooth networking
42iface bnep0 inet dhcp
43
diff --git a/meta/packages/netbase/netbase/mtx-1/interfaces b/meta/packages/netbase/netbase/mtx-1/interfaces
new file mode 100644
index 0000000000..a7c6da5752
--- /dev/null
+++ b/meta/packages/netbase/netbase/mtx-1/interfaces
@@ -0,0 +1,29 @@
1# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
2
3# The loopback interface
4auto lo
5iface lo inet loopback
6
7# Ethernet
8auto eth0
9iface eth0 inet dhcp
10
11# wlan interface 1 for clients
12auto wlan0
13iface wlan0 inet static
14 address 10.0.0.1
15 netmask 255.0.0.0
16 wireless_mode master
17 wireless_essid cube-ap
18 wireless_channel 1
19
20# wlan interface 2 for mesh
21auto wlan1
22iface wlan1 inet static
23 address 172.16.0.1
24 netmask 255.240.0.0
25 broadcast 172.31.255.255
26 wireless_mode ad-hoc
27 wireless_essid cube-mesh
28 wireless_channel 11
29 wireless_rts 250
diff --git a/meta/packages/netbase/netbase/openmn/hosts b/meta/packages/netbase/netbase/openmn/hosts
new file mode 100644
index 0000000000..0205b98fc2
--- /dev/null
+++ b/meta/packages/netbase/netbase/openmn/hosts
@@ -0,0 +1,2 @@
1127.0.0.1 localhost.localdomain localhost
2192.168.233.1 www.mn-solutions.de
diff --git a/meta/packages/netbase/netbase/openmn/interfaces b/meta/packages/netbase/netbase/openmn/interfaces
new file mode 100644
index 0000000000..9ebe9b8ff1
--- /dev/null
+++ b/meta/packages/netbase/netbase/openmn/interfaces
@@ -0,0 +1,10 @@
1auto lo
2auto eth1
3
4iface lo inet loopback
5
6iface eth0 inet dhcp
7
8iface eth1 inet dhcp
9 wireless_mode managed
10 wireless_essid any
diff --git a/meta/packages/netbase/netbase/options b/meta/packages/netbase/netbase/options
new file mode 100644
index 0000000000..2000189d19
--- /dev/null
+++ b/meta/packages/netbase/netbase/options
@@ -0,0 +1,3 @@
1ip_forward=no
2spoofprotect=yes
3syncookies=no
diff --git a/meta/packages/netbase/netbase/tosa/interfaces b/meta/packages/netbase/netbase/tosa/interfaces
new file mode 100644
index 0000000000..92b022475c
--- /dev/null
+++ b/meta/packages/netbase/netbase/tosa/interfaces
@@ -0,0 +1,24 @@
1# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
2
3# The loopback interface
4auto lo
5iface lo inet loopback
6
7# Wireless interfaces
8iface wlan0 inet dhcp
9 wireless_type wlan-ng
10 wireless_mode Managed
11 pre-up modprobe prism2_usb
12 pre-up /sbin/usbctl on 1
13 post-down /sbin/usbctl off 1
14 post-down rmmod prism2_usb
15
16# Wired or wireless interfaces
17iface eth0 inet dhcp
18iface eth1 inet dhcp
19
20# Zaurus usbnet
21iface usbd0 inet dhcp
22
23# usbnet from the other side
24iface usb0 inet dhcp
diff --git a/meta/packages/netbase/netbase/wrt54/interfaces b/meta/packages/netbase/netbase/wrt54/interfaces
new file mode 100644
index 0000000000..8b2852ac51
--- /dev/null
+++ b/meta/packages/netbase/netbase/wrt54/interfaces
@@ -0,0 +1,23 @@
1# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
2
3# loopback interface
4auto lo
5iface lo inet loopback
6
7# the 4 LAN ports
8auto vlan0
9iface vlan0 inet static
10 address 192.168.1.1
11 netmask 255.255.255.0
12
13# WAN port
14auto vlan1
15iface vlan1 inet dhcp
16
17# wireless interface
18auto eth1
19iface eth1 inet static
20 wireless_mode master
21 wireless_essid wrt
22 address 10.0.0.1
23 netmask 255.255.255.0
diff --git a/meta/packages/netbase/netbase/xxs1500/interfaces b/meta/packages/netbase/netbase/xxs1500/interfaces
new file mode 100644
index 0000000000..23ccccd2dd
--- /dev/null
+++ b/meta/packages/netbase/netbase/xxs1500/interfaces
@@ -0,0 +1,15 @@
1# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
2
3# The loopback interface
4auto lo
5iface lo inet loopback
6
7# Ethernet
8auto eth0 eth1
9iface eth0 inet static
10 address 192.168.127.1
11 netmask 255.255.255.0
12
13iface eth1 inet static
14 address 192.168.128.1
15 netmask 255.255.255.0
diff --git a/meta/packages/netbase/netbase_4.21.bb b/meta/packages/netbase/netbase_4.21.bb
new file mode 100644
index 0000000000..d5526776eb
--- /dev/null
+++ b/meta/packages/netbase/netbase_4.21.bb
@@ -0,0 +1,42 @@
1SECTION = "base"
2DESCRIPTION = "This package provides the necessary \
3infrastructure for basic TCP/IP based networking."
4LICENSE = "GPL"
5PR = "r10"
6
7inherit update-rc.d
8
9INITSCRIPT_NAME = "networking"
10INITSCRIPT_PARAMS = "start 40 S . stop 40 0 6 1 ."
11# On MNCI etc, start very late so that our own apps come up faster
12INITSCRIPT_PARAMS_openmn = "start 85 1 2 3 4 5 . stop 85 0 6 1 ."
13# On SlugOS (NSLU2) delay the stop until after network apps have exited
14# Do not stop in single user - there's no way to sulogin!
15INITSCRIPT_PARAMS_slugos = "start 42 S 0 6 ."
16
17SRC_URI = "${DEBIAN_MIRROR}/main/n/netbase/netbase_${PV}.tar.gz \
18 file://options \
19 file://init \
20 file://hosts \
21 file://interfaces"
22
23do_install () {
24 install -d ${D}${sysconfdir}/init.d \
25 ${D}${sbindir} \
26 ${D}${mandir}/man8 \
27 ${D}${sysconfdir}/network/if-pre-up.d \
28 ${D}${sysconfdir}/network/if-up.d \
29 ${D}${sysconfdir}/network/if-down.d \
30 ${D}${sysconfdir}/network/if-post-down.d
31 install -m 0644 ${WORKDIR}/options ${D}${sysconfdir}/network/options
32 install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/networking
33 install -m 0644 ${WORKDIR}/hosts ${D}${sysconfdir}/hosts
34 install -m 0644 etc-rpc ${D}${sysconfdir}/rpc
35 install -m 0644 etc-protocols ${D}${sysconfdir}/protocols
36 install -m 0644 etc-services ${D}${sysconfdir}/services
37 install -m 0755 update-inetd ${D}${sbindir}/
38 install -m 0644 update-inetd.8 ${D}${mandir}/man8/
39 install -m 0644 ${WORKDIR}/interfaces ${D}${sysconfdir}/network/interfaces
40}
41
42CONFFILES_${PN} = "${sysconfdir}/network/options ${sysconfdir}/hosts ${sysconfdir}/network/interfaces"