]>
Commit | Line | Data |
---|---|---|
1 | #!/bin/sh | |
2 | # | |
3 | # | |
4 | # Adds static arps for device $DEVICE | |
5 | # Called from ifup-post. | |
6 | ||
7 | if is_no "$IPV4_NETWORKING"; then | |
8 | return | |
9 | fi | |
10 | ||
11 | if [ ! -f /etc/sysconfig/static-arp ]; then | |
12 | return | |
13 | fi | |
14 | ||
15 | # note the trailing white space character in the grep gets rid of aliases | |
16 | grep -E "^($DEVICE|any)[[:blank:]]" /etc/sysconfig/static-arp | while read iface mac ip state args; do | |
17 | [ -z "$state" ] && state="stale" | |
18 | /sbin/ip neigh replace $ip lladdr $mac nud $state dev $DEVICE | |
19 | done |