]> gitweb.fluxo.info Git - kvmx.git/commitdiff
Reorganize kvmx-create
authorSilvio Rhatto <rhatto@riseup.net>
Mon, 30 Jul 2018 14:04:25 +0000 (11:04 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Mon, 30 Jul 2018 14:04:25 +0000 (11:04 -0300)
kvmx-create

index 1a825aeb7b5e85b0182f7616e88f45a61561fc5c..95d4d5352d73073f4a24b9cc79fa3f6a684c3a9a 100755 (executable)
@@ -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