]> git.pld-linux.org Git - projects/rc-scripts.git/blame - sysconfig/network-scripts/ifup-neigh
- static arp per interface support
[projects/rc-scripts.git] / sysconfig / network-scripts / ifup-neigh
CommitLineData
eaf1d53a
AM
1#!/bin/sh
2#
3# $Id: ifup-neigh,v 1.1 2002/08/11 17:05:08 misiek Exp $
4#
5# adds static arps for device $DEVICE
6
7. /etc/sysconfig/network
8. /etc/rc.d/init.d/functions
9. /etc/sysconfig/network-scripts/functions.network
10
11DEV=$1
12
13if [ -z "$DEV" ]; then
14 nls "Usage: %s <device name>" "ifup-neigh" >&2
15 exit 1
16fi
17
18if [ ! -f /etc/sysconfig/static-arp ]; then
19 exit 0
20fi
21
22if [ -f "/etc/sysconfig/interfaces/ifcfg-$DEV" ] ; then
23 CONFIG="/etc/sysconfig/interfaces/ifcfg-$DEV"
24else
25 CONFIG="$DEV"
26fi
27
28source_config
29
30# set all major variables
31setup_ip_param
32
33get_ppp_device_and_pid
34
35# note the trailing white space character in the grep gets rid of aliases
36egrep "^($DEVICE|any)[[:blank:]]" /etc/sysconfig/static-arp | while read iface mac ip state args; do
37 if is_no "$IPV4_NETWORKING"; then
38 continue
39 fi
40 [ -z "$state" ] && state="stale"
41 /sbin/ip neigh replace $ip lladdr $mac nud $state dev $DEVICE
42done
43
44
45# This must be last line !
46# vi:syntax=sh:tw=78:ts=8:sw=4
This page took 0.126366 seconds and 4 git commands to generate.