]> gitweb.fluxo.info Git - hydra.git/commitdiff
Provision: use system's default arch in config
authorSilvio Rhatto <rhatto@riseup.net>
Mon, 9 Jun 2014 17:03:11 +0000 (14:03 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Mon, 9 Jun 2014 17:03:11 +0000 (14:03 -0300)
share/hydractl/provision

index 59f9e4ff71d8b537fb77436c86787febac3b16f4..703806d622cc50a295616cef7110fa949478a5a7 100755 (executable)
@@ -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)"