X-Git-Url: https://git.cyclocoop.org/?p=lhc%2Fateliers.git;a=blobdiff_plain;f=host%2Fpart-root-umount;fp=host%2Fpart-root-umount;h=77beda8be47e79965af7e836979eec80d37e03ca;hp=0000000000000000000000000000000000000000;hb=3ad6118386977e346d81042e924e5db9c5f15b7d;hpb=22f04b9fac14adc3d3fc98273ba126c3a51792c3 diff --git a/host/part-root-umount b/host/part-root-umount new file mode 100755 index 0000000..77beda8 --- /dev/null +++ b/host/part-root-umount @@ -0,0 +1,8 @@ +#!/bin/sh -eu +tool=$(readlink -e "${0%/*}/..") +. "$tool"/host/lib.sh + +! mountpoint -q /mnt/$vm_fqdn || +sudo umount -v /mnt/$vm_fqdn +! test -e /dev/mapper/${vm_lvm_lv}_root_deciphered || +sudo cryptsetup luksClose ${vm_lvm_lv}_root_deciphered