If we check this at the end, we already do some calculation in the next
line. For example checking if the devices are correct. This is not
necessary as we can already stop when we get an "stoop" or something
like:

/etc/init.d/network green stop

This currently ends in an infinite loop, which gets fixed by this
change.

Signed-off-by: Jonatan Schlag <jonatan.schlag(a)ipfire.org>
---
 src/initscripts/system/network | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/initscripts/system/network b/src/initscripts/system/network
index 9694165f2..06240f53c 100644
--- a/src/initscripts/system/network
+++ b/src/initscripts/system/network
@@ -26,6 +26,11 @@ eval $(/usr/local/bin/readhash /var/ipfire/ethernet/settings)
 DO="${1}"
 shift
 
+if ! [[ "${DO}" == "start" ||  "${DO}" == "restart" || "${DO}" == "stop" ]]; then
+		echo "Usage: ${0} {start|stop|restart} [device(s)]"
+		exit 1
+fi
+
 if [ -n "${1}" ]; then
 	ALL=0
 	for i in green red blue orange; do
@@ -100,9 +105,4 @@ case "${DO}" in
 		sleep 1
 		${0} start ${ARGS}
 		;;
-
-	*)
-		echo "Usage: ${0} {start|stop|restart} [device(s)]"
-		exit 1
-		;;
 esac
-- 
2.30.2