From: Silvio Rhatto Date: Wed, 30 Jan 2013 21:18:10 +0000 (-0200) Subject: Provision: interactivity config parameter X-Git-Tag: 0.1~54 X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=fe5a39c67cce00a95764c40a6abb4198a461bd3a;p=hydra.git Provision: interactivity config parameter --- 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