summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
Diffstat (limited to 'share')
-rwxr-xr-xshare/hydractl/provision33
1 files changed, 31 insertions, 2 deletions
diff --git a/share/hydractl/provision b/share/hydractl/provision
index b8d198f..fd989cf 100755
--- a/share/hydractl/provision
+++ b/share/hydractl/provision
@@ -160,15 +160,40 @@ fi
mkdir -p /tmp/debootstrap
umount /tmp/debootstrap/proc &> /dev/null
umount /tmp/debootstrap/dev &> /dev/null
+umount /tmp/debootstrap/home &> /dev/null
+umount /tmp/debootstrap/var &> /dev/null
# Create devices
hydra_create_volume root
hydra_create_volume home
hydra_create_volume var
+# Mount root volume
+hydra_safe_run mount $install_device /tmp/debootstrap/
+
+# Mount additional volumes
+if [ "$home_size" != "0" ]; then
+ mkdir tmp/debootstrap/home
+
+ if [ "$encrypt" == "y" ]; then
+ hydra_safe_run mount /dev/mapper/home /tmp/debootstrap/home
+ else
+ hydra_safe_run mount /dev/mapper/$vg-home /tmp/debootstrap/home
+ fi
+fi
+
+if [ "$var_size" != "0" ]; then
+ mkdir tmp/debootstrap/var
+
+ if [ "$encrypt" == "y" ]; then
+ hydra_safe_run mount /dev/mapper/var /tmp/debootstrap/var
+ else
+ hydra_safe_run mount /dev/mapper/$vg-var /tmp/debootstrap/var
+ fi
+fi
+
# Initial system install.
echo "Installing base system..."
-hydra_safe_run mount $install_device /tmp/debootstrap/
hydra_safe_run debootstrap --arch=$arch $version /tmp/debootstrap/ $mirror
# Initial configuration.
@@ -313,7 +338,11 @@ else
kernel_arch="$arch"
fi
-hydra_safe_run chroot /tmp/debootstrap apt-get install linux-image-2.6-vserver-$kernel_arch -y
+if [ "$version" == "squeeze" ]; then
+ hydra_safe_run chroot /tmp/debootstrap apt-get install linux-image-2.6-vserver-$kernel_arch -y
+else
+ hydra_safe_run chroot /tmp/debootstrap apt-get install linux-image-$kernel_arch -y
+fi
# Initramfs.
echo "Creating initramfs..."