From: Victor Lowther Date: Mon, 16 Mar 2009 09:42:02 +0000 (-0500) Subject: Update test framework to create and use LVM on cryptroot X-Git-Tag: 0.1~282^2~12^2~14 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=88ffd2df3fcc78cb656b077acb3e8374474b1356;p=thirdparty%2Fdracut.git Update test framework to create and use LVM on cryptroot --- diff --git a/dracut b/dracut index eb3ff24a1..7a14765a0 100755 --- a/dracut +++ b/dracut @@ -19,6 +19,7 @@ while (($# > 0)); do -c|--conf) conffile="$2"; shift;; -l|--local) allowlocal="yes" ;; -h|--hostonly) hostonly="-h" ;; + -i|--include) include_src="$2"; include_target="$3"; shift 2;; --skip-missing) skipmissing="yes" ;; *) break ;; esac @@ -102,4 +103,9 @@ unset moddir # make sure that library links are correct and up to date ldconfig -n -r "$initdir" /lib* /usr/lib* +[[ $include_src && $include_target ]] && { + mkdir -p "$initdir$include_target" + cp -a -t "$initdir$include_target" "$include_src"/* +} + ( cd "$initdir"; find . |cpio -H newc -o |gzip -9 > "$outfile"; ) diff --git a/modules.d/00test/check b/modules.d/00test/check new file mode 100755 index 000000000..afe8ade3e --- /dev/null +++ b/modules.d/00test/check @@ -0,0 +1,2 @@ +#!/bin/bash +exit 1 diff --git a/modules.d/00test/copy-root.sh b/modules.d/00test/copy-root.sh new file mode 100755 index 000000000..fe9f57ae9 --- /dev/null +++ b/modules.d/00test/copy-root.sh @@ -0,0 +1,2 @@ +#!/bin/sh +cp -a -t "$NEWROOT" /source/* \ No newline at end of file diff --git a/modules.d/00test/create-root.sh b/modules.d/00test/create-root.sh new file mode 100755 index 000000000..ce9f40bfd --- /dev/null +++ b/modules.d/00test/create-root.sh @@ -0,0 +1,19 @@ +#!/bin/sh +sfdisk /dev/sda </dev/console 2>&1 /cryptroot - udevadm control --start-exec-queue + udevadm control --start_exec_queue udevadm settle --timeout=30 } diff --git a/modules.d/90crypt/install b/modules.d/90crypt/install index 92b516995..82f8ffdb4 100755 --- a/modules.d/90crypt/install +++ b/modules.d/90crypt/install @@ -1,4 +1,5 @@ #!/bin/bash inst cryptsetup +instmods dm_crypt =crypto inst_rules "$moddir/63-luks.rules" inst_hook mount 10 "$moddir/cryptroot.sh" \ No newline at end of file diff --git a/modules.d/99base/init b/modules.d/99base/init index b45bb7b10..5661d6000 100755 --- a/modules.d/99base/init +++ b/modules.d/99base/init @@ -41,7 +41,7 @@ mount -t sysfs /sys /sys >/dev/null 2>&1 mount -t tmpfs -omode=0755 udev /dev >/dev/null 2>&1 read CMDLINE