From fe5a39c67cce00a95764c40a6abb4198a461bd3a Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Wed, 30 Jan 2013 19:18:10 -0200 Subject: Provision: interactivity config parameter --- share/hydractl/provision | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'share/hydractl/provision') 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 -- cgit v1.2.3