]> gitweb.fluxo.info Git - hydra.git/commitdiff
Provision: more fixes
authorSilvio Rhatto <rhatto@riseup.net>
Tue, 3 Jul 2018 14:23:36 +0000 (11:23 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Tue, 3 Jul 2018 14:23:36 +0000 (11:23 -0300)
lib/hydra/misc
lib/hydra/provision
share/hydractl/provision

index 6081107af575e86fe9504d1f11d872ed31858104..f297bdc4a114a8ee83521c94c8f089d80a79d121 100644 (file)
@@ -116,8 +116,8 @@ function hydra_safe_run {
 
 # Run a command using sudo and abort on error
 function hydra_sudo_run {
-  $SUDO $*
-  hydra_exit_on_error $*
+  $SUDO "$@"
+  hydra_exit_on_error "$@"
 }
 
 # Determine the next debian release
index a2ebefe0fcc132ab567049149e845596bce4693b..471356488db2477b0140786354b0470dbd522efa 100644 (file)
@@ -2,7 +2,7 @@
 
 # Load provision configuration
 function hydra_provision_config_load {
-  local domain="`facter domain`"
+  domain="`facter domain`"
 
   if [ ! -z "$1" ]; then
     if [ -f "$1" ]; then
index 96784c5edb95a1c9653fd68c18779dfd111b93ca..5c3e5741d85287ec469770271e7c5b2822236bb3 100755 (executable)
@@ -544,7 +544,10 @@ if [ "$swap_size" != "0" ]; then
   hydra_sudo_run cryptsetup luksClose provision-swap
 fi
 
-hydra_sudo_run cryptsetup luksClose provision-root
+if [ "$encrypt" == "y" ]; then
+  hydra_sudo_run cryptsetup luksClose provision-root
+fi
+
 hydra_sudo_run vgchange -a n $vg
 
 cat <<-EOF