diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2018-07-30 11:04:25 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2018-07-30 11:04:25 -0300 |
commit | 76b04c40c573bcd9b1a7545014f88170f18f836f (patch) | |
tree | e491f66e2fa086a60d9d5ab9511bd8656d0aa53b | |
parent | 45dcc460ffeb579b0234b0e8e077b30384c7587d (diff) | |
download | kvmx-76b04c40c573bcd9b1a7545014f88170f18f836f.tar.gz kvmx-76b04c40c573bcd9b1a7545014f88170f18f836f.tar.bz2 |
Reorganize kvmx-create
-rwxr-xr-x | kvmx-create | 36 |
1 files changed, 18 insertions, 18 deletions
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 |