Added one of the flag loops to case wherein 'init' subcommand is absent
This commit is contained in:
@@ -64,13 +64,6 @@ print_menu () {
|
|||||||
echo "Placeholder content"
|
echo "Placeholder content"
|
||||||
}
|
}
|
||||||
|
|
||||||
while getopts "h" flag; do
|
|
||||||
case "$flag" in
|
|
||||||
h) print_menu;;
|
|
||||||
*) exit 1;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
if ! [ -z "$1" ] && [ "$1" == "init" ]; then
|
if ! [ -z "$1" ] && [ "$1" == "init" ]; then
|
||||||
while getopts "d:p:k:f:c:v:" opt; do
|
while getopts "d:p:k:f:c:v:" opt; do
|
||||||
case $opt in
|
case $opt in
|
||||||
@@ -91,4 +84,11 @@ if ! [ -z "$1" ] && [ "$1" == "init" ]; then
|
|||||||
|
|
||||||
create_zpool "$ZFS_TARGET_DRIVE" "$ZFS_POOL_NAME" "$ZFS_COMPAT" "$ZFS_KEY_LOC" "$ZFS_KEY_FORMAT" "$ZFS_COMPRESSION"
|
create_zpool "$ZFS_TARGET_DRIVE" "$ZFS_POOL_NAME" "$ZFS_COMPAT" "$ZFS_KEY_LOC" "$ZFS_KEY_FORMAT" "$ZFS_COMPRESSION"
|
||||||
create_datasets "$ZFS_POOL_NAME"
|
create_datasets "$ZFS_POOL_NAME"
|
||||||
|
else
|
||||||
|
while getopts "h" flag; do
|
||||||
|
case "$flag" in
|
||||||
|
h) print_menu;;
|
||||||
|
*) exit 1;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
|
Reference in New Issue
Block a user