From c060c55bd62a18f5563cc30c894d07b0ec1be497 Mon Sep 17 00:00:00 2001 From: Jan Macku Date: Mon, 19 Aug 2019 10:26:18 +0200 Subject: ifup-eth: Check that device name is set --- network-scripts/ifup-eth | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'network-scripts/ifup-eth') diff --git a/network-scripts/ifup-eth b/network-scripts/ifup-eth index 95db3e60..9448eae7 100755 --- a/network-scripts/ifup-eth +++ b/network-scripts/ifup-eth @@ -112,6 +112,11 @@ if [ -n "${TEAM_CONFIG}" ] && [ ! "${DEVICETYPE}" = "Team" ] && [ -x ./ifup-Team ./ifup-Team ${CONFIG} $2 fi +if [ -z "${REALDEVICE}" ]; then + net_log $"Device name does not seem to be present." + exit 1 +fi + # now check the real state is_available_wait ${REALDEVICE} ${DEVTIMEOUT} || { if [ -n "$alias" ]; then -- cgit v1.2.1