From 9babd3713c55790ddeb81c1ca8c27cbd594e5508 Mon Sep 17 00:00:00 2001 From: Jan Macku Date: Thu, 17 Dec 2020 08:31:46 +0100 Subject: network: fix set_link_up() This patch fixes issue, when interface wasn't bring up. Related: #1555001 (cherry picked from commit 17f1519e0dac05bf6b259ef9b7f8dcd6b94013ce) --- network-scripts/network-functions | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/network-scripts/network-functions b/network-scripts/network-functions index 5f6c72d4..bc046f54 100644 --- a/network-scripts/network-functions +++ b/network-scripts/network-functions @@ -455,10 +455,8 @@ check_device_down () set_link_up () { - if [ "$LINKSTATUS" = down ]; then + if [ "$LINKSTATUS" != up ]; then ip link set dev $1 up >/dev/null 2>&1 - else - grep -qsx 1 /sys/class/net/$1/carrier fi } -- cgit v1.2.1