summaryrefslogtreecommitdiff
path: root/share/hydractl
diff options
context:
space:
mode:
Diffstat (limited to 'share/hydractl')
-rwxr-xr-xshare/hydractl/provision13
1 files changed, 7 insertions, 6 deletions
diff --git a/share/hydractl/provision b/share/hydractl/provision
index 2477fa3..30a1ddc 100755
--- a/share/hydractl/provision
+++ b/share/hydractl/provision
@@ -77,6 +77,7 @@ function hydra_provision_create_volume {
# Make sure there is provision config.
function hydra_provision_config {
+ hydra_user_config interactive y "Interactive mode? (y/n)"
hydra_user_config device /dev/sdb "Destination device"
hydra_user_config root_size 20G "Size of root partition"
hydra_user_config swap_size 2000 "Swap size (in MB, 0 to not create it)"
@@ -105,7 +106,7 @@ if [ ! -z "$1" ]; then
fi
fi
-# Get parameters
+# Get config parameters.
hydra_provision_config
# Check for requirements.
@@ -114,11 +115,11 @@ for req in debootstrap cryptsetup grub-pc lvm2 parted; do
done
# Warning.
-cat <<-EOF
-WARNING: about to partition $device!
-Press ENTER to continue, Ctrl-C to abort."
-EOF
-read answer
+if [ "$interactive" == "y" ]; then
+ echo "WARNING: about to partition $device!"
+ echo "Press ENTER to continue, Ctrl-C to abort."
+ read answer
+fi
# Disk partitioning.
if [ "$swap" != "0" ]; then