From 38af1ce2d24cc928dcbbdb300b0cd9a2375d81b5 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Sat, 25 Jul 2020 03:09:41 -0600 Subject: [PATCH] dhcp: failing to find a supported impl should be a fatal error --- executor-scripts/dhcp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/executor-scripts/dhcp b/executor-scripts/dhcp index 91c7266..bbd0a12 100755 --- a/executor-scripts/dhcp +++ b/executor-scripts/dhcp @@ -6,7 +6,8 @@ determine_implementation() { [ -x /sbin/dhcpcd ] && echo "dhcpcd" && return [ -x /usr/sbin/dhclient ] && echo "dhclient" && return [ -x /sbin/udhcpc ] && echo "udhcpc" && return - echo "???" + echo "could not find a supported DHCP implementation" + exit 1 } start() { @@ -24,8 +25,7 @@ start() { /sbin/udhcpc -b -R -p /var/run/udhcpc.$IFACE.pid -i $IFACE ;; *) - echo "implementation $1 not supported" - exit 1 + ;; esac } @@ -41,8 +41,7 @@ stop() { kill $(cat /var/run/udhcpc.$IFACE.pid) ;; *) - echo "implementation $1 not supported" - exit 1 + ;; esac }