]>
Commit | Line | Data |
---|---|---|
261d7003 AM |
1 | diff -urN rc-scripts-0.3.1.org/sysconfig/Makefile.am rc-scripts-0.3.1/sysconfig/Makefile.am |
2 | --- rc-scripts-0.3.1.org/sysconfig/Makefile.am Sun Aug 11 16:03:09 2002 | |
3 | +++ rc-scripts-0.3.1/sysconfig/Makefile.am Sun Aug 11 16:03:34 2002 | |
4 | @@ -10,6 +10,7 @@ | |
5 | network \ | |
6 | static-routes \ | |
7 | static-nat \ | |
8 | + static-arp \ | |
9 | i18n \ | |
10 | timezone | |
11 | ||
12 | diff -urN rc-scripts-0.3.1.org/sysconfig/Makefile.in rc-scripts-0.3.1/sysconfig/Makefile.in | |
13 | --- rc-scripts-0.3.1.org/sysconfig/Makefile.in Sun Aug 11 16:03:09 2002 | |
14 | +++ rc-scripts-0.3.1/sysconfig/Makefile.in Sun Aug 11 16:03:44 2002 | |
15 | @@ -93,6 +93,7 @@ | |
16 | network \ | |
17 | static-routes \ | |
18 | static-nat \ | |
19 | + static-arp \ | |
20 | i18n \ | |
21 | timezone | |
22 | ||
23 | diff -urN rc-scripts-0.3.1.org/sysconfig/network-scripts/Makefile.am rc-scripts-0.3.1/sysconfig/network-scripts/Makefile.am | |
24 | --- rc-scripts-0.3.1.org/sysconfig/network-scripts/Makefile.am Sun Aug 11 16:03:09 2002 | |
25 | +++ rc-scripts-0.3.1/sysconfig/network-scripts/Makefile.am Sun Aug 11 16:10:32 2002 | |
26 | @@ -18,6 +18,7 @@ | |
27 | ifup-aliases \ | |
28 | ifup-br \ | |
29 | ifup-ipx \ | |
30 | + ifup-neigh \ | |
31 | ifup-plip \ | |
32 | ifup-post \ | |
33 | ifup-ppp \ | |
34 | diff -urN rc-scripts-0.3.1.org/sysconfig/network-scripts/Makefile.in rc-scripts-0.3.1/sysconfig/network-scripts/Makefile.in | |
35 | --- rc-scripts-0.3.1.org/sysconfig/network-scripts/Makefile.in Sun Aug 11 16:03:09 2002 | |
36 | +++ rc-scripts-0.3.1/sysconfig/network-scripts/Makefile.in Sun Aug 11 16:10:44 2002 | |
37 | @@ -101,6 +101,7 @@ | |
38 | ifup-aliases \ | |
39 | ifup-br \ | |
40 | ifup-ipx \ | |
41 | + ifup-neigh \ | |
42 | ifup-plip \ | |
43 | ifup-post \ | |
44 | ifup-ppp \ | |
45 | diff -urN rc-scripts-0.3.1.org/sysconfig/network-scripts/ifup-neigh rc-scripts-0.3.1/sysconfig/network-scripts/ifup-neigh | |
46 | --- rc-scripts-0.3.1.org/sysconfig/network-scripts/ifup-neigh Thu Jan 1 01:00:00 1970 | |
47 | +++ rc-scripts-0.3.1/sysconfig/network-scripts/ifup-neigh Sun Aug 11 16:13:52 2002 | |
48 | @@ -0,0 +1,46 @@ | |
49 | +#!/bin/sh | |
50 | +# | |
51 | +# $Id$ | |
52 | +# | |
53 | +# adds static arps for device $DEVICE | |
54 | + | |
55 | +. /etc/sysconfig/network | |
56 | +. /etc/rc.d/init.d/functions | |
57 | +. /etc/sysconfig/network-scripts/.functions | |
58 | + | |
59 | +DEV=$1 | |
60 | + | |
61 | +if [ -z "$DEV" ]; then | |
62 | + nls "Usage: %s <device name>" "ifup-neigh" >&2 | |
63 | + exit 1 | |
64 | +fi | |
65 | + | |
66 | +if [ ! -f /etc/sysconfig/static-arp ]; then | |
67 | + exit 0 | |
68 | +fi | |
69 | + | |
70 | +if [ -f "/etc/sysconfig/interfaces/ifcfg-$DEV" ] ; then | |
71 | + CONFIG="/etc/sysconfig/interfaces/ifcfg-$DEV" | |
72 | +else | |
73 | + CONFIG="$DEV" | |
74 | +fi | |
75 | + | |
76 | +source_config | |
77 | + | |
78 | +# set all major variables | |
79 | +setup_ip_param | |
80 | + | |
81 | +get_ppp_device_and_pid | |
82 | + | |
83 | +# note the trailing white space character in the grep gets rid of aliases | |
84 | +egrep "^($DEVICE|any)[[:blank:]]" /etc/sysconfig/static-arp | while read iface mac ip state args; do | |
85 | + if is_no "$IPV4_NETWORKING"; then | |
86 | + continue | |
87 | + fi | |
88 | + [ -z "$state" ] && state="stale" | |
89 | + /sbin/ip neigh replace $ip lladdr $mac nud $state dev $DEVICE | |
90 | +done | |
91 | + | |
92 | + | |
93 | +# This must be last line ! | |
94 | +# vi:syntax=sh:tw=78:ts=8:sw=4 | |
95 | diff -urN rc-scripts-0.3.1.org/sysconfig/network-scripts/ifup-post rc-scripts-0.3.1/sysconfig/network-scripts/ifup-post | |
96 | --- rc-scripts-0.3.1.org/sysconfig/network-scripts/ifup-post Sun Aug 11 16:03:09 2002 | |
97 | +++ rc-scripts-0.3.1/sysconfig/network-scripts/ifup-post Sun Aug 11 16:05:01 2002 | |
98 | @@ -27,6 +27,7 @@ | |
99 | ||
100 | /etc/sysconfig/network-scripts/ifup-aliases ${CONFIG} | |
101 | /etc/sysconfig/network-scripts/ifup-routes ${CONFIG} | |
102 | +/etc/sysconfig/network-scripts/ifup-neigh ${CONFIG} | |
103 | ||
104 | # don't set hostname on ppp/slip connections | |
105 | if [ -n "$NEEDHOSTNAME" -a "${DEVICETYPE}" != "ppp" -a "${DEVICETYPE}" != "slip" ]; then | |
106 | diff -urN rc-scripts-0.3.1.org/sysconfig/network-scripts/ifup-routes rc-scripts-0.3.1/sysconfig/network-scripts/ifup-routes | |
107 | --- rc-scripts-0.3.1.org/sysconfig/network-scripts/ifup-routes Sun Aug 11 16:03:09 2002 | |
108 | +++ rc-scripts-0.3.1/sysconfig/network-scripts/ifup-routes Sun Aug 11 16:04:28 2002 | |
109 | @@ -33,7 +33,7 @@ | |
110 | get_ppp_device_and_pid | |
111 | ||
112 | # note the trailing white space character in the grep gets rid of aliases | |
113 | -grep "^$DEVICE[[:blank:]]" /etc/sysconfig/static-routes | while read device args; do | |
114 | +egrep "^($DEVICE|any)[[:blank:]]" /etc/sysconfig/static-routes | while read device args; do | |
115 | if (echo $args | grep -q ":") then | |
116 | if is_no "$IPV6_NETWORKING"; then | |
117 | continue | |
118 | diff -urN rc-scripts-0.3.1.org/sysconfig/static-arp rc-scripts-0.3.1/sysconfig/static-arp | |
119 | --- rc-scripts-0.3.1.org/sysconfig/static-arp Thu Jan 1 01:00:00 1970 | |
120 | +++ rc-scripts-0.3.1/sysconfig/static-arp Sun Aug 11 16:00:09 2002 | |
121 | @@ -0,0 +1,3 @@ | |
122 | +# dev mac ip state opts | |
123 | +# eth0 00:80:48:12:c2:3c 192.168.10.10 permanent | |
124 | +#eth1 00:80:48:12:c2:44 12.12.12.12 permanent |