aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2014-06-09 14:03:11 -0300
committerSilvio Rhatto <rhatto@riseup.net>2014-06-09 14:03:11 -0300
commitfca431d1316c4a9ad6846826bdf82a72d4879776 (patch)
tree53f9963dc12c20cef0a8cd0a6fb06dc4c3201963
parentc8e41fc7e4decfd03f9c844b5a115c974223b774 (diff)
downloadhydra-fca431d1316c4a9ad6846826bdf82a72d4879776.tar.gz
hydra-fca431d1316c4a9ad6846826bdf82a72d4879776.tar.bz2
Provision: use system's default arch in config
-rwxr-xr-xshare/hydractl/provision10
1 files changed, 9 insertions, 1 deletions
diff --git a/share/hydractl/provision b/share/hydractl/provision
index 59f9e4f..703806d 100755
--- a/share/hydractl/provision
+++ b/share/hydractl/provision
@@ -77,6 +77,14 @@ function hydra_provision_create_volume {
# Make sure there is provision config.
function hydra_provision_config {
+ local base_arch=`uname -m`;
+
+ if [ "$base_arch" == "x86_64" ]; then
+ base_arch="amd64"
+ else
+ base_arch="i386"
+ fi
+
hydra_user_config interactive y "Interactive mode? (y/n)"
hydra_user_config device /dev/sdb "Destination device"
hydra_user_config device_label msdos "Device disk label"
@@ -89,7 +97,7 @@ function hydra_provision_config {
hydra_user_config disable_zeroing n "Disable zeroing of lvm volumes? (y/n)"
hydra_user_config hostname $HOSTNAME "Hostname"
hydra_user_config domain example.org "Domain"
- hydra_user_config arch amd64 "System arch"
+ hydra_user_config arch $base_arch "System arch"
hydra_user_config version wheezy "Distro version"
hydra_user_config vg vg "Install vg"
hydra_user_config grub y "Setup GRUB? (y/n)"