Modification : vm_{host,hosted,remote} -> {host,local,remote}/ .
[lhc/ateliers.git] / host / part-lvm-umount
diff --git a/host/part-lvm-umount b/host/part-lvm-umount
new file mode 100755 (executable)
index 0000000..3bf535b
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/sh -eu
+tool=$(readlink -e "${0%/*}/..")
+. "$tool"/host/lib.sh
+
+case $vm_use_lvm in
+ (yes)
+       "$tool"/host/part-root-umount
+       "$tool"/host/part-var-umount
+       "$tool"/host/part-home-umount
+       ! sudo vgs | grep -q "^  $vm_lvm_vg " ||
+       sudo vgchange -a n $vm_lvm_vg
+       ;;
+ (*) exit 1;;
+ esac