Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- start)
- [ "$EUID" != "0" ] && exit 4
- rc=0
- # IPv6 hook (pre IPv4 start)
- if [ -x /etc/sysconfig/network-scripts/init.ipv6-global ]; then
- /etc/sysconfig/network-scripts/init.ipv6-global start pre
- fi
- apply_sysctl
- # bring up loopback interface
- action $"Bringing up loopback interface: " ./ifup ifcfg-lo
- case "$VLAN" in
- yes)
- if [ ! -d /proc/net/vlan ] && ! modprobe 8021q >/dev/null 2>&1 ; then
- net_log $"No 802.1Q VLAN support available in kernel."
- fi
- ;;
- esac
- vlaninterfaces=""
- xdslinterfaces=""
- bridgeinterfaces=""
- # bring up all other interfaces configured to come up at boot time
- for i in $interfaces; do
- unset DEVICE TYPE SLAVE
- eval $(LANG=C fgrep "DEVICE=" ifcfg-$i)
- eval $(LANG=C fgrep "TYPE=" ifcfg-$i)
- eval $(LANG=C fgrep "SLAVE=" ifcfg-$i)
- if [ -z "$DEVICE" ] ; then DEVICE="$i"; fi
- if [ "$SLAVE" = "yes" ]; then
- continue
- fi
- if [ "$TYPE" = "xDSL" ]; then
- xdslinterfaces="$xdslinterfaces $i"
- continue
- fi
- if [ "$TYPE" = "Bridge" ]; then
- bridgeinterfaces="$bridgeinterfaces $i"
- continue
- fi
- if [ "${DEVICE%%.*}" != "$DEVICE" -o "${DEVICE##vlan}" != "$DEVICE" ] ; then
- vlaninterfaces="$vlaninterfaces $i"
- continue
- fi
- if LANG=C egrep -L "^ONBOOT=['\"]?[Nn][Oo]['\"]?" ifcfg-$i > /dev/null ; then
- # this loads the module, to preserve ordering
- is_available $i
- continue
- fi
- # If we're in confirmation mode, get user confirmation.
- if [ -f /var/run/confirm ]; then
- confirm $i
- test $? = 1 && continue
- fi
- action $"Bringing up interface $i: " ./ifup $i boot
- [ $? -ne 0 ] && rc=1
- done
- # Bring up xDSL and VPN interfaces
- for i in $vlaninterfaces $bridgeinterfaces $xdslinterfaces ; do
- if ! LANG=C egrep -L "^ONBOOT=['\"]?[Nn][Oo]['\"]?" ifcfg-$i >/dev/null 2>&1 ; then
- # If we're in confirmation mode, get user confirmation.
- if [ -f /var/run/confirm ]; then
- confirm $i
- test $? = 1 && continue
- fi
- action $"Bringing up interface $i: " ./ifup $i boot
- [ $? -ne 0 ] && rc=1
- fi
- done
- # Add non interface-specific static-routes.
- if [ -f /etc/sysconfig/static-routes ]; then
- grep "^any" /etc/sysconfig/static-routes | while read ignore args ; do
- /sbin/route add -$args
- done
- fi
- # Add non interface-specific static arp entries.
- if [ -f /etc/ethers ]; then
- /sbin/arp -f /etc/ethers
- fi
- # IPv6 hook (post IPv4 start)
- if [ -x /etc/sysconfig/network-scripts/init.ipv6-global ]; then
- /etc/sysconfig/network-scripts/init.ipv6-global start post
- fi
- # Run this again to catch any interface-specific actions
- apply_sysctl
- touch /var/lock/subsys/network
- [ -n "${NETWORKDELAY}" ] && /bin/sleep ${NETWORKDELAY}
- ;;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement