diff options
Diffstat (limited to 'net-scripts/init.d/net.lo')
-rwxr-xr-x | net-scripts/init.d/net.lo | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/net-scripts/init.d/net.lo b/net-scripts/init.d/net.lo index 2218475..47752cb 100755 --- a/net-scripts/init.d/net.lo +++ b/net-scripts/init.d/net.lo @@ -1,5 +1,5 @@ #!/sbin/runscript -# Copyright (c) 2004-2005 Gentoo Foundation +# Copyright (c) 2004-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # Contributed by Roy Marples (uberlord@gentoo.org) @@ -504,7 +504,7 @@ modules_load() { iface_start() { local iface="$1" mod config_counter="-1" x config_worked=false local RC_INDENTATION="${RC_INDENTATION}" - local -a config fallback fallback_route conf a + local -a config fallback fallback_route conf a b local ifvar=$( bash_variable "$1" ) i j # Try and work out a metric for the interface if we're on auto @@ -530,14 +530,14 @@ iface_start() { a="config_${ifvar}[@]" a=( "${!a}" ) for (( i=0; i<${#a[@]}; i++ )); do - local -a b=( $( expand_parameters "${a[i]}" ) ) + eval b=( $( expand_parameters "${a[i]}" ) ) config=( "${config[@]}" "${b[@]}" ) done a="fallback_${ifvar}[@]" a=( "${!a}" ) for (( i=0; i<${#a[@]}; i++ )); do - local -a b=( $( expand_parameters "${a[i]}" ) ) + eval b=( $( expand_parameters "${a[i]}" ) ) fallback=( "${fallback[@]}" "${b[@]}" ) done @@ -770,8 +770,10 @@ run_start() { && eval "config_${IFVAR}=( "\"\$\{config\[@\]:1\}\"" )" # There may be existing ip address info - so we strip it - [[ ${RC_INTERFACE_KEEP_CONFIG} != "yes" ]] \ - && interface_del_addresses "${iface}" + if [[ ${RC_INTERFACE_KEEP_CONFIG} != "yes" \ + && ${IN_BACKGROUND} != "true" ]]; then + interface_del_addresses "${iface}" + fi # Start the interface if ! iface_start "${iface}" ; then |