aboutsummaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-01-30 19:18:10 -0200
committerSilvio Rhatto <rhatto@riseup.net>2013-01-30 19:18:10 -0200
commitfe5a39c67cce00a95764c40a6abb4198a461bd3a (patch)
tree139177a93485c2a4a6009aca9d3fbdfe930b42bd /share
parent63835d37231794527b6999fac1d50321c631044e (diff)
downloadhydra-fe5a39c67cce00a95764c40a6abb4198a461bd3a.tar.gz
hydra-fe5a39c67cce00a95764c40a6abb4198a461bd3a.tar.bz2
Provision: interactivity config parameter
Diffstat (limited to 'share')
-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