From 58e2135d87a5b001c6927b6f76eb5bc00e1f540b Mon Sep 17 00:00:00 2001 From: Karsten Graul Date: Wed, 5 Jun 2019 13:45:36 +0200 Subject: [PATCH] znetconf: show help and version without ccwgroup driver loaded MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When directory $SYSFSDIR/bus/ccwgroup does not exist znetconf issues an error message and terminates. Its not even possible to get the output of --help or --version. Fix that by moving the responsible check behind the parameter evaluation. Signed-off-by: Karsten Graul Signed-off-by: Jan Höppner --- zconf/znetconf | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/zconf/znetconf b/zconf/znetconf index e7f252ee..ba8dec42 100755 --- a/zconf/znetconf +++ b/zconf/znetconf @@ -1128,12 +1128,6 @@ then exit 1 fi -# check existence of ccwgroup devices -if ! [ -d $CCWGROUPBUS_DIR ]; then - print_error "There are no ccwgroup devices" - exit $RC_NO_CCWGROUP -fi - # determine environment check_vm_env @@ -1298,6 +1292,12 @@ then exit $RC_TOO_MUCH_ARGUMENTS fi +# check existence of ccwgroup devices +if ! [ -d $CCWGROUPBUS_DIR ]; then + print_error "There are no ccwgroup devices" + exit $RC_NO_CCWGROUP +fi + # react to parsed options if [ $DO_ADD -eq 1 ] then