Modification : vm_{host,hosted,remote} -> {host,local,remote}/ .
[lhc/ateliers.git] / etc / host.sh
diff --git a/etc/host.sh b/etc/host.sh
new file mode 100644 (file)
index 0000000..d89bb2f
--- /dev/null
@@ -0,0 +1,21 @@
+. "$tool"/etc/local.sh
+
+readonly vm_dev_disk=/dev/mapper/domU-$(printf %s "$vm_fqdn-disk" | sed -e 's/-/--/g')
+readonly vm_dev_disk_boot="${vm_dev_disk}1"
+
+case $vm_use_lvm in
+ (no)
+       readonly vm_dev_disk_swap="${vm_dev_disk}5"
+       readonly vm_dev_disk_root="${vm_dev_disk}6"
+       readonly vm_dev_disk_var="${vm_dev_disk}7"
+       readonly vm_dev_disk_home="${vm_dev_disk}8"
+       ;;
+ (yes)
+       readonly vm_lvm_pv="${vm_dev_disk}2"
+       readonly vm_dev_disk_swap=/dev/$vm_lvm_vg/${vm_lvm_lv}_swap
+       readonly vm_dev_disk_root=/dev/$vm_lvm_vg/${vm_lvm_lv}_root
+       readonly vm_dev_disk_var=/dev/$vm_lvm_vg/${vm_lvm_lv}_var
+       readonly vm_dev_disk_home=/dev/$vm_lvm_vg/${vm_lvm_lv}_home
+       ;;
+ (*) exit 1;;
+ esac