X-Git-Url: https://pd.if.org/git/?p=startuptools;a=blobdiff_plain;f=scripts%2Fifup;fp=scripts%2Fifup;h=07395fb4e4930ba01d48d2b3d0e0a8308aa6f712;hp=149cb17a69f20ec1b9cfb9d5f0c76474dd2b0f6e;hb=aa442d5cc6c7325cbe3422a5c6cd6ec71f832ecc;hpb=099711515bc014843a06e1aa9b13f1b40d777327 diff --git a/scripts/ifup b/scripts/ifup index 149cb17..07395fb 100755 --- a/scripts/ifup +++ b/scripts/ifup @@ -1,5 +1,7 @@ #!/bin/sh +set -e + net=$1 saveifs="$IFS" @@ -22,6 +24,9 @@ if [ "$enable" = 'no' ]; then exit 0; fi ifup_pre +# need to check to make sure the link exists +test ip link show dev $dev >/dev/null 2>&1 || exit 1 + ip link set dev $dev up if [ "$addr" = 'dhcp' ]; then