# 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
# Load provision configuration
function hydra_provision_config_load {
- local domain="`facter domain`"
+ domain="`facter domain`"
if [ ! -z "$1" ]; then
if [ -f "$1" ]; 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