From d384a94cad4972c9c5f87686b84f1f43024cb90b Mon Sep 17 00:00:00 2001 From: Michael Shigorin Date: Thu, 6 Dec 2012 23:07:04 +0200 Subject: [PATCH] [*] 11-remount: initial luks support The script expects that alterator-vm/guile-evms create LUKS containers with no password set as discussed in #28200; this initial implementation only shuts these down (thus almost useless for anything but testing). --- installer/preinstall.d/11-remount.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/installer/preinstall.d/11-remount.sh b/installer/preinstall.d/11-remount.sh index e2be96a..935f05b 100755 --- a/installer/preinstall.d/11-remount.sh +++ b/installer/preinstall.d/11-remount.sh @@ -15,7 +15,7 @@ sync # these are normally missing in installer environment # NB: /sbin writes rely on aufs in fact, would use /tmp otherwise # but that might clobber cases when the binaries have to differ -for i in /sbin/{mdadm,lvm}; do +for i in /sbin/{mdadm,lvm,cryptsetup}; do if [ ! -x "$i" -a -x "$destdir$i" ]; then cp -p "$destdir$i" "$i" fi @@ -26,6 +26,10 @@ if [ -f "$destdir/etc/lvm/lvm.conf" ]; then cp -p "$destdir/etc/lvm/lvm.conf" /etc/lvm fi +for i in /dev/mapper/*_luks; do + cryptsetup luksClose "`basename "$i"`" +done + chroot "$destdir" swapoff -a umount "$destdir/dev/pts" -- 1.7.12.4