diff options
author | Richard Purdie <richard@openedhand.com> | 2008-08-19 17:16:09 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2008-08-19 17:16:09 +0000 |
commit | 88213327d85e2c8f8df9a64c0c0cc9bfd42268f7 (patch) | |
tree | de3c56efc1d68872d5236177fa2e3775849cd528 /meta/packages/netbase | |
parent | 2bee9ce9ef24d703d153b36b92b8f14dc02f018f (diff) | |
download | poky-88213327d85e2c8f8df9a64c0c0cc9bfd42268f7.tar.gz |
netbase: Drop options file and options handling code, its replaced by sysctl.conf
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5078 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/netbase')
-rw-r--r-- | meta/packages/netbase/netbase/init | 56 | ||||
-rw-r--r-- | meta/packages/netbase/netbase/options | 3 | ||||
-rw-r--r-- | meta/packages/netbase/netbase_4.21.bb | 6 |
3 files changed, 2 insertions, 63 deletions
diff --git a/meta/packages/netbase/netbase/init b/meta/packages/netbase/netbase/init index e40578cfdf..8a67e1cef2 100644 --- a/meta/packages/netbase/netbase/init +++ b/meta/packages/netbase/netbase/init | |||
@@ -15,64 +15,8 @@ if ! [ -x /sbin/ifup ]; then | |||
15 | exit 0 | 15 | exit 0 |
16 | fi | 16 | fi |
17 | 17 | ||
18 | spoofprotect_rp_filter () { | ||
19 | # This is the best method: turn on Source Address Verification and get | ||
20 | # spoof protection on all current and future interfaces. | ||
21 | |||
22 | if [ -e /proc/sys/net/ipv4/conf/all/rp_filter ]; then | ||
23 | for f in /proc/sys/net/ipv4/conf/*; do | ||
24 | [ -e $f/rp_filter ] && echo 1 > $f/rp_filter | ||
25 | done | ||
26 | return 0 | ||
27 | else | ||
28 | return 1 | ||
29 | fi | ||
30 | } | ||
31 | |||
32 | spoofprotect () { | ||
33 | echo -n "Setting up IP spoofing protection: " | ||
34 | if spoofprotect_rp_filter; then | ||
35 | echo "rp_filter." | ||
36 | else | ||
37 | echo "FAILED." | ||
38 | fi | ||
39 | } | ||
40 | |||
41 | ip_forward () { | ||
42 | if [ -e /proc/sys/net/ipv4/ip_forward ]; then | ||
43 | echo -n "Enabling packet forwarding... " | ||
44 | echo 1 > /proc/sys/net/ipv4/ip_forward | ||
45 | echo "done." | ||
46 | fi | ||
47 | } | ||
48 | |||
49 | syncookies () { | ||
50 | if [ -e /proc/sys/net/ipv4/tcp_syncookies ]; then | ||
51 | echo -n "Enabling TCP/IP SYN cookies... " | ||
52 | echo 1 > /proc/sys/net/ipv4/tcp_syncookies | ||
53 | echo "done." | ||
54 | fi | ||
55 | } | ||
56 | |||
57 | doopt () { | ||
58 | optname=$1 | ||
59 | default=$2 | ||
60 | opt=`grep "^$optname=" /etc/network/options` | ||
61 | if [ -z "$opt" ]; then | ||
62 | opt="$optname=$default" | ||
63 | fi | ||
64 | optval=${opt#$optname=} | ||
65 | if [ "$optval" = "yes" ]; then | ||
66 | eval $optname | ||
67 | fi | ||
68 | } | ||
69 | |||
70 | case "$1" in | 18 | case "$1" in |
71 | start) | 19 | start) |
72 | doopt spoofprotect yes | ||
73 | doopt syncookies no | ||
74 | doopt ip_forward no | ||
75 | |||
76 | echo -n "Configuring network interfaces... " | 20 | echo -n "Configuring network interfaces... " |
77 | ifup -a | 21 | ifup -a |
78 | echo "done." | 22 | echo "done." |
diff --git a/meta/packages/netbase/netbase/options b/meta/packages/netbase/netbase/options deleted file mode 100644 index 2000189d19..0000000000 --- a/meta/packages/netbase/netbase/options +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | ip_forward=no | ||
2 | spoofprotect=yes | ||
3 | syncookies=no | ||
diff --git a/meta/packages/netbase/netbase_4.21.bb b/meta/packages/netbase/netbase_4.21.bb index f6ea116a0a..17c6bb9f3d 100644 --- a/meta/packages/netbase/netbase_4.21.bb +++ b/meta/packages/netbase/netbase_4.21.bb | |||
@@ -2,7 +2,7 @@ DESCRIPTION = "This package provides the necessary \ | |||
2 | infrastructure for basic TCP/IP based networking." | 2 | infrastructure for basic TCP/IP based networking." |
3 | SECTION = "base" | 3 | SECTION = "base" |
4 | LICENSE = "GPL" | 4 | LICENSE = "GPL" |
5 | PR = "r21" | 5 | PR = "r22" |
6 | 6 | ||
7 | inherit update-rc.d | 7 | inherit update-rc.d |
8 | 8 | ||
@@ -15,7 +15,6 @@ INITSCRIPT_PARAMS_openmn = "start 85 1 2 3 4 5 . stop 85 0 6 1 ." | |||
15 | INITSCRIPT_PARAMS_slugos = "start 42 S 0 6 ." | 15 | INITSCRIPT_PARAMS_slugos = "start 42 S 0 6 ." |
16 | 16 | ||
17 | SRC_URI = "${DEBIAN_MIRROR}/main/n/netbase/netbase_${PV}.tar.gz \ | 17 | SRC_URI = "${DEBIAN_MIRROR}/main/n/netbase/netbase_${PV}.tar.gz \ |
18 | file://options \ | ||
19 | file://init \ | 18 | file://init \ |
20 | file://hosts \ | 19 | file://hosts \ |
21 | file://interfaces" | 20 | file://interfaces" |
@@ -28,7 +27,6 @@ do_install () { | |||
28 | ${D}${sysconfdir}/network/if-up.d \ | 27 | ${D}${sysconfdir}/network/if-up.d \ |
29 | ${D}${sysconfdir}/network/if-down.d \ | 28 | ${D}${sysconfdir}/network/if-down.d \ |
30 | ${D}${sysconfdir}/network/if-post-down.d | 29 | ${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 | 30 | install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/networking |
33 | install -m 0644 ${WORKDIR}/hosts ${D}${sysconfdir}/hosts | 31 | install -m 0644 ${WORKDIR}/hosts ${D}${sysconfdir}/hosts |
34 | install -m 0644 etc-rpc ${D}${sysconfdir}/rpc | 32 | install -m 0644 etc-rpc ${D}${sysconfdir}/rpc |
@@ -48,7 +46,7 @@ do_install () { | |||
48 | esac | 46 | esac |
49 | } | 47 | } |
50 | 48 | ||
51 | CONFFILES_${PN} = "${sysconfdir}/network/options ${sysconfdir}/hosts ${sysconfdir}/network/interfaces" | 49 | CONFFILES_${PN} = "${sysconfdir}/hosts ${sysconfdir}/network/interfaces" |
52 | 50 | ||
53 | PACKAGE_ARCH_omap-3430sdp = "${MACHINE_ARCH}" | 51 | PACKAGE_ARCH_omap-3430sdp = "${MACHINE_ARCH}" |
54 | PACKAGE_ARCH_omap-3430ldp = "${MACHINE_ARCH}" | 52 | PACKAGE_ARCH_omap-3430ldp = "${MACHINE_ARCH}" |