From: Silvio Rhatto Date: Mon, 30 Jul 2018 14:04:25 +0000 (-0300) Subject: Reorganize kvmx-create X-Git-Tag: 0.1.0~179 X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=76b04c40c573bcd9b1a7545014f88170f18f836f;p=kvmx.git Reorganize kvmx-create --- diff --git a/kvmx-create b/kvmx-create index 1a825ae..95d4d53 100755 --- a/kvmx-create +++ b/kvmx-create @@ -140,24 +140,6 @@ function kvmx_config { kvmx_user_config bootloader grub "Bootloader: grub or extlinux" } -# Load config file -kvmx_config_load $1 - -# Get config parameters -kvmx_config - -# Check -if [ -e "$image" ]; then - kvmx_user_config overwrite n "WARNING: $image already exists. Overwrite the installation? (y/n)" - - if [ "$overwrite" != "y" ]; then - exit 1 - fi -fi - -# Ensure base folder exists -kvmx_sudo_run mkdir -p `dirname $image` - # # Custom version # @@ -472,5 +454,23 @@ EOF echo "$user:$password" | kvmx_sudo_run chroot $WORK/ chpasswd } +# Load config file +kvmx_config_load $1 + +# Get config parameters +kvmx_config + +# Check +if [ -e "$image" ]; then + kvmx_user_config overwrite n "WARNING: $image already exists. Overwrite the installation? (y/n)" + + if [ "$overwrite" != "y" ]; then + exit 1 + fi +fi + +# Ensure base folder exists +kvmx_sudo_run mkdir -p `dirname $image` + # Dispatch kvmx_create_custom