From 6462ee55d302744dd1e06d80e279e6cb246e3c7a Mon Sep 17 00:00:00 2001 From: Milan Broz Date: Tue, 10 Jul 2012 19:59:44 +0200 Subject: [PATCH] Update example files for new dracut. --- misc/dracut_90reencrypt/README | 4 ++-- misc/dracut_90reencrypt/{check => check.old} | 0 misc/dracut_90reencrypt/{install => install.old} | 0 misc/dracut_90reencrypt/module-setup.sh | 22 ++++++++++++++++++++++ 4 files changed, 24 insertions(+), 2 deletions(-) rename misc/dracut_90reencrypt/{check => check.old} (100%) rename misc/dracut_90reencrypt/{install => install.old} (100%) create mode 100755 misc/dracut_90reencrypt/module-setup.sh diff --git a/misc/dracut_90reencrypt/README b/misc/dracut_90reencrypt/README index 9623be4..0b65ceb 100644 --- a/misc/dracut_90reencrypt/README +++ b/misc/dracut_90reencrypt/README @@ -1,8 +1,8 @@ Example of simple dracut module for reencryption of system LUKS drive on-the-fly. -Install in /usr/share/dracut/modules.d/90reencrypt, then -rebuild intramfs "with dracut -f -a reencrypt" +Install in /usr/[share|lib]/dracut/modules.d/90reencrypt, then +rebuild intramfs "with dracut -f -a reencrypt". Dracut then recognize argument rd_REENCRYPT=name:size, e.g. rd_REENCRYPT=sda2:52G means only 52G of device diff --git a/misc/dracut_90reencrypt/check b/misc/dracut_90reencrypt/check.old similarity index 100% rename from misc/dracut_90reencrypt/check rename to misc/dracut_90reencrypt/check.old diff --git a/misc/dracut_90reencrypt/install b/misc/dracut_90reencrypt/install.old similarity index 100% rename from misc/dracut_90reencrypt/install rename to misc/dracut_90reencrypt/install.old diff --git a/misc/dracut_90reencrypt/module-setup.sh b/misc/dracut_90reencrypt/module-setup.sh new file mode 100755 index 0000000..a843964 --- /dev/null +++ b/misc/dracut_90reencrypt/module-setup.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +check() { + [ -x /sbin/cryptsetup-reencrypt ] || return 1 + return 255 +} + +depends() { + echo dm rootfs-block + return 0 +} + +installkernel() { + instmods dm_crypt =crypto +} + +install() { + dracut_install cryptsetup-reencrypt + + inst_hook cmdline 30 "$moddir/parse-reencrypt.sh" + inst_simple "$moddir"/reencrypt.sh /sbin/reencrypt +} \ No newline at end of file -- 2.7.4