znetconf: show help and version without ccwgroup driver loaded

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 <kgraul@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Karsten Graul
2019-06-05 13:45:36 +02:00
committed by Jan Höppner
parent 5dbe73403f
commit 58e2135d87

View File

@@ -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