From 16d3d30e59defcb4d57965992f4e90a559abda59 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Tue, 27 Jan 2009 12:06:18 -0500 Subject: Bring up ipsec interfaces last. (#481733) --- rc.d/init.d/network | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'rc.d') diff --git a/rc.d/init.d/network b/rc.d/init.d/network index ec9597d2..c07c5a77 100755 --- a/rc.d/init.d/network +++ b/rc.d/init.d/network @@ -90,7 +90,7 @@ case "$1" in esac vlaninterfaces="" - cipeinterfaces="" + vpninterfaces="" xdslinterfaces="" bridgeinterfaces="" @@ -104,7 +104,7 @@ case "$1" in if [ -z "$DEVICE" ] ; then DEVICE="$i"; fi if [ "${DEVICE##cipcb}" != "$DEVICE" ] ; then - cipeinterfaces="$cipeinterfaces $i" + vpninterfaces="$vpninterfaces $i" continue fi if [ "$TYPE" = "xDSL" ]; then @@ -116,6 +116,10 @@ case "$1" in bridgeinterfaces="$bridgeinterfaces $i" continue fi + if [ "$TYPE" = "IPSEC" ]; then + vpninterfaces="$vpninterfaces $i" + continue + fi if [ "${DEVICE%%.*}" != "$DEVICE" -o "${DEVICE##vlan}" != "$DEVICE" ] ; then vlaninterfaces="$vlaninterfaces $i" @@ -140,8 +144,8 @@ case "$1" in rc=$((rc+$?)) done - # Bring up xDSL and CIPE interfaces - for i in $vlaninterfaces $bridgeinterfaces $xdslinterfaces $cipeinterfaces ; do + # Bring up xDSL and VPN interfaces + for i in $vlaninterfaces $bridgeinterfaces $xdslinterfaces $vpninterfaces ; 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 @@ -198,13 +202,13 @@ case "$1" in fi vlaninterfaces="" - cipeinterfaces="" + vpninterfaces="" xdslinterfaces="" bridgeinterfaces="" remaining="" rc=0 - # get list of bonding, cipe, and xdsl interfaces + # get list of bonding, vpn, and xdsl interfaces for i in $interfaces; do unset DEVICE TYPE eval $(LANG=C fgrep "DEVICE=" ifcfg-$i) @@ -213,7 +217,11 @@ case "$1" in if [ -z "$DEVICE" ] ; then DEVICE="$i"; fi if [ "${DEVICE##cipcb}" != "$DEVICE" ] ; then - cipeinterfaces="$cipeinterfaces $i" + vpninterfaces="$vpninterfaces $i" + continue + fi + if [ "$TYPE" = "IPSEC" ]; then + vpninterfaces="$vpninterfaces $i" continue fi if [ "$TYPE" = "Bridge" ]; then @@ -232,7 +240,7 @@ case "$1" in remaining="$remaining $i" done - for i in $cipeinterfaces $xdslinterfaces $bridgeinterfaces $vlaninterfaces $remaining; do + for i in $vpninterfaces $xdslinterfaces $bridgeinterfaces $vlaninterfaces $remaining; do (. ifcfg-$i if [ -z "$DEVICE" ] ; then DEVICE="$i"; fi -- cgit v1.2.1