summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xshare/hydractl/provision27
1 files changed, 22 insertions, 5 deletions
diff --git a/share/hydractl/provision b/share/hydractl/provision
index d47f6c9..8d6d686 100755
--- a/share/hydractl/provision
+++ b/share/hydractl/provision
@@ -139,10 +139,19 @@ if ! vgdisplay $vg &> /dev/null; then
hydra_safe_run vgcreate $vg $syst_device
fi
+# Create root partition
hydra_safe_run vgchange -a y $vg
hydra_lvcreate root $root_size
-hydra_lvcreate home $home_size
-hydra_lvcreate var $var_size
+
+# Create home partition
+if [ "$home_size" != "0" ]; then
+ hydra_lvcreate home $home_size
+fi
+
+# Create var partition
+if [ "$var_size" != "0" ]; then
+ hydra_lvcreate var $var_size
+fi
# Garbage.
if [ "$garbage" == "y" ]; then
@@ -170,10 +179,18 @@ for folder in proc dev home var boot sys; do
umount /tmp/debootstrap/$folder &> /dev/null
done
-# Create devices
+# Create root fs
hydra_create_volume root
-hydra_create_volume home
-hydra_create_volume var
+
+# Create home fs
+if [ "$home_size" != "0" ]; then
+ hydra_create_volume home
+fi
+
+# Create var fs
+if [ "$var_size" != "0" ]; then
+ hydra_create_volume var
+fi
# Mount root volume
hydra_safe_run mount $install_device /tmp/debootstrap/