#
# adds all addresses of device $1
-. /etc/sysconfig/network
-. /etc/rc.d/init.d/functions
-. /etc/sysconfig/network-scripts/functions.network
-
-# device name must be ifcfg-somename
-DEV=$1
-
-[ -z "$DEV" ] && {
- nls "Usage: %s <device name>" "ifup-aliases" >&2
- exit 1
-}
-
-if [ -f "/etc/sysconfig/interfaces/ifcfg-$DEV" ] ; then
- CONFIG="/etc/sysconfig/interfaces/ifcfg-$DEV"
-else
- CONFIG="$DEV"
-fi
-
-source_config
-
-# set all major variables
-setup_ip_param
-
# Add all addresses
for IP_ADDR in $IPADDR_ALIASES; do
IP_ADDR_OPT=""
#
# adds static arps for device $DEVICE
-. /etc/sysconfig/network
-. /etc/rc.d/init.d/functions
-. /etc/sysconfig/network-scripts/functions.network
-
-DEV=$1
-
-if [ -z "$DEV" ]; then
- nls "Usage: %s <device name>" "ifup-neigh" >&2
- exit 1
-fi
-
if [ ! -f /etc/sysconfig/static-arp ]; then
- exit 0
+ return
fi
-if [ -f "/etc/sysconfig/interfaces/ifcfg-$DEV" ] ; then
- CONFIG="/etc/sysconfig/interfaces/ifcfg-$DEV"
-else
- CONFIG="$DEV"
-fi
-
-source_config
-
-# set all major variables
-setup_ip_param
-
-get_ppp_device_and_pid
-
# note the trailing white space character in the grep gets rid of aliases
egrep "^($DEVICE|any)[[:blank:]]" /etc/sysconfig/static-arp | while read iface mac ip state args; do
if is_no "$IPV4_NETWORKING"; then
tc filter add dev ${REALDEVICE} parent ffff: protocol ip prio 50 u32 match ip src 0.0.0.0/0 police rate ${BANDWIDTH_IN}kbit burst 10k drop flowid :3
fi
-/etc/sysconfig/network-scripts/ifup-aliases ${CONFIG}
-/etc/sysconfig/network-scripts/ifup-routes ${CONFIG}
-/etc/sysconfig/network-scripts/ifup-neigh ${CONFIG}
+. /etc/sysconfig/network-scripts/ifup-aliases
+. /etc/sysconfig/network-scripts/ifup-routes
+. /etc/sysconfig/network-scripts/ifup-neigh
# don't set hostname on ppp/slip connections
if [ -n "$NEEDHOSTNAME" -a "${DEVICETYPE}" != "ppp" -a "${DEVICETYPE}" != "slip" ]; then
#
# adds static routes which go through device $DEVICE
-. /etc/sysconfig/network
-. /etc/rc.d/init.d/functions
-. /etc/sysconfig/network-scripts/functions.network
-
-DEV=$1
-
-if [ -z "$DEV" ]; then
- nls "Usage: %s <device name>" "ifup-routes" >&2
- exit 1
-fi
-
if [ ! -f /etc/sysconfig/static-routes ]; then
- exit 0
+ return
fi
-if [ -f "/etc/sysconfig/interfaces/ifcfg-$DEV" ] ; then
- CONFIG="/etc/sysconfig/interfaces/ifcfg-$DEV"
-else
- CONFIG="$DEV"
-fi
-
-source_config
-
-# set all major variables
-setup_ip_param
-
-get_ppp_device_and_pid
-
# note the trailing white space character in the grep gets rid of aliases
egrep "^($DEVICE|any)[[:blank:]]" /etc/sysconfig/static-routes | while read device args; do
if (echo $args | grep -q ":") then