]> git.pld-linux.org Git - projects/rc-scripts.git/commitdiff
ifup-{aliases,routes,neigh} are now sourced instead of executed
authorElan Ruusamäe <glen@pld-linux.org>
Mon, 22 Jan 2007 18:41:56 +0000 (18:41 +0000)
committerElan Ruusamäe <glen@pld-linux.org>
Mon, 22 Jan 2007 18:41:56 +0000 (18:41 +0000)
svn-id: @8188

sysconfig/network-scripts/ifup-aliases
sysconfig/network-scripts/ifup-neigh
sysconfig/network-scripts/ifup-post
sysconfig/network-scripts/ifup-routes

index 6c384eeca2f8168a63fd2851734b382f08713b9d..2d9aa2d4dac79d889ac60ddeb2d59715d856c178 100755 (executable)
@@ -4,29 +4,6 @@
 #
 # 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=""
index 3f8e77a382328cd9c2a8a40e34a40f4c433e738b..00a600073ad736f5a9db12800e70c499d395df1a 100755 (executable)
@@ -4,34 +4,10 @@
 #
 # 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
index e9a9260ca6e1199947a269be7387d7e4d3623bbf..c82c74637639c1d37921eb0dc4d84778055589e2 100755 (executable)
@@ -52,9 +52,9 @@ if [ -n "${BANDWIDTH_IN}" ]; 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
index 03d64cfc5004b83cb0b33891d0883e18f53c4459..8097b2d8ce261de895f51891b063d6a001aa553b 100755 (executable)
@@ -4,34 +4,10 @@
 #
 # 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
This page took 0.034214 seconds and 4 git commands to generate.