export $param=$input
fi
}
+
+# Install a package.
+function hydra_install_package {
+ if [ -z "$1" ]; then
+ return
+ fi
+
+ dpkg -l $1 &> /dev/null
+
+ if [ "$?" == "1" ]; then
+ apt-get install $1
+ fi
+}
hydra_user_input vg vg "Temporary install vg"
hydra_user_input grub n "Setup GRUB? (y/n)"
+# Check for requirements.
+for reqs in debootstrap cryptsetup; do
+ hydra_install_package $req
+done
+
# Warning.
cat <<-EOF
Make sure you have chosen the right parameters and that $device has the needed partitions: