X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=scripts%2Fifup;h=200d431c83f03bb5a1f54382f37196db8f8eb9a8;hb=8ed33a7ef8696fd83404bbaed809380753f2b717;hp=149cb17a69f20ec1b9cfb9d5f0c76474dd2b0f6e;hpb=8ab370eace6aeb1e067fb4175187fd4d7b1235c1;p=startuptools diff --git a/scripts/ifup b/scripts/ifup index 149cb17..200d431 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 +ip link show dev $dev >/dev/null 2>&1 || exit 1 + ip link set dev $dev up if [ "$addr" = 'dhcp' ]; then