summaryrefslogtreecommitdiff
path: root/share/hydractl
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-01-28 23:35:37 -0200
committerSilvio Rhatto <rhatto@riseup.net>2013-01-28 23:35:37 -0200
commitede60966dba7687240df0471014cf3bc642bc982 (patch)
tree679c9ebe5024e8f42f8453d1f911950726d87ec9 /share/hydractl
parent886cbaa28718a5ec3e05a08ffb06a63fa369214c (diff)
downloadhydra-ede60966dba7687240df0471014cf3bc642bc982.tar.gz
hydra-ede60966dba7687240df0471014cf3bc642bc982.tar.bz2
More checks against /home and /var sizes
Diffstat (limited to 'share/hydractl')
-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/