--- netcfg.action 2010-02-28 07:41:20.352726718 -0500 +++ netcfg.action.new 2010-02-28 08:04:06.965505024 -0500 @@ -17,16 +17,21 @@ declare -a static_profiles for profile in $(list_profiles); do ( load_profile "$profile" - echo "loadin $profile" + echo "loading $profile" [[ "$INTERFACE" != "$1" ]] && continue [[ "$CONNECTION" != @(ethernet|ethernet-iproute) ]] && continue if [[ "$IP" == "dhcp" ]]; then netcfg "$profile" && exit 1 - else - static_profiles+=("$profile") + else + exit 2 # this is a static_profile fi exit 0 - ) || exit 0; done + ) + case $? in + 1) exit 0;; # profile_up succeeded + 2) static_profiles+=("$profile");; + esac + done for profile in "${static_profiles[@]}"; do ( load_profile "$profile" netcfg "$profile" && exit 1