#!/bin/sh # # Set proxy arp using /etc/sysconfig/network-scripts. # Can pass in either device or file name as arguement. # # set PROXY_ARP=yes in ifcfg-device # ifup-post looks for file "/sbin/ifup-local" # cd /etc/sysconfig/network-scripts . network-functions [ -f ../network ] && . ../network [ -f ../networking/network ] && . ../networking/network # just in case a full path to the configuration file is passed in CONFIG=$(basename $1) [ -f "${CONFIG}" ] || CONFIG=ifcfg-${1} source_config if [ "${PROXY_ARP}" = "YES" -o "${PROXY_ARP}" = "yes" ]; then PROXY_FILE="/proc/sys/net/ipv4/conf/${DEVICE}/proxy_arp" if [ -f $PROXY_FILE ]; then echo "1" > $PROXY_FILE else echo "Can't start proxy arp for ${DEVICE}" exit 1 fi fi exit 0