From 66972cce44fc1be0ab0fa8a6817ea3e03402a1df Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Feb 07 2012 20:55:17 +0000 Subject: version 015 --- diff --git a/.gitignore b/.gitignore index ae12248..b250985 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /dracut-011.tar.bz2 /dracut-013.tar.bz2 /dracut-014.tar.bz2 +/dracut-015.tar.bz2 diff --git a/0001-dracut-export-host_fs_types-host_devs.patch b/0001-dracut-export-host_fs_types-host_devs.patch deleted file mode 100644 index 1c31676..0000000 --- a/0001-dracut-export-host_fs_types-host_devs.patch +++ /dev/null @@ -1,149 +0,0 @@ -From 7ae5d9d11d1a0ccd31dced528e2792f1c1d5aeca Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 8 Dec 2011 10:25:58 +0100 -Subject: [PATCH] dracut: export host_fs_types host_devs - -Determine devices and filesystems to be included in the host-only -initramfs image. - -To get a minimal initramfs, which can mount - / - /etc - /usr - /usr/bin - /usr/sbin - /usr/lib - /usr/lib64 - /boot -we look in fstab for the corresponding devices and determine their and -their slaves' filesystem type and put all that in $host_fs_types -and $host_devs. ---- - dracut | 42 +++++++++++++++++++++++++++++++++++++++++- - dracut-functions | 30 ++++++++++++++++++++++++++---- - 2 files changed, 67 insertions(+), 5 deletions(-) - -diff --git a/dracut b/dracut -index 45ee759..3d08680 100755 ---- a/dracut -+++ b/dracut -@@ -507,12 +507,52 @@ trap 'exit 1;' SIGINT - # Need to be able to have non-root users read stuff (rpcbind etc) - chmod 755 "$initdir" - -+if [[ $hostonly ]]; then -+ -+ _get_fs_type() ( -+ [[ $1 ]] || return -+ if [[ -b /dev/block/$1 ]] && get_fs_env /dev/block/$1; then -+ echo -n "$ID_FS_TYPE " -+ return 1 -+ fi -+ if find_dev_fstype $1; then -+ echo -n " " -+ return 1 -+ fi -+ return 1 -+ ) -+ -+ push host_mp \ -+ "/" \ -+ "/etc" \ -+ "/usr" \ -+ "/usr/bin" \ -+ "/usr/sbin" \ -+ "/usr/lib" \ -+ "/usr/lib64" \ -+ "/boot" -+ -+ host_fs_types="" -+ for mp in "${host_mp[@]}"; do -+ mountpoint "$mp" >/dev/null 2>&1 || continue -+ push host_devs $(find_block_device "$mp") -+ done -+ for dev in "${host_devs[@]}"; do -+ unset fs_type -+ for fstype in $(_get_fs_type $dev) \ -+ $(check_block_and_slaves _get_fs_type $dev); do -+ strstr " $host_fs_types " "$fstype" || host_fs_types+="$fstype " -+ done -+ done -+fi -+echo "host_fs_types=$host_fs_types" -+ - export initdir dracutbasedir dracutmodules drivers \ - fw_dir drivers_dir debug no_kernel kernel_only \ - add_drivers mdadmconf lvmconf filesystems \ - use_fstab libdir usrlibdir fscks nofscks \ - stdloglvl sysloglvl fileloglvl kmsgloglvl logfile \ -- debug -+ debug host_fs_types host_devs - - # Create some directory structure first - [[ $prefix ]] && mkdir -m 0755 -p "${initdir}${prefix}" -diff --git a/dracut-functions b/dracut-functions -index c54cd7c..258d376 100755 ---- a/dracut-functions -+++ b/dracut-functions -@@ -165,8 +165,11 @@ get_fs_type() ( - echo "nfs" - return - fi -- get_fs_env $1 || return -- echo $ID_FS_TYPE -+ if get_fs_env $1; then -+ echo $ID_FS_TYPE -+ return -+ fi -+ find_dev_fstype $1 - ) - - get_fs_uuid() ( -@@ -174,11 +177,11 @@ get_fs_uuid() ( - echo $ID_FS_UUID - ) - --# finds the major:minor of the block device backing the root filesystem. - find_block_device() { - local _x _mpt _majmin _dev _fs _maj _min - if [[ $use_fstab != yes ]]; then - while read _x _x _majmin _x _mpt _x _x _fs _dev _x; do -+ [[ $_mpt = $1 ]] || continue - [[ $_fs = nfs ]] && { echo $_dev; return 0;} - [[ $_fs = nfs3 ]] && { echo $_dev; return 0;} - [[ $_fs = nfs4 ]] && { echo $_dev; return 0;} -@@ -189,7 +192,7 @@ find_block_device() { - echo $_maj:$_min - } && return 0 - } -- if [[ $_mpt = $1 ]] && [[ ${_majmin#0:} = $_majmin ]]; then -+ if [[ ${_majmin#0:} = $_majmin ]]; then - echo $_majmin - return 0 # we have a winner! - fi -@@ -215,6 +218,25 @@ find_block_device() { - return 1 - } - -+find_dev_fstype() { -+ local _x _mpt _majmin _dev _fs _maj _min -+ while read _x _x _majmin _x _mpt _x _x _fs _dev _x; do -+ [[ $_dev = $1 ]] || continue -+ echo -n $_fs; -+ return 0; -+ done < /proc/self/mountinfo -+ -+ # fall back to /etc/fstab -+ while read _dev _mpt _fs _x; do -+ [[ $_dev = $1 ]] || continue -+ echo -n $_fs; -+ return 0; -+ done < /etc/fstab -+ -+ return 1 -+} -+ -+# finds the major:minor of the block device backing the root filesystem. - find_root_block_device() { find_block_device /; } - - # Walk all the slave relationships for a given block device. diff --git a/0002-module-setup.sh-use-host_fs_types-host_devs.patch b/0002-module-setup.sh-use-host_fs_types-host_devs.patch deleted file mode 100644 index e99d8b7..0000000 --- a/0002-module-setup.sh-use-host_fs_types-host_devs.patch +++ /dev/null @@ -1,480 +0,0 @@ -From 480d772f22a2f690928c59c7c0ebfa7dc00332ea Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 8 Dec 2011 10:43:29 +0100 -Subject: [PATCH] */module-setup.sh: use host_fs_types host_devs - -For the $hostonly case, use $host_fs_types and $host_devs to determine, -if a module has to be included in the initramfs. ---- - dracut | 16 +++++--- - dracut-functions | 31 +++++++++++++--- - modules.d/90btrfs/module-setup.sh | 16 ++++---- - modules.d/90crypt/module-setup.sh | 26 ++++++++----- - modules.d/90dmraid/module-setup.sh | 40 +++++++++++++++------ - modules.d/90kernel-modules/module-setup.sh | 6 +++- - modules.d/90lvm/module-setup.sh | 25 ++++++++----- - modules.d/90mdraid/module-setup.sh | 40 +++++++++++++++----- - modules.d/95fstab-sys/module-setup.sh | 2 +- - modules.d/95nfs/module-setup.sh | 14 +++++-- - modules.d/99base/module-setup.sh | 1 + - modules.d/99fs-lib/module-setup.sh | 55 ++++++++++++++-------------- - 12 files changed, 179 insertions(+), 93 deletions(-) - -diff --git a/dracut b/dracut -index 3d08680..46694f8 100755 ---- a/dracut -+++ b/dracut -@@ -508,15 +508,19 @@ trap 'exit 1;' SIGINT - chmod 755 "$initdir" - - if [[ $hostonly ]]; then -+ # in hostonly mode, determine all devices, which have to be accessed -+ # and examine them for filesystem types -+ -+ unset host_fs_types - - _get_fs_type() ( - [[ $1 ]] || return - if [[ -b /dev/block/$1 ]] && get_fs_env /dev/block/$1; then -- echo -n "$ID_FS_TYPE " -+ echo "$1|$ID_FS_TYPE" - return 1 - fi -- if find_dev_fstype $1; then -- echo -n " " -+ if fstype=$(find_dev_fstype $1); then -+ echo "$1|$fstype" - return 1 - fi - return 1 -@@ -532,7 +536,6 @@ if [[ $hostonly ]]; then - "/usr/lib64" \ - "/boot" - -- host_fs_types="" - for mp in "${host_mp[@]}"; do - mountpoint "$mp" >/dev/null 2>&1 || continue - push host_devs $(find_block_device "$mp") -@@ -541,11 +544,12 @@ if [[ $hostonly ]]; then - unset fs_type - for fstype in $(_get_fs_type $dev) \ - $(check_block_and_slaves _get_fs_type $dev); do -- strstr " $host_fs_types " "$fstype" || host_fs_types+="$fstype " -+ if ! strstr " ${host_fs_types[*]} " " $fstype ";then -+ push host_fs_types "$fstype" -+ fi - done - done - fi --echo "host_fs_types=$host_fs_types" - - export initdir dracutbasedir dracutmodules drivers \ - fw_dir drivers_dir debug no_kernel kernel_only \ -diff --git a/dracut-functions b/dracut-functions -index 258d376..d95df14 100755 ---- a/dracut-functions -+++ b/dracut-functions -@@ -177,6 +177,14 @@ get_fs_uuid() ( - echo $ID_FS_UUID - ) - -+ -+get_maj_min() { -+ local _dev -+ _dev=$(stat -c '$((0x%T)):$((0x%t))' "$1" 2>/dev/null) -+ _dev=$(eval "echo $_dev") -+ echo $_dev -+} -+ - find_block_device() { - local _x _mpt _majmin _dev _fs _maj _min - if [[ $use_fstab != yes ]]; then -@@ -186,11 +194,8 @@ find_block_device() { - [[ $_fs = nfs3 ]] && { echo $_dev; return 0;} - [[ $_fs = nfs4 ]] && { echo $_dev; return 0;} - [[ $_fs = btrfs ]] && { -- ls -nLl "$_dev" | { -- read _x _x _x _x _maj _min _x -- _maj=${_maj//,/} -- echo $_maj:$_min -- } && return 0 -+ get_maj_min $_dev -+ return 0; - } - if [[ ${_majmin#0:} = $_majmin ]]; then - echo $_majmin -@@ -239,6 +244,22 @@ find_dev_fstype() { - # finds the major:minor of the block device backing the root filesystem. - find_root_block_device() { find_block_device /; } - -+for_each_host_dev_fs() -+{ -+ local _func="$1" -+ for f in ${host_fs_types[@]}; do -+ OLDIFS="$IFS" -+ IFS="|" -+ set -- $f -+ IFS="$OLDIFS" -+ dev=$1 -+ [[ -b /dev/block/$dev ]] && dev="/dev/block/$dev" -+ [[ -b $dev ]] || continue -+ fs="$2" -+ $_func $dev $fs -+ done -+} -+ - # Walk all the slave relationships for a given block device. - # Stop when our helper function returns success - # $1 = function to call on every found block device -diff --git a/modules.d/90btrfs/module-setup.sh b/modules.d/90btrfs/module-setup.sh -index 7b0b424..f89713f 100755 ---- a/modules.d/90btrfs/module-setup.sh -+++ b/modules.d/90btrfs/module-setup.sh -@@ -11,14 +11,14 @@ check() { - . $dracutfunctions - [[ $debug ]] && set -x - -- is_btrfs() { get_fs_type /dev/block/$1 | grep -q btrfs; } -- -- if [[ $hostonly ]]; then -- _rootdev=$(find_root_block_device) -- if [[ $_rootdev ]]; then -- is_btrfs "$_rootdev" || return 1 -- fi -- fi -+ [[ $hostonly ]] && { -+ local _found -+ for fs in $host_fs_types; do -+ [[ "$fs" = "|btrfs" ]] && _found="1" -+ done -+ [[ $_found ]] || return 1 -+ unset _found -+ } - - return 0 - } -diff --git a/modules.d/90crypt/module-setup.sh b/modules.d/90crypt/module-setup.sh -index 2a8268f..42c6b48 100755 ---- a/modules.d/90crypt/module-setup.sh -+++ b/modules.d/90crypt/module-setup.sh -@@ -9,18 +9,24 @@ check() { - - . $dracutfunctions - -- is_crypt() { [[ $(get_fs_type /dev/block/$1) = crypto_LUKS ]]; } -+ check_crypt() { -+ local dev=$1 fs=$2 -+ [[ $fs = "crypto_LUKS" ]] || continue -+ ID_FS_UUID=$(udevadm info --query=property --name=$dev \ -+ | while read line; do -+ [[ ${line#ID_FS_UUID} = $line ]] && continue -+ eval "$line" -+ echo $ID_FS_UUID -+ break -+ done) -+ [[ ${ID_FS_UUID} ]] || continue -+ echo " rd.luks.uuid=${ID_FS_UUID} " >> "${initdir}/etc/cmdline.d/90crypt.conf" -+ } - - [[ $hostonly ]] && { -- _rootdev=$(find_root_block_device) -- if [[ $_rootdev ]]; then -- # root lives on a block device, so we can be more precise about -- # hostonly checking -- check_block_and_slaves is_crypt "$_rootdev" || return 1 -- else -- # root is not on a block device, use the shotgun approach -- blkid | grep -q crypto\?_LUKS || return 1 -- fi -+ [[ -d "${initdir}/etc/cmdline.d" ]] || mkdir -p "${initdir}/etc/cmdline.d" -+ for_each_host_dev_fs check_crypt -+ [ -f "${initdir}/etc/cmdline.d/90crypt.conf" ] || return 1 - } - - return 0 -diff --git a/modules.d/90dmraid/module-setup.sh b/modules.d/90dmraid/module-setup.sh -index 87a4d1e..9de6c63 100755 ---- a/modules.d/90dmraid/module-setup.sh -+++ b/modules.d/90dmraid/module-setup.sh -@@ -11,19 +11,37 @@ check() { - . $dracutfunctions - [[ $debug ]] && set -x - -- is_dmraid() { get_fs_type /dev/block/$1 |grep -v linux_raid_member | \ -- grep -q _raid_member; } -+ check_dmraid() { -+ local dev=$1 fs=$2 holder DEVPATH DM_NAME -+ [[ "$fs" = "linux_raid_member" ]] && continue -+ [[ "$fs" = "${fs%%_raid_member}" ]] && continue -+ -+ DEVPATH=$(udevadm info --query=property --name=$dev \ -+ | while read line; do -+ [[ ${line#DEVPATH} = $line ]] && continue -+ eval "$line" -+ echo $DEVPATH -+ break -+ done) -+ for holder in /sys/$DEVPATH/holders/*; do -+ [[ -e $holder ]] || continue -+ DM_NAME=$(udevadm info --query=property --path=$holder \ -+ | while read line; do -+ [[ ${line#DM_NAME} = $line ]] && continue -+ eval "$line" -+ echo $DM_NAME -+ break -+ done) -+ done -+ -+ [[ ${DM_NAME} ]] || continue -+ echo " rd.dm.uuid=${DM_NAME} " >> "${initdir}/etc/cmdline.d/90dmraid.conf" -+ } - - [[ $hostonly ]] && { -- _rootdev=$(find_root_block_device) -- if [[ $_rootdev ]]; then -- # root lives on a block device, so we can be more precise about -- # hostonly checking -- check_block_and_slaves is_dmraid "$_rootdev" || return 1 -- else -- # root is not on a block device, use the shotgun approach -- dmraid -r | grep -q ok || return 1 -- fi -+ [[ -d "${initdir}/etc/cmdline.d" ]] || mkdir -p "${initdir}/etc/cmdline.d" -+ for_each_host_dev_fs check_dmraid -+ [ -f "${initdir}/etc/cmdline.d/90dmraid.conf" ] || return 1 - } - - return 0 -diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh -index d7aadd8..8d2ab91 100755 ---- a/modules.d/90kernel-modules/module-setup.sh -+++ b/modules.d/90kernel-modules/module-setup.sh -@@ -50,7 +50,11 @@ installkernel() { - rm -fr ${initdir}/lib/modules/*/kernel/fs/ocfs2 - fi - else -- hostonly='' instmods $(get_fs_type "/dev/block/$(find_root_block_device)") -+ inst_fs() { -+ [[ $2 ]] || return 1 -+ hostonly='' instmods $2 -+ } -+ for_each_host_dev_fs inst_fs - fi - else - hostonly='' instmods $drivers -diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh -index 40dc350..87751cb 100755 ---- a/modules.d/90lvm/module-setup.sh -+++ b/modules.d/90lvm/module-setup.sh -@@ -10,18 +10,23 @@ check() { - . $dracutfunctions - [[ $debug ]] && set -x - -- is_lvm() { [[ $(get_fs_type /dev/block/$1) = LVM2_member ]]; } -+ check_lvm() { -+ local dev=$1 -+ DM_LV_NAME=$(udevadm info --query=property --name=$dev \ -+ | while read line; do -+ [[ ${line#DM_LV_NAME} = $line ]] && continue -+ eval "$line" -+ echo $DM_LV_NAME -+ break -+ done) -+ [[ ${DM_LV_NAME} ]] || continue -+ echo " rd.lvm.lv=${DM_LV_NAME} " >> "${initdir}/etc/cmdline.d/90lvm.conf" -+ } - - [[ $hostonly ]] && { -- _rootdev=$(find_root_block_device) -- if [[ $_rootdev ]]; then -- # root lives on a block device, so we can be more precise about -- # hostonly checking -- check_block_and_slaves is_lvm "$_rootdev" || return 1 -- else -- # root is not on a block device, use the shotgun approach -- blkid | grep -q LVM2_member || return 1 -- fi -+ [[ -d "${initdir}/etc/cmdline.d" ]] || mkdir -p "${initdir}/etc/cmdline.d" -+ for_each_host_dev_fs check_lvm -+ [ -f "${initdir}/etc/cmdline.d/90lvm.conf" ] || return 1 - } - - return 0 -diff --git a/modules.d/90mdraid/module-setup.sh b/modules.d/90mdraid/module-setup.sh -index 029d667..05e0127 100755 ---- a/modules.d/90mdraid/module-setup.sh -+++ b/modules.d/90mdraid/module-setup.sh -@@ -10,18 +10,38 @@ check() { - . $dracutfunctions - [[ $debug ]] && set -x - -- is_mdraid() { [[ -d "/sys/dev/block/$1/md" ]]; } -+ check_mdraid() { -+ local dev=$1 fs=$2 holder DEVPATH MD_UUID -+ [[ "$fs" = "linux_raid_member" ]] && continue -+ [[ "$fs" = "${fs%%_raid_member}" ]] && continue -+ -+ DEVPATH=$(udevadm info --query=property --name=$dev \ -+ | while read line; do -+ [[ ${line#DEVPATH} = $line ]] && continue -+ eval "$line" -+ echo $DEVPATH -+ break -+ done) -+ -+ for holder in /sys/$DEVPATH/holders/*; do -+ [[ -e $holder ]] || continue -+ MD_UUID=$(udevadm info --query=property --path=$holder \ -+ | while read line; do -+ [[ ${line#MD_UUID} = $line ]] && continue -+ eval "$line" -+ echo $MD_UUID -+ break -+ done) -+ done -+ -+ [[ ${MD_UUID} ]] || continue -+ echo " rd.md.uuid=${MD_UUID} " >> "${initdir}/etc/cmdline.d/90mdraid.conf" -+ } - - [[ $hostonly ]] && { -- _rootdev=$(find_root_block_device) -- if [[ $_rootdev ]]; then -- # root lives on a block device, so we can be more precise about -- # hostonly checking -- check_block_and_slaves is_mdraid "$_rootdev" || return 1 -- else -- # root is not on a block device, use the shotgun approach -- blkid | egrep -q '(linux|isw|ddf)_raid' || return 1 -- fi -+ [[ -d "${initdir}/etc/cmdline.d" ]] || mkdir -p "${initdir}/etc/cmdline.d" -+ for_each_host_dev_fs check_mdraid -+ [[ -f "${initdir}/etc/cmdline.d/90mdraid.conf" ]] || return 1 - } - - return 0 -diff --git a/modules.d/95fstab-sys/module-setup.sh b/modules.d/95fstab-sys/module-setup.sh -index c22b047..ea9db83 100755 ---- a/modules.d/95fstab-sys/module-setup.sh -+++ b/modules.d/95fstab-sys/module-setup.sh -@@ -11,6 +11,6 @@ depends() { - } - - install() { -- dracut_install /etc/fstab.sys -+ inst /etc/fstab.sys /etc/fstab - inst_hook pre-pivot 00 "$moddir/mount-sys.sh" - } -diff --git a/modules.d/95nfs/module-setup.sh b/modules.d/95nfs/module-setup.sh -index c5f97c9..bb3b793 100755 ---- a/modules.d/95nfs/module-setup.sh -+++ b/modules.d/95nfs/module-setup.sh -@@ -3,13 +3,19 @@ - # ex: ts=8 sw=4 sts=4 et filetype=sh - - check() { -- # If hostonly was requested, fail the check if we are not actually -- # booting from root. -- [ $hostonly ] && ! egrep -q '/ nfs[34 ]' /proc/mounts && return 1 -- - # If our prerequisites are not met, fail anyways. - type -P rpcbind >/dev/null || type -P portmap >/dev/null || return 1 - type -P rpc.statd mount.nfs mount.nfs4 umount >/dev/null || return 1 -+ -+ [[ $hostonly ]] && { -+ for fs in ${host_fs_types[@]}; do -+ strstr "$fs" "|nfs" && return 0 -+ strstr "$fs" "|nfs3" && return 0 -+ strstr "$fs" "|nfs4" && return 0 -+ done -+ return 255 -+ } -+ - return 0 - } - -diff --git a/modules.d/99base/module-setup.sh b/modules.d/99base/module-setup.sh -index f6dc920..5297a9d 100755 ---- a/modules.d/99base/module-setup.sh -+++ b/modules.d/99base/module-setup.sh -@@ -38,6 +38,7 @@ install() { - dracut_install switch_root || dfatal "Failed to install switch_root" - - inst "$moddir/dracut-lib.sh" "/lib/dracut-lib.sh" -+ inst "$moddir/mount-hook.sh" "/usr/bin/mount-hook" - inst_hook cmdline 10 "$moddir/parse-root-opts.sh" - mkdir -p "${initdir}/var" - [ -x /lib/systemd/systemd-timestamp ] && inst /lib/systemd/systemd-timestamp -diff --git a/modules.d/99fs-lib/module-setup.sh b/modules.d/99fs-lib/module-setup.sh -index 04b63f1..9c900cc 100755 ---- a/modules.d/99fs-lib/module-setup.sh -+++ b/modules.d/99fs-lib/module-setup.sh -@@ -10,6 +10,32 @@ depends() { - return 0 - } - -+ -+echo_fs_helper() { -+ local dev=$1 fs=$2 -+ case "$fs" in -+ xfs) -+ echo -n " xfs_db xfs_repair xfs_check " -+ ;; -+ ext?) -+ echo -n " e2fsck " -+ ;; -+ jfs) -+ echo -n " jfs_fsck " -+ ;; -+ reiserfs) -+ echo -n " reiserfsck " -+ ;; -+ btrfs) -+ echo -n " btrfsck " -+ ;; -+ *) -+ [[ -x fsck.$fs ]] && echo -n " fsck.$fs " -+ ;; -+ esac -+} -+ -+ - install() { - local _helpers - -@@ -25,33 +51,8 @@ install() { - e2fsck jfs_fsck reiserfsck btrfsck - " - if [[ $hostonly ]]; then -- print_fs_type() { get_fs_type /dev/block/$1; } -- _rootdev=$(find_root_block_device) -- if [[ $_rootdev ]]; then -- _helpers="umount mount " -- for fs in $(check_block_and_slaves print_fs_type "$_rootdev"); do -- case "$fs" in -- xfs) -- _helpers+=" xfs_db xfs_repair xfs_check " -- ;; -- ext?) -- _helpers+=" e2fsck " -- ;; -- jfs) -- _helpers+=" jfs_fsck " -- ;; -- reiserfs) -- _helpers+=" reiserfsck " -- ;; -- btrfs) -- _helpers+=" btrfsck " -- ;; -- *) -- [[ -x fsck.$fs ]] && _helpers+= " fsck.$fs " -- ;; -- esac -- done -- fi -+ _helpers="umount mount " -+ _helpers+=$(for_each_host_dev_fs echo_fs_helper) - fi - else - _helpers="$fscks" diff --git a/0003-95iscsi-iscsiroot-unset-used-variables-before-starti.patch b/0003-95iscsi-iscsiroot-unset-used-variables-before-starti.patch deleted file mode 100644 index 7e110f2..0000000 --- a/0003-95iscsi-iscsiroot-unset-used-variables-before-starti.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 43f218522128b7864346bb11f7aad234410db745 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 8 Dec 2011 15:04:04 +0100 -Subject: [PATCH] 95iscsi/iscsiroot: unset used variables before starting - -If iscsiroot is called multiple times, then some variables can hold the -values of a previous call, so unset all variables before using them. - -https://bugzilla.redhat.com/show_bug.cgi?id=752066 ---- - modules.d/95iscsi/iscsiroot | 5 +++++ - 1 files changed, 5 insertions(+), 0 deletions(-) - -diff --git a/modules.d/95iscsi/iscsiroot b/modules.d/95iscsi/iscsiroot -index bcdc046..e7bac74 100755 ---- a/modules.d/95iscsi/iscsiroot -+++ b/modules.d/95iscsi/iscsiroot -@@ -51,6 +51,11 @@ if getargbool 0 rd.iscsi.firmware -y iscsi_firmware ; then - exit 0 - fi - -+unset iscsi_initiator iscsi_target_name iscsi_target_ip iscsi_target_port -+unset iscsi_target_group iscsi_protocol iscsirw iscsi_lun -+unset iscsi_username iscsi_password -+unset iscsi_in_username iscsi_in_password -+ - # override conf settings by command line options - arg=$(getargs rd.iscsi.initiator iscsi_initiator=) - [ -n "$arg" ] && iscsi_initiator=$arg diff --git a/0004-99base-dracut-lib.sh-killproc-prefix-local-variables.patch b/0004-99base-dracut-lib.sh-killproc-prefix-local-variables.patch deleted file mode 100644 index 9334b0d..0000000 --- a/0004-99base-dracut-lib.sh-killproc-prefix-local-variables.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 4d63882615543b19b779607563ab2a098d54b403 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Fri, 9 Dec 2011 10:12:05 +0100 -Subject: [PATCH] 99base/dracut-lib.sh: killproc, prefix local variables - ---- - modules.d/99base/dracut-lib.sh | 16 ++++++++-------- - 1 files changed, 8 insertions(+), 8 deletions(-) - -diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh -index e86d209..c881869 100755 ---- a/modules.d/99base/dracut-lib.sh -+++ b/modules.d/99base/dracut-lib.sh -@@ -627,14 +627,14 @@ wait_for_dev() - } - - killproc() { -- local exe="$(command -v $1)" -- local sig=$2 -- local i -- [ -x "$exe" ] || return 1 -- for i in /proc/[0-9]*; do -- [ "$i" = "/proc/1" ] && continue -- if [ -e "$i"/exe ] && [ "$i/exe" -ef "$exe" ] ; then -- kill $sig ${i##*/} -+ local _exe="$(command -v $1)" -+ local _sig=$2 -+ local _i -+ [ -x "$_exe" ] || return 1 -+ for _i in /proc/[0-9]*; do -+ [ "$_i" = "/proc/1" ] && continue -+ if [ -e "$_i"/_exe ] && [ "$_i/_exe" -ef "$_exe" ] ; then -+ kill $_sig ${_i##*/} - fi - done - } diff --git a/0005-dracut.spec-remove-unnecessary-dependencies.patch b/0005-dracut.spec-remove-unnecessary-dependencies.patch deleted file mode 100644 index 16e6783..0000000 --- a/0005-dracut.spec-remove-unnecessary-dependencies.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 828feae4f1814a915b2f7f362a5920322e0d6fcc Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Fri, 9 Dec 2011 10:28:40 +0100 -Subject: [PATCH] dracut.spec: remove unnecessary dependencies - -Since the initramfs generation is done in %postrans of the kernel rpm, -we can drop all hard requirements. - -Also make some requirements a conflict to express the version -dependency. ---- - dracut.spec | 24 ++---------------------- - 1 files changed, 2 insertions(+), 22 deletions(-) - -diff --git a/dracut.spec b/dracut.spec -index 91b62ee..1c50f37 100644 ---- a/dracut.spec -+++ b/dracut.spec -@@ -68,17 +68,15 @@ Requires: filesystem >= 2.1.0 - Requires: findutils - Requires: grep - Requires: gzip --Requires: kbd - Requires: mktemp >= 1.5-5 - Requires: module-init-tools >= 3.7-9 - Requires: sed --Requires: tar - Requires: udev - Requires: util-linux >= 2.20 - - %if 0%{?fedora} || 0%{?rhel} > 6 --Requires: initscripts >= 8.63-1 --Requires: plymouth >= 0.8.0-0.2009.29.09.19.1 -+Conflicts: initscripts < 8.63-1 -+Conflicts: plymouth < 0.8.0-0.2009.29.09.19.1 - %endif - - %description -@@ -91,24 +89,6 @@ NFS, iSCSI, NBD, FCoE with the dracut-network package. - %package network - Summary: Dracut modules to build a dracut initramfs with network support - Requires: %{name} = %{version}-%{release} --Requires: rpcbind --%if %{with_nbd} --Requires: nbd --%endif --Requires: iproute --Requires: bridge-utils -- --%if 0%{?fedora} || 0%{?rhel} > 6 --Requires: iscsi-initiator-utils --Requires: nfs-utils --Requires: dhclient --%endif -- --%if 0%{?suse_version} --Requires: dhcp-client --Requires: nfs-client --Requires: vlan --%endif - Obsoletes: dracut-generic < 008 - Provides: dracut-generic = %{version}-%{release} - diff --git a/0006-TEST-12-RAID-DEG-mkdir-run.patch b/0006-TEST-12-RAID-DEG-mkdir-run.patch deleted file mode 100644 index 00dac18..0000000 --- a/0006-TEST-12-RAID-DEG-mkdir-run.patch +++ /dev/null @@ -1,21 +0,0 @@ -From 5112bfc8ccd01dee3ef97c6e6ce2e78d709e201f Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 15 Dec 2011 13:42:16 +0100 -Subject: [PATCH] TEST-12-RAID-DEG: mkdir /run - ---- - test/TEST-12-RAID-DEG/create-root.sh | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) - -diff --git a/test/TEST-12-RAID-DEG/create-root.sh b/test/TEST-12-RAID-DEG/create-root.sh -index 47eb961..7be4a32 100755 ---- a/test/TEST-12-RAID-DEG/create-root.sh -+++ b/test/TEST-12-RAID-DEG/create-root.sh -@@ -28,6 +28,7 @@ mke2fs -L root /dev/dracut/root && \ - mkdir -p /sysroot && \ - mount /dev/dracut/root /sysroot && \ - cp -a -t /sysroot /source/* && \ -+mkdir /sysroot/run && \ - umount /sysroot && \ - lvm lvchange -a n /dev/dracut/root && \ - cryptsetup luksClose /dev/mapper/dracut_crypt_test && \ diff --git a/0007-99base-dracut-lib.sh-added-inst_mount_hook-add_mount.patch b/0007-99base-dracut-lib.sh-added-inst_mount_hook-add_mount.patch deleted file mode 100644 index 439ee69..0000000 --- a/0007-99base-dracut-lib.sh-added-inst_mount_hook-add_mount.patch +++ /dev/null @@ -1,127 +0,0 @@ -From bb61d657c1ff11c4339a777e1fcf57173783bf7d Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 15 Dec 2011 14:37:34 +0100 -Subject: [PATCH] 99base/dracut-lib.sh: added inst_mount_hook add_mount_point - -inst_mount_hook