version 015

This commit is contained in:
Harald Hoyer 2012-02-07 21:55:17 +01:00
parent 6d5d063d90
commit 66972cce44
83 changed files with 7 additions and 5097 deletions

1
.gitignore vendored
View File

@ -2,3 +2,4 @@
/dracut-011.tar.bz2
/dracut-013.tar.bz2
/dracut-014.tar.bz2
/dracut-015.tar.bz2

View File

@ -1,149 +0,0 @@
From 7ae5d9d11d1a0ccd31dced528e2792f1c1d5aeca Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
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.

View File

@ -1,480 +0,0 @@
From 480d772f22a2f690928c59c7c0ebfa7dc00332ea Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
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"

View File

@ -1,29 +0,0 @@
From 43f218522128b7864346bb11f7aad234410db745 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
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

View File

@ -1,36 +0,0 @@
From 4d63882615543b19b779607563ab2a098d54b403 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
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
}

View File

@ -1,63 +0,0 @@
From 828feae4f1814a915b2f7f362a5920322e0d6fcc Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
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}

View File

@ -1,21 +0,0 @@
From 5112bfc8ccd01dee3ef97c6e6ce2e78d709e201f Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
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 && \

View File

@ -1,127 +0,0 @@
From bb61d657c1ff11c4339a777e1fcf57173783bf7d Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
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 <mountpoint> <prio> <name> <script>
Install a mount hook with priority <prio>,
which executes <script> as soon as <mountpoint> is mounted.
add_mount_point <dev> <mountpoint> <filesystem> <fsopts>
Mount <dev> on <mountpoint> with <filesystem> and <fsopts>
and call any mount hooks, as soon, as it is mounted
---
modules.d/99base/dracut-lib.sh | 91 ++++++++++++++++++++++++++++++++++++++++
1 files changed, 91 insertions(+), 0 deletions(-)
diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh
index c881869..9eae4d9 100755
--- a/modules.d/99base/dracut-lib.sh
+++ b/modules.d/99base/dracut-lib.sh
@@ -602,6 +602,92 @@ usable_root() {
return 0
}
+inst_hook() {
+ local _hookname _unique _name _job _exe
+ while [ $# -gt 0 ]; do
+ case "$1" in
+ --hook)
+ _hookname="/$2";shift;;
+ --unique)
+ _unique="yes";;
+ --name)
+ _name="$2";shift;;
+ *)
+ break;;
+ esac
+ shift
+ done
+
+ if [ -z "$_unique" ]; then
+ _job="${_name}$$"
+ else
+ _job="${_name:-$1}"
+ _job=${_job##*/}
+ fi
+
+ _exe=$1
+ shift
+
+ [ -x "$_exe" ] || _exe=$(command -v $_exe)
+
+ if [ -n "$onetime" ]; then
+ {
+ echo '[ -e "$_job" ] && rm "$_job"'
+ echo "$_exe $@"
+ } > "/tmp/$$-${_job}.sh"
+ else
+ echo "$_exe $@" > "/tmp/$$-${_job}.sh"
+ fi
+
+ mv -f "/tmp/$$-${_job}.sh" "$hookdir/${_hookname}/${_job}.sh"
+}
+
+# inst_mount_hook <mountpoint> <prio> <name> <script>
+#
+# Install a mount hook with priority <prio>,
+# which executes <script> as soon as <mountpoint> is mounted.
+inst_mount_hook() {
+ local _prio="$2" _jobname="$3" _script="$4"
+ local _hookname="mount-$(str_replace "$1" '/' '\\x2f')"
+ [ -d "$hookdir/${_hookname}" ] || mkdir -p "$hookdir/${_hookname}"
+ inst_hook --hook "$_hookname" --unique --name "${_prio}-${_jobname}" "$_script"
+}
+
+# add_mount_point <dev> <mountpoint> <filesystem> <fsopts>
+#
+# Mount <dev> on <mountpoint> with <filesystem> and <fsopts>
+# and call any mount hooks, as soon, as it is mounted
+add_mount_point() {
+ local _dev="$1" _mp="$2" _fs="$3" _fsopts="$4"
+ local _hookname="mount-$(str_replace "$2" '/' '\\x2f')"
+ local _devname="dev-$(str_replace "$1" '/' '\\x2f')"
+ echo "$_dev $_mp $_fs $_fsopts 0 0" >> /etc/fstab
+
+ exec 7>/etc/udev/rules.d/99-mount-${_devname}.rules
+ echo 'SUBSYSTEM!="block", GOTO="mount_end"' >&7
+ echo 'ACTION!="add|change", GOTO="mount_end"' >&7
+ if [ -n "$_dev" ]; then
+ udevmatch "$_dev" >&7 || {
+ warn "add_mount_point dev=$_dev incorrect!"
+ continue
+ }
+ printf ', ' >&7
+ fi
+
+ {
+ printf -- 'RUN+="%s --unique --onetime ' $(command -v initqueue)
+ printf -- '--name mount-%%k '
+ printf -- '%s %s"\n' "$(command -v mount_hook)" "${_mp}"
+ } >&7
+ echo 'LABEL="mount_end"' >&7
+ exec 7>&-
+}
+
+# wait_for_mount <mountpoint>
+#
+# Installs a initqueue-finished script,
+# which will cause the main loop only to exit,
+# if <mountpoint> is mounted.
wait_for_mount()
{
local _name
@@ -614,6 +700,11 @@ wait_for_mount()
} >> "$hookdir/emergency/90-${_name}.sh"
}
+# wait_for_dev <dev>
+#
+# Installs a initqueue-finished script,
+# which will cause the main loop only to exit,
+# if the device <dev> is recognized by the system.
wait_for_dev()
{
local _name

View File

@ -1,106 +0,0 @@
From 70cb8a686f710b237c6f7c7524b47d2649f6751a Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 15 Dec 2011 14:36:37 +0100
Subject: [PATCH] dracut: add --add-fstab and --mount option
--add-fstab [FILE] Add file to the initramfs fstab
--mount "[DEV] [MP] [FSTYPE] [FSOPTS]"
Mount device [DEV] on mountpoint [MP] with filesystem
[FSTYPE] and options [FSOPTS] in the initramfs
---
dracut | 40 ++++++++++++++++++++++++++++++++++++
modules.d/95fstab-sys/mount-sys.sh | 4 +-
2 files changed, 42 insertions(+), 2 deletions(-)
diff --git a/dracut b/dracut
index 46694f8..8449fc1 100755
--- a/dracut
+++ b/dracut
@@ -85,6 +85,10 @@ Creates initial ramdisk images for preloading modules
-H, --hostonly Host-Only mode: Install only what is needed for
booting the local host instead of a generic host.
--fstab Use /etc/fstab to determine the root device.
+ --add-fstab [FILE] Add file to the initramfs fstab
+ --mount "[DEV] [MP] [FSTYPE] [FSOPTS]"
+ Mount device [DEV] on mountpoint [MP] with filesystem
+ [FSTYPE] and options [FSOPTS] in the initramfs
-i, --include [SOURCE] [TARGET]
Include the files in the SOURCE directory into the
Target directory in the final initramfs.
@@ -207,6 +211,8 @@ while (($# > 0)); do
-I|--install) push_arg install_items_l "$@" || shift;;
--fwdir) push_arg fw_dir_l "$@" || shift;;
--fscks) push_arg fscks_l "$@" || shift;;
+ --add-fstab) push_arg add_fstab_l "$@" || shift;;
+ --mount) push_arg fstab_lines "$@" || shift;;
--nofscks) nofscks_l="yes";;
-k|--kmoddir) read_arg drivers_dir_l "$@" || shift;;
-c|--conf) read_arg conffile "$@" || shift;;
@@ -332,6 +338,18 @@ if (( ${#fscks_l[@]} )); then
done
fi
+if (( ${#add_fstab_l[@]} )); then
+ while pop add_fstab_l val; do
+ add_fstab+=" $val "
+ done
+fi
+
+if (( ${#fstab_lines_l[@]} )); then
+ while pop fstab_lines_l val; do
+ push fstab_lines $val
+ done
+fi
+
if (( ${#install_items_l[@]} )); then
while pop install_items_l val; do
push install_items $val
@@ -526,6 +544,21 @@ if [[ $hostonly ]]; then
return 1
)
+ for line in "${fstab_lines[@]}"; do
+ set -- $line
+ #dev mp fs fsopts
+ dev="$(get_maj_min $1)"
+ push host_devs "${dev:-$1}"
+ push host_fs_types "$dev|$3"
+ done
+
+ for f in $add_fstab; do
+ [ -e $f ] || continue
+ while read dev rest; do
+ push host_devs $dev
+ done < $f
+ done
+
push host_mp \
"/" \
"/etc" \
@@ -668,6 +701,13 @@ while pop install_items items; do
done
unset item
+while pop fstab_lines line; do
+ echo "$line 0 0" >> "${initdir}/etc/fstab"
+done
+
+for f in $add_fstab; do
+ cat $f >> "${initdir}/etc/fstab"
+done
if [[ $kernel_only != yes ]]; then
# make sure that library links are correct and up to date
diff --git a/modules.d/95fstab-sys/mount-sys.sh b/modules.d/95fstab-sys/mount-sys.sh
index f44351d..a8fbd50 100755
--- a/modules.d/95fstab-sys/mount-sys.sh
+++ b/modules.d/95fstab-sys/mount-sys.sh
@@ -25,6 +25,6 @@ fstab_mount() {
return 0
}
-for r in $NEWROOT /; do
- fstab_mount "$r/etc/fstab.sys" && break
+for r in $NEWROOT/etc/fstab.sys /etc/fstab; do
+ fstab_mount $r && break
done

View File

@ -1,27 +0,0 @@
From e74167bd6ae30cc2ea0ed2c4c4ac8011d5feadfa Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 5 Jan 2012 10:51:00 +0100
Subject: [PATCH] mkinitrd-dracut.sh: s/read_args/read_arg/g
https://bugzilla.redhat.com/show_bug.cgi?id=771106
---
mkinitrd-dracut.sh | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/mkinitrd-dracut.sh b/mkinitrd-dracut.sh
index b635a53..02f1a7f 100644
--- a/mkinitrd-dracut.sh
+++ b/mkinitrd-dracut.sh
@@ -49,10 +49,10 @@ while (($# > 0)); do
exit 0;;
-v|--verbose) dracut_args="${dracut_args} -v";;
-f|--force) dracut_args="${dracut_args} -f";;
- --preload) read_args modname "$@" || shift
+ --preload) read_arg modname "$@" || shift
basicmodules="$basicmodules $modname";;
--image-version) img_vers=yes;;
- --rootfs) read_args rootfs "$@" || shift
+ --rootfs) read_arg rootfs "$@" || shift
dracut_args="${dracut_args} --filesystems $rootfs";;
--nocompress) dracut_args="$dracut_args --no-compress";;
--help) usage -n;;

View File

@ -1,26 +0,0 @@
From 14599cd760203a43be992c50fa1dc6a4c6e473ea Mon Sep 17 00:00:00 2001
From: "Brian C. Lane" <bcl@redhat.com>
Date: Wed, 4 Jan 2012 09:21:05 -0800
Subject: [PATCH] Fix live update script (#769970)
pushd and popd are not available in the shell used by dracut.
---
modules.d/90dmsquash-live/apply-live-updates.sh | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/modules.d/90dmsquash-live/apply-live-updates.sh b/modules.d/90dmsquash-live/apply-live-updates.sh
index 8dce5d4..f840d1a 100755
--- a/modules.d/90dmsquash-live/apply-live-updates.sh
+++ b/modules.d/90dmsquash-live/apply-live-updates.sh
@@ -1,8 +1,9 @@
#!/bin/sh
if [ -b /dev/mapper/live-rw ]; then
- if pushd /updates &>/dev/null; then
+ if [ -d /updates ]; then
echo "Applying updates to live image..."
+ cd /updates
/bin/cp -a -t $NEWROOT .
- popd &>/dev/null
+ cd -
fi
fi

View File

@ -1,22 +0,0 @@
From 5e90d2665831a137e6726757404f80cda97d1d4f Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 5 Jan 2012 14:36:45 +0100
Subject: [PATCH] Makefile: set bindir to ${prefix}/bin rather than sbin
---
Makefile | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Makefile b/Makefile
index b617a20..ccabd1e 100644
--- a/Makefile
+++ b/Makefile
@@ -6,7 +6,7 @@ libdir ?= ${prefix}/lib
datadir ?= ${prefix}/share
pkglibdir ?= ${libdir}/dracut
sysconfdir ?= ${prefix}/etc
-bindir ?= ${prefix}/sbin
+bindir ?= ${prefix}/bin
mandir ?= ${prefix}/share/man
manpages = dracut.8 dracut.cmdline.7 dracut.conf.5 dracut-catimages.8 dracut-gencmdline.8

View File

@ -1,24 +0,0 @@
From dcba56cafa8e3917fc1bfb9f295c3f23555663b9 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 5 Jan 2012 14:48:57 +0100
Subject: [PATCH] Makefile: dash does not like {} expansion
removed {} expansion for mandir mkdir for users, which have dash as
/bin/sh
---
Makefile | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Makefile b/Makefile
index ccabd1e..e331c5f 100644
--- a/Makefile
+++ b/Makefile
@@ -30,7 +30,7 @@ install: doc
mkdir -p $(DESTDIR)$(bindir)
mkdir -p $(DESTDIR)$(sysconfdir)
mkdir -p $(DESTDIR)$(pkglibdir)/modules.d
- mkdir -p $(DESTDIR)$(mandir)/man{5,7,8}
+ mkdir -p $(DESTDIR)$(mandir)/man5 $(DESTDIR)$(mandir)/man7 $(DESTDIR)$(mandir)/man8
install -m 0755 dracut $(DESTDIR)$(bindir)/dracut
install -m 0755 dracut-gencmdline $(DESTDIR)$(bindir)/dracut-gencmdline
install -m 0755 dracut-catimages $(DESTDIR)$(bindir)/dracut-catimages

View File

@ -1,22 +0,0 @@
From 39f87ab2abc1de6a168ef8a7469755a92d8d218d Mon Sep 17 00:00:00 2001
From: Colin Guthrie <colin@mageia.org>
Date: Wed, 30 Nov 2011 22:16:01 +0000
Subject: [PATCH] mkinitrd: Mention the --nocompress option in help output
Originally from Mandriva patch: dracut-010-mkinitrd.patch
---
mkinitrd-dracut.sh | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/mkinitrd-dracut.sh b/mkinitrd-dracut.sh
index 02f1a7f..ffea2d1 100644
--- a/mkinitrd-dracut.sh
+++ b/mkinitrd-dracut.sh
@@ -8,6 +8,7 @@ usage () {
$cmd "usage: ${0##*/} [--version] [--help] [-v] [-f] [--preload <module>]"
$cmd " [--image-version] [--with=<module>]"
+ $cmd " [--nocompress]"
$cmd " <initrd-image> <kernel-version>"
$cmd ""
$cmd " (ex: ${0##*/} /boot/initramfs-$kver.img $kver)"

View File

@ -1,93 +0,0 @@
From 95023eb325f899303deaaee7c53d83a41f942340 Mon Sep 17 00:00:00 2001
From: Colin Guthrie <colin@mageia.org>
Date: Wed, 30 Nov 2011 22:21:24 +0000
Subject: [PATCH] Fix Unicode keytable.
This patch was originally from Mandriva: dracut-013-fix_unicode_keytable.patch
---
modules.d/10i18n/README | 2 +
modules.d/10i18n/module-setup.sh | 49 +++++++++++++++++++++++--------------
2 files changed, 32 insertions(+), 19 deletions(-)
diff --git a/modules.d/10i18n/README b/modules.d/10i18n/README
index 0507a47..89339aa 100644
--- a/modules.d/10i18n/README
+++ b/modules.d/10i18n/README
@@ -47,6 +47,8 @@ The following variables are used by i18n install script and at initramfs
runtime:
KEYMAP - keyboard translation table loaded by loadkeys
+ KEYTABLE - base name for keyboard translation table; if UNICODE is
+ true, Unicode version will be loaded. Overrides KEYMAP.
EXT_KEYMAPS - list of extra keymaps to bo loaded (sep. by space)
UNICODE - boolean, indicating UTF-8 mode
FONT - console font
diff --git a/modules.d/10i18n/module-setup.sh b/modules.d/10i18n/module-setup.sh
index 6248607..8342fb4 100755
--- a/modules.d/10i18n/module-setup.sh
+++ b/modules.d/10i18n/module-setup.sh
@@ -110,8 +110,38 @@ install() {
[ -f $I18N_CONF ] && . $I18N_CONF
[ -f $VCONFIG_CONF ] && . $VCONFIG_CONF
+ shopt -q -s nocasematch
+ if [[ ${UNICODE} ]]
+ then
+ if [[ ${UNICODE} = YES || ${UNICODE} = 1 ]]
+ then
+ UNICODE=1
+ elif [[ ${UNICODE} = NO || ${UNICODE} = 0 ]]
+ then
+ UNICODE=0
+ else
+ UNICODE=''
+ fi
+ fi
+ if [[ ! ${UNICODE} && ${LANG} =~ .*\.UTF-?8 ]]
+ then
+ UNICODE=1
+ fi
+ shopt -q -u nocasematch
+
# Gentoo user may have KEYMAP set to something like "-u pl2",
KEYMAP=${KEYMAP#-* }
+
+ # KEYTABLE is a bit special - it defines base keymap name and UNICODE
+ # determines whether non-UNICODE or UNICODE version is used
+
+ if [[ ${KEYTABLE} ]]; then
+ if [[ ${UNICODE} == 1 ]]; then
+ [[ ${KEYTABLE} =~ .*\.uni.* ]] || KEYTABLE=${KEYTABLE%.map*}.uni
+ fi
+ KEYMAP=${KEYTABLE}
+ fi
+
# I'm not sure of the purpose of UNIKEYMAP and GRP_TOGGLE. They were in
# original redhat-i18n module. Anyway it won't hurt.
EXT_KEYMAPS+=\ ${UNIKEYMAP}\ ${GRP_TOGGLE}
@@ -150,25 +180,6 @@ install() {
inst_simple ${kbddir}/unimaps/${FONT_UNIMAP}.uni
fi
- shopt -q -s nocasematch
- if [[ ${UNICODE} ]]
- then
- if [[ ${UNICODE} = YES || ${UNICODE} = 1 ]]
- then
- UNICODE=1
- elif [[ ${UNICODE} = NO || ${UNICODE} = 0 ]]
- then
- UNICODE=0
- else
- UNICODE=''
- fi
- fi
- if [[ ! ${UNICODE} && ${LANG} =~ .*\.UTF-?8 ]]
- then
- UNICODE=1
- fi
- shopt -q -u nocasematch
-
mksubdirs ${initdir}${I18N_CONF}
mksubdirs ${initdir}${VCONFIG_CONF}
print_vars LC_ALL LANG >> ${initdir}${I18N_CONF}

View File

@ -1,25 +0,0 @@
From 7835e1465fb1f26d514e8312384b99bbf358673f Mon Sep 17 00:00:00 2001
From: Colin Guthrie <colin@mageia.org>
Date: Wed, 30 Nov 2011 22:23:54 +0000
Subject: [PATCH] Handle compressed kmods.
This was orignally from Mandriva patch: dracut-011-plymouth-compressed-kmod.patch
---
modules.d/50plymouth/module-setup.sh | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules.d/50plymouth/module-setup.sh b/modules.d/50plymouth/module-setup.sh
index 338371f..4ea925e 100755
--- a/modules.d/50plymouth/module-setup.sh
+++ b/modules.d/50plymouth/module-setup.sh
@@ -13,8 +13,8 @@ depends() {
installkernel() {
local _modname
# Include KMS capable drm drivers
- for _modname in $(find "$srcmods/kernel/drivers/gpu/drm" "$srcmods/extra" -name '*.ko' 2>/dev/null); do
- grep -q drm_crtc_init $_modname && instmods $_modname
+ for _modname in $(find "$srcmods/kernel/drivers/gpu/drm" "$srcmods/extra" \( -name '*.ko' -o -name '*.ko.gz' \) 2>/dev/null); do
+ zgrep -q drm_crtc_init $_modname && instmods $_modname
done
}

View File

@ -1,24 +0,0 @@
From 482c573d9e87d15632ac16941d03684270854d30 Mon Sep 17 00:00:00 2001
From: Colin Guthrie <colin@mageia.org>
Date: Wed, 30 Nov 2011 21:48:26 +0000
Subject: [PATCH] Only install files from /etc/ld.so.conf.d/ directory
When calling inst_simple() it will ignore anything that
is not a file, so harden the check done before the calling.
---
dracut | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dracut b/dracut
index 8449fc1..56c8df3 100755
--- a/dracut
+++ b/dracut
@@ -712,7 +712,7 @@ done
if [[ $kernel_only != yes ]]; then
# make sure that library links are correct and up to date
for f in /etc/ld.so.conf /etc/ld.so.conf.d/*; do
- [[ -e $f ]] && inst_simple "$f"
+ [[ -f $f ]] && inst_simple "$f"
done
if ! ldconfig -r "$initdir"; then
if [[ $UID = 0 ]]; then

View File

@ -1,36 +0,0 @@
From 5fae9d9a207a80a8336c37399b48a2c0cec081f1 Mon Sep 17 00:00:00 2001
From: Anssi Hannula <anssi@mageia.org>
Date: Sat, 3 Dec 2011 11:25:45 +0000
Subject: [PATCH] plymouth: Include kms modules even if they are not currently
loaded.
This should fix initial initrd generation during install.
If the modules are not desired to be used, the nokmsboot kernel
command line should disable them.
---
modules.d/50plymouth/module-setup.sh | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/modules.d/50plymouth/module-setup.sh b/modules.d/50plymouth/module-setup.sh
index 4ea925e..df0e8d6 100755
--- a/modules.d/50plymouth/module-setup.sh
+++ b/modules.d/50plymouth/module-setup.sh
@@ -14,7 +14,17 @@ installkernel() {
local _modname
# Include KMS capable drm drivers
for _modname in $(find "$srcmods/kernel/drivers/gpu/drm" "$srcmods/extra" \( -name '*.ko' -o -name '*.ko.gz' \) 2>/dev/null); do
- zgrep -q drm_crtc_init $_modname && instmods $_modname
+ if zgrep -q drm_crtc_init $_modname; then
+ # if the hardware is present, include module even if it is not currently loaded,
+ # as we could e.g. be in the installer; nokmsboot boot parameter will disable
+ # loading of the driver if needed
+ if [[ $hostonly ]] && modinfo -F alias $_modname | sed -e 's,\?,\.,g' -e 's,\*,\.\*,g' \
+ | grep -qxf - /sys/bus/pci/devices/*/modalias; then
+ hostonly='' instmods $_modname
+ continue
+ fi
+ instmods $_modname
+ fi
done
}

View File

@ -1,24 +0,0 @@
From fa20c1852567f0cad2247fc315c450f51a1c03ee Mon Sep 17 00:00:00 2001
From: Colin Guthrie <colin@mageia.org>
Date: Fri, 16 Dec 2011 23:11:39 +0000
Subject: [PATCH] kernel-modules: Find (and ulitmately dereference) any
symlinks in modprobe.d dir.
Also only do the top level of files (ignore any subdirs and files within)
---
modules.d/90kernel-modules/module-setup.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh
index 8d2ab91..257b3bc 100755
--- a/modules.d/90kernel-modules/module-setup.sh
+++ b/modules.d/90kernel-modules/module-setup.sh
@@ -70,7 +70,7 @@ installkernel() {
install() {
local _f
[ -f /etc/modprobe.conf ] && dracut_install /etc/modprobe.conf
- for i in $(find /etc/modprobe.d/ -type f -name '*.conf'); do
+ for i in $(find -L /etc/modprobe.d/ -maxdepth 1 -type f -name '*.conf'); do
inst_simple "$i"
done
inst_hook cmdline 01 "$moddir/parse-kernel.sh"

View File

@ -1,27 +0,0 @@
From 5d55ceb75ca5a8d04f0a218aa14b6722af2e52ad Mon Sep 17 00:00:00 2001
From: Colin Guthrie <colin@mageia.org>
Date: Mon, 26 Dec 2011 23:03:34 +0000
Subject: [PATCH] btrfs: Ensure crc32c module is installed.
As outlined here:
https://bugs.mageia.org/show_bug.cgi?id=3214
and:
https://bugs.launchpad.net/ubuntu/+source/linux-linaro-omap/+bug/715835
the btrfs module needs a CRC implementation.
---
modules.d/90btrfs/module-setup.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/modules.d/90btrfs/module-setup.sh b/modules.d/90btrfs/module-setup.sh
index f89713f..d4abbaf 100755
--- a/modules.d/90btrfs/module-setup.sh
+++ b/modules.d/90btrfs/module-setup.sh
@@ -29,7 +29,7 @@ depends() {
}
installkernel() {
- instmods btrfs
+ instmods btrfs crc32c
}
install() {

View File

@ -1,53 +0,0 @@
From f65b874bda9f8b12d41c1f07826f584a8f5dcf6d Mon Sep 17 00:00:00 2001
From: Colin Guthrie <colin@mageia.org>
Date: Sat, 31 Dec 2011 13:30:58 +0000
Subject: [PATCH] resume: Fix failure when invalid device passed via 'resume='
This commit allows the waiting for a device to be cancelled.
When the resume partition does not exist, it becomes quite hard
to work out what to do (you have to either create the
/dev/resume symlink manually, or remove the 'finished' job
that is waiting for it). Additionally dracut incorrectly
displays a message about not being able to find the root
device, which is bogus and misleading.
This commit should just bail on the whole resume thing
if the device cannot be found and proceed with a normal boot.
---
modules.d/95resume/resume-genrules.sh | 3 +++
modules.d/99base/dracut-lib.sh | 8 ++++++++
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/modules.d/95resume/resume-genrules.sh b/modules.d/95resume/resume-genrules.sh
index 16df877..ee4eacb 100755
--- a/modules.d/95resume/resume-genrules.sh
+++ b/modules.d/95resume/resume-genrules.sh
@@ -35,6 +35,9 @@ if [ -n "$resume" ]; then
printf '[ -e "%s" ] && { ln -s "%s" /dev/resume; rm "$job"; }\n' \
"$resume" "$resume" >> $hookdir/initqueue/settled/resume.sh
+ printf 'warn "Cancelling resume operation. Device not found."; cancel_wait_for_dev /dev/resume; rm "$job" "%s/initqueue/settled/resume.sh";' \
+ "$hookdir" >> $hookdir/initqueue/timeout/resume.sh
+
wait_for_dev "/dev/resume"
elif ! getarg noresume; then
diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh
index 9eae4d9..b4fb435 100755
--- a/modules.d/99base/dracut-lib.sh
+++ b/modules.d/99base/dracut-lib.sh
@@ -717,6 +717,14 @@ wait_for_dev()
} >> "$hookdir/emergency/80-${_name}.sh"
}
+cancel_wait_for_dev()
+{
+ local _name
+ _name="$(str_replace "$1" '/' '\\x2f')"
+ rm -f "$hookdir/initqueue/finished/devexists-${_name}.sh"
+ rm -f "$hookdir/emergency/80-${_name}.sh"
+}
+
killproc() {
local _exe="$(command -v $1)"
local _sig=$2

View File

@ -1,37 +0,0 @@
From 09ee7234b60354a446070b2d4f0df480e3684e6a Mon Sep 17 00:00:00 2001
From: Colin Guthrie <colin@mageia.org>
Date: Sun, 8 Jan 2012 21:32:05 +0000
Subject: [PATCH] dmsquash: Ensure the 'loop' kernel module is included and
loaded.
---
modules.d/90dmsquash-live/module-setup.sh | 2 +-
modules.d/90dmsquash-live/parse-dmsquash-live.sh | 2 ++
2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/modules.d/90dmsquash-live/module-setup.sh b/modules.d/90dmsquash-live/module-setup.sh
index de1eed6..2a7988a 100755
--- a/modules.d/90dmsquash-live/module-setup.sh
+++ b/modules.d/90dmsquash-live/module-setup.sh
@@ -16,7 +16,7 @@ depends() {
}
installkernel() {
- instmods squashfs
+ instmods squashfs loop
}
install() {
diff --git a/modules.d/90dmsquash-live/parse-dmsquash-live.sh b/modules.d/90dmsquash-live/parse-dmsquash-live.sh
index a733144..920647e 100755
--- a/modules.d/90dmsquash-live/parse-dmsquash-live.sh
+++ b/modules.d/90dmsquash-live/parse-dmsquash-live.sh
@@ -17,6 +17,8 @@ fi
[ "${liveroot%%:*}" = "live" ] || return
+modprobe -q loop
+
case "$liveroot" in
live:LABEL=*|LABEL=*) \
root="${root#live:}"

View File

@ -1,42 +0,0 @@
From 54f1a77fb678c254eb460844442c2323f2ca9cfc Mon Sep 17 00:00:00 2001
From: Colin Guthrie <colin@mageia.org>
Date: Sat, 31 Dec 2011 13:35:59 +0000
Subject: [PATCH] init: Fix bogus message about invalid root device.
When the initqueue cannot be processed, it might be about an invalid
root device (in which case a separate message produced via
wait_for_dev() should be displayed anyway), but it could also
be for any other reason (e.g. /dev/resume not existing).
Therefore, it is best to use a more generic error message.
Also a minor tab->space conversion in the near vacinity of
the real change.
---
modules.d/99base/init | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules.d/99base/init b/modules.d/99base/init
index fc00e4f..1e54449 100755
--- a/modules.d/99base/init
+++ b/modules.d/99base/init
@@ -259,16 +259,16 @@ while :; do
fi
if [ $main_loop -gt $(($RDRETRY/2)) ]; then
- for job in $hookdir/initqueue/timeout/*.sh; do
+ for job in $hookdir/initqueue/timeout/*.sh; do
[ -e "$job" ] || break
job=$job . $job
main_loop=0
- done
+ done
fi
main_loop=$(($main_loop+1))
[ $main_loop -gt $RDRETRY ] \
- && { flock -s 9 ; emergency_shell "No root device \"$root\" found"; } 9>/.console_lock
+ && { flock -s 9 ; emergency_shell "Unable to process initqueue"; } 9>/.console_lock
done
unset job
unset queuetriggered

View File

@ -1,57 +0,0 @@
From 62073c30484f3fc4b657d6939bec9ac5a4ecf8c5 Mon Sep 17 00:00:00 2001
From: Colin Guthrie <colin@mageia.org>
Date: Sat, 17 Dec 2011 00:35:08 +0000
Subject: [PATCH] udev: Attempt to install any programs used by udev rules.
---
dracut-functions | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/dracut-functions b/dracut-functions
index d95df14..8944430 100755
--- a/dracut-functions
+++ b/dracut-functions
@@ -516,6 +516,27 @@ inst_symlink() {
fi
}
+# attempt to install any programs specified in a udev rule
+inst_rule_programs() {
+ local _prog _bin
+
+ if grep -qE 'PROGRAM==?"[^ "]+' "$1"; then
+ for _prog in $(grep -E 'PROGRAM==?"[^ "]+' "$1" | sed -r 's/.*PROGRAM==?"([^ "]+).*/\1/'); do
+ if [ -x /lib/udev/$_prog ]; then
+ _bin=/lib/udev/$_prog
+ else
+ _bin=$(find_binary "$_prog") || {
+ dinfo "Skipping program $_prog using in udev rule $(basename $1) as it cannot be found"
+ continue;
+ }
+ fi
+
+ #dinfo "Installing $_bin due to it's use in the udev rule $(basename $1)"
+ dracut_install "$_bin"
+ done
+ fi
+}
+
# udev rules always get installed in the same place, so
# create a function to install them to make life simpler.
inst_rules() {
@@ -529,6 +550,7 @@ inst_rules() {
if [[ -f $r/$_rule ]]; then
_found="$r/$_rule"
inst_simple "$_found"
+ inst_rule_programs "$_found"
fi
done
fi
@@ -536,6 +558,7 @@ inst_rules() {
if [[ -f ${r}$_rule ]]; then
_found="${r}$_rule"
inst_simple "$_found" "$_target/${_found##*/}"
+ inst_rule_programs "$_found"
fi
done
[[ $_found ]] || dinfo "Skipping udev rule: $_rule"

View File

@ -1,29 +0,0 @@
From 345f9fa77e8a6e86bb08f66e46fe0396024660ea Mon Sep 17 00:00:00 2001
From: Duane Griffin <duaneg@dghda.com>
Date: Fri, 13 Jan 2012 10:23:45 +0100
Subject: [PATCH] 98usrmount/mount-usr.sh: Don't pass mount options to fsck
---
modules.d/98usrmount/mount-usr.sh | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules.d/98usrmount/mount-usr.sh b/modules.d/98usrmount/mount-usr.sh
index a61f935..fc205d5 100755
--- a/modules.d/98usrmount/mount-usr.sh
+++ b/modules.d/98usrmount/mount-usr.sh
@@ -19,7 +19,7 @@ mount_usr()
if [ "x$_usr_found" != "x" ]; then
# we have to mount /usr
- fsck_single "$_dev" "$_fs" "$_opts"
+ fsck_single "$_dev" "$_fs"
_ret=$?
echo $_ret >/run/initramfs/usr-fsck
if [ $_ret -ne 255 ]; then
@@ -29,4 +29,4 @@ mount_usr()
fi
}
-mount_usr
\ No newline at end of file
+mount_usr

View File

@ -1,31 +0,0 @@
From cf5229190dfb711f6380afe50917559477711d83 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Fri, 13 Jan 2012 11:20:05 +0100
Subject: [PATCH] TEST-10-RAID: fixed TESTDIR handling
---
test/TEST-10-RAID/test.sh | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/test/TEST-10-RAID/test.sh b/test/TEST-10-RAID/test.sh
index 90758d8..5ac0bc5 100755
--- a/test/TEST-10-RAID/test.sh
+++ b/test/TEST-10-RAID/test.sh
@@ -5,8 +5,8 @@ KVERSION=${KVERSION-$(uname -r)}
# Uncomment this to debug failures
#DEBUGFAIL="rd.shell"
-DISKIMAGE=$TESTDIR/TEST-10-RAID-root.img
test_run() {
+ DISKIMAGE=$TESTDIR/TEST-10-RAID-root.img
$testdir/run-qemu \
-hda $DISKIMAGE \
-m 256M -nographic \
@@ -17,6 +17,7 @@ test_run() {
}
test_setup() {
+ DISKIMAGE=$TESTDIR/TEST-10-RAID-root.img
# Create the blank file to use as a root filesystem
rm -f $DISKIMAGE
dd if=/dev/null of=$DISKIMAGE bs=1M seek=40

View File

@ -1,115 +0,0 @@
From cd7ff122a4cea4ba6d03d366293cc44e9550a54f Mon Sep 17 00:00:00 2001
From: Cong Wang <xiyou.wangcong@gmail.com>
Date: Tue, 20 Dec 2011 14:09:56 +0800
Subject: [PATCH] Allow to add mount points even not in hostonly mode
Don't force --mount only working in hostonly mode, let users decide.
With this patch, people can still combine -H --mount '...' if they
want to use it in hostonly mode.
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
---
dracut | 77 +++++++++++++++++++++++++++++++--------------------------------
1 files changed, 38 insertions(+), 39 deletions(-)
diff --git a/dracut b/dracut
index 56c8df3..04dc8ec 100755
--- a/dracut
+++ b/dracut
@@ -525,40 +525,25 @@ trap 'exit 1;' SIGINT
# Need to be able to have non-root users read stuff (rpcbind etc)
chmod 755 "$initdir"
+for line in "${fstab_lines[@]}"; do
+ set -- $line
+ #dev mp fs fsopts
+ dev="$(get_maj_min $1)"
+ push host_devs "${dev:-$1}"
+ push host_fs_types "$dev|$3"
+done
+
+for f in $add_fstab; do
+ [ -e $f ] || continue
+ while read dev rest; do
+ push host_devs $dev
+ done < $f
+done
+
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 "$1|$ID_FS_TYPE"
- return 1
- fi
- if fstype=$(find_dev_fstype $1); then
- echo "$1|$fstype"
- return 1
- fi
- return 1
- )
-
- for line in "${fstab_lines[@]}"; do
- set -- $line
- #dev mp fs fsopts
- dev="$(get_maj_min $1)"
- push host_devs "${dev:-$1}"
- push host_fs_types "$dev|$3"
- done
-
- for f in $add_fstab; do
- [ -e $f ] || continue
- while read dev rest; do
- push host_devs $dev
- done < $f
- done
-
push host_mp \
"/" \
"/etc" \
@@ -573,17 +558,31 @@ if [[ $hostonly ]]; then
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
- if ! strstr " ${host_fs_types[*]} " " $fstype ";then
- push host_fs_types "$fstype"
- fi
- done
- done
fi
+_get_fs_type() (
+ [[ $1 ]] || return
+ if [[ -b /dev/block/$1 ]] && get_fs_env /dev/block/$1; then
+ echo "$1|$ID_FS_TYPE"
+ return 1
+ fi
+ if fstype=$(find_dev_fstype $1); then
+ echo "$1|$fstype"
+ return 1
+ fi
+ return 1
+)
+
+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
+ if ! strstr " ${host_fs_types[*]} " " $fstype ";then
+ push host_fs_types "$fstype"
+ fi
+ done
+done
+
export initdir dracutbasedir dracutmodules drivers \
fw_dir drivers_dir debug no_kernel kernel_only \
add_drivers mdadmconf lvmconf filesystems \

View File

@ -1,299 +0,0 @@
From 1b7fd0fa3eded954ed5baad7aee49507a607275b Mon Sep 17 00:00:00 2001
From: Cong Wang <xiyou.wangcong@gmail.com>
Date: Tue, 20 Dec 2011 14:09:57 +0800
Subject: [PATCH] Check module dependencies of mount points
Like -H, we need to poll every module to check if it is needed
to mount a specific device in '--mount'.
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
---
dracut | 5 ++-
dracut-functions | 68 +++++++++++++++++++++++++++++-
modules.d/00bootchart/module-setup.sh | 1 +
modules.d/10i18n/module-setup.sh | 1 +
modules.d/10rpmversion/module-setup.sh | 1 +
modules.d/50plymouth/module-setup.sh | 1 +
modules.d/90btrfs/module-setup.sh | 2 +-
modules.d/90crypt/module-setup.sh | 2 +-
modules.d/90dmraid/module-setup.sh | 2 +-
modules.d/90lvm/module-setup.sh | 2 +-
modules.d/90mdraid/module-setup.sh | 2 +-
modules.d/95fcoe/module-setup.sh | 2 +-
modules.d/95nfs/module-setup.sh | 2 +-
modules.d/97biosdevname/module-setup.sh | 1 +
modules.d/98usrmount/module-setup.sh | 1 +
15 files changed, 82 insertions(+), 11 deletions(-)
diff --git a/dracut b/dracut
index 04dc8ec..c3584c0 100755
--- a/dracut
+++ b/dracut
@@ -633,9 +633,12 @@ else
done
fi
+mods_to_load=""
# check all our modules to see if they should be sourced.
# This builds a list of modules that we will install next.
-check_module_dir
+for_each_module_dir check_module
+for_each_module_dir check_mount
+
modules_loaded=" "
# source our modules.
for moddir in "$dracutbasedir/modules.d"/[0-9][0-9]*; do
diff --git a/dracut-functions b/dracut-functions
index 8944430..2f9e713 100755
--- a/dracut-functions
+++ b/dracut-functions
@@ -783,6 +783,67 @@ module_installkernel() {
fi
}
+module_check_mount() {
+ local _moddir=$(echo ${dracutbasedir}/modules.d/??${1})
+ local _ret
+ mount_needs=1
+ [[ -d $_moddir ]] || return 1
+ if [[ ! -f $_moddir/module-setup.sh ]]; then
+ # if we do not have a check script, we are unconditionally included
+ [[ -x $_moddir/check ]] || return 0
+ mount_needs=1 $_moddir/check 0
+ _ret=$?
+ else
+ unset check depends install installkernel
+ . $_moddir/module-setup.sh
+ is_func check || return 1
+ check 0
+ _ret=$?
+ unset check depends install installkernel
+ fi
+ unset mount_needs
+ return $_ret
+}
+
+check_mount() {
+ local _mod=$1
+ local _moddir=$(echo ${dracutbasedir}/modules.d/??${1})
+ local _ret
+ local _moddep
+ # If we are already scheduled to be loaded, no need to check again.
+ strstr " $mods_to_load " " $_mod " && return 0
+ strstr " $mods_checked_as_dep " " $_mod " && return 1
+
+ # This should never happen, but...
+ [[ -d $_moddir ]] || return 1
+
+ [[ $2 ]] || mods_checked_as_dep+=" $_mod "
+
+ strstr " $omit_dracutmodules " " $_mod " && return 1
+
+ if [ "${#host_fs_types[*]}" -gt 0 ]; then
+ module_check_mount $_mod || return 1
+ else
+ # skip this module
+ return 1
+ fi
+
+ for _moddep in $(module_depends $_mod); do
+ # handle deps as if they were manually added
+ strstr " $add_dracutmodules " " $_moddep " || \
+ add_dracutmodules+=" $_moddep "
+ strstr " $force_add_dracutmodules " " $_moddep " || \
+ force_add_dracutmodules+=" $_moddep "
+ # if a module we depend on fail, fail also
+ check_module $_moddep || return 1
+ done
+
+ strstr " $mods_to_load " " $_mod " || \
+ mods_to_load+=" $_mod "
+
+ return 0
+}
+
check_module() {
local _mod=$1
local _moddir=$(echo ${dracutbasedir}/modules.d/??${1})
@@ -834,14 +895,15 @@ check_module() {
return 0
}
-check_module_dir() {
+for_each_module_dir() {
local _modcheck
local _mod
local _moddir
- mods_to_load=""
+ local _func
+ _func=$1
for _moddir in "$dracutbasedir/modules.d"/[0-9][0-9]*; do
_mod=${_moddir##*/}; _mod=${_mod#[0-9][0-9]}
- check_module $_mod 1
+ $_func $_mod 1
done
# Report any missing dracut modules, the user has specified
diff --git a/modules.d/00bootchart/module-setup.sh b/modules.d/00bootchart/module-setup.sh
index bf71b14..17dd137 100755
--- a/modules.d/00bootchart/module-setup.sh
+++ b/modules.d/00bootchart/module-setup.sh
@@ -3,6 +3,7 @@
# ex: ts=8 sw=4 sts=4 et filetype=sh
check() {
+ [[ "$mount_needs" ]] && return 1
[ -x /sbin/bootchartd ] || return 1
return 255
}
diff --git a/modules.d/10i18n/module-setup.sh b/modules.d/10i18n/module-setup.sh
index 8342fb4..37c7c09 100755
--- a/modules.d/10i18n/module-setup.sh
+++ b/modules.d/10i18n/module-setup.sh
@@ -3,6 +3,7 @@
# ex: ts=8 sw=4 sts=4 et filetype=sh
check() {
+ [[ "$mount_needs" ]] && return 1
return 0
}
diff --git a/modules.d/10rpmversion/module-setup.sh b/modules.d/10rpmversion/module-setup.sh
index 676775f..4c021ad 100755
--- a/modules.d/10rpmversion/module-setup.sh
+++ b/modules.d/10rpmversion/module-setup.sh
@@ -3,6 +3,7 @@
# ex: ts=8 sw=4 sts=4 et filetype=sh
check() {
+ [[ "$mount_needs" ]] && return 1
[ -f /etc/redhat-release ]
}
diff --git a/modules.d/50plymouth/module-setup.sh b/modules.d/50plymouth/module-setup.sh
index df0e8d6..eedc842 100755
--- a/modules.d/50plymouth/module-setup.sh
+++ b/modules.d/50plymouth/module-setup.sh
@@ -3,6 +3,7 @@
# ex: ts=8 sw=4 sts=4 et filetype=sh
check() {
+ [[ "$mount_needs" ]] && return 1
[[ -x /sbin/plymouthd && -x /bin/plymouth && -x /usr/sbin/plymouth-set-default-theme ]]
}
diff --git a/modules.d/90btrfs/module-setup.sh b/modules.d/90btrfs/module-setup.sh
index d4abbaf..a141dda 100755
--- a/modules.d/90btrfs/module-setup.sh
+++ b/modules.d/90btrfs/module-setup.sh
@@ -11,7 +11,7 @@ check() {
. $dracutfunctions
[[ $debug ]] && set -x
- [[ $hostonly ]] && {
+ [[ $hostonly ]] || [[ $mount_needs ]] && {
local _found
for fs in $host_fs_types; do
[[ "$fs" = "|btrfs" ]] && _found="1"
diff --git a/modules.d/90crypt/module-setup.sh b/modules.d/90crypt/module-setup.sh
index 42c6b48..a92c187 100755
--- a/modules.d/90crypt/module-setup.sh
+++ b/modules.d/90crypt/module-setup.sh
@@ -23,7 +23,7 @@ check() {
echo " rd.luks.uuid=${ID_FS_UUID} " >> "${initdir}/etc/cmdline.d/90crypt.conf"
}
- [[ $hostonly ]] && {
+ [[ $hostonly ]] || [[ $mount_needs ]] && {
[[ -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
diff --git a/modules.d/90dmraid/module-setup.sh b/modules.d/90dmraid/module-setup.sh
index 9de6c63..19f2ce6 100755
--- a/modules.d/90dmraid/module-setup.sh
+++ b/modules.d/90dmraid/module-setup.sh
@@ -38,7 +38,7 @@ check() {
echo " rd.dm.uuid=${DM_NAME} " >> "${initdir}/etc/cmdline.d/90dmraid.conf"
}
- [[ $hostonly ]] && {
+ [[ $hostonly ]] || [[ $mount_needs ]] && {
[[ -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
diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh
index 87751cb..c910f13 100755
--- a/modules.d/90lvm/module-setup.sh
+++ b/modules.d/90lvm/module-setup.sh
@@ -23,7 +23,7 @@ check() {
echo " rd.lvm.lv=${DM_LV_NAME} " >> "${initdir}/etc/cmdline.d/90lvm.conf"
}
- [[ $hostonly ]] && {
+ [[ $hostonly ]] || [[ $mount_needs ]] && {
[[ -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
diff --git a/modules.d/90mdraid/module-setup.sh b/modules.d/90mdraid/module-setup.sh
index 05e0127..8c3e2bb 100755
--- a/modules.d/90mdraid/module-setup.sh
+++ b/modules.d/90mdraid/module-setup.sh
@@ -38,7 +38,7 @@ check() {
echo " rd.md.uuid=${MD_UUID} " >> "${initdir}/etc/cmdline.d/90mdraid.conf"
}
- [[ $hostonly ]] && {
+ [[ $hostonly ]] || [[ $mount_needs ]] && {
[[ -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
diff --git a/modules.d/95fcoe/module-setup.sh b/modules.d/95fcoe/module-setup.sh
index b4cee97..e66798b 100755
--- a/modules.d/95fcoe/module-setup.sh
+++ b/modules.d/95fcoe/module-setup.sh
@@ -6,7 +6,7 @@ check() {
# FIXME
# If hostonly was requested, fail the check until we have some way of
# knowing we are booting from FCoE
- [[ $hostonly ]] && return 1
+ [[ $hostonly ]] || [[ $mount_needs ]] && return 1
return 0
}
diff --git a/modules.d/95nfs/module-setup.sh b/modules.d/95nfs/module-setup.sh
index bb3b793..641d917 100755
--- a/modules.d/95nfs/module-setup.sh
+++ b/modules.d/95nfs/module-setup.sh
@@ -7,7 +7,7 @@ check() {
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 ]] && {
+ [[ $hostonly ]] || [[ $mount_needs ]] && {
for fs in ${host_fs_types[@]}; do
strstr "$fs" "|nfs" && return 0
strstr "$fs" "|nfs3" && return 0
diff --git a/modules.d/97biosdevname/module-setup.sh b/modules.d/97biosdevname/module-setup.sh
index 834831f..4d492a9 100755
--- a/modules.d/97biosdevname/module-setup.sh
+++ b/modules.d/97biosdevname/module-setup.sh
@@ -3,6 +3,7 @@
# ex: ts=8 sw=4 sts=4 et filetype=sh
check() {
+ [[ "$mount_needs" ]] && return 1
type -P biosdevname >/dev/null || return 1
return 0
}
diff --git a/modules.d/98usrmount/module-setup.sh b/modules.d/98usrmount/module-setup.sh
index 8f7be10..5844383 100755
--- a/modules.d/98usrmount/module-setup.sh
+++ b/modules.d/98usrmount/module-setup.sh
@@ -3,6 +3,7 @@
# ex: ts=8 sw=4 sts=4 et filetype=sh
check() {
+ [[ $mount_needs ]] && return 1
return 0
}

View File

@ -1,25 +0,0 @@
From 426b68b20ada687327d464c3822c8e84e43e5672 Mon Sep 17 00:00:00 2001
From: Cong Wang <xiyou.wangcong@gmail.com>
Date: Tue, 20 Dec 2011 14:09:58 +0800
Subject: [PATCH] Fix get_maj_min() to follow symlink
Otherwise get_maj_min /dev/mapper/vg_cr0-lv_home will return 0:0.
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
---
dracut-functions | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dracut-functions b/dracut-functions
index 2f9e713..a77a002 100755
--- a/dracut-functions
+++ b/dracut-functions
@@ -180,7 +180,7 @@ get_fs_uuid() (
get_maj_min() {
local _dev
- _dev=$(stat -c '$((0x%T)):$((0x%t))' "$1" 2>/dev/null)
+ _dev=$(stat -L -c '$((0x%T)):$((0x%t))' "$1" 2>/dev/null)
_dev=$(eval "echo $_dev")
echo $_dev
}

View File

@ -1,80 +0,0 @@
From d0096de764e73f372f9ca93063f0270fc6b02c20 Mon Sep 17 00:00:00 2001
From: Cong Wang <xiyou.wangcong@gmail.com>
Date: Tue, 20 Dec 2011 14:09:59 +0800
Subject: [PATCH] Pass device name instead of major:minor in
for_each_host_dev_fs()
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
---
dracut | 11 +++++------
dracut-functions | 11 ++++++-----
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/dracut b/dracut
index c3584c0..8c24e7b 100755
--- a/dracut
+++ b/dracut
@@ -528,9 +528,8 @@ chmod 755 "$initdir"
for line in "${fstab_lines[@]}"; do
set -- $line
#dev mp fs fsopts
- dev="$(get_maj_min $1)"
- push host_devs "${dev:-$1}"
- push host_fs_types "$dev|$3"
+ push host_devs "$1"
+ push host_fs_types "$1|$3"
done
for f in $add_fstab; do
@@ -556,13 +555,13 @@ if [[ $hostonly ]]; then
for mp in "${host_mp[@]}"; do
mountpoint "$mp" >/dev/null 2>&1 || continue
- push host_devs $(find_block_device "$mp")
+ push host_devs $(readlink -f "/dev/block/$(find_block_device "$mp")")
done
fi
_get_fs_type() (
[[ $1 ]] || return
- if [[ -b /dev/block/$1 ]] && get_fs_env /dev/block/$1; then
+ if [[ -b $1 ]] && get_fs_env $1; then
echo "$1|$ID_FS_TYPE"
return 1
fi
@@ -576,7 +575,7 @@ _get_fs_type() (
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
+ $(check_block_and_slaves _get_fs_type $(get_maj_min $dev)); do
if ! strstr " ${host_fs_types[*]} " " $fstype ";then
push host_fs_types "$fstype"
fi
diff --git a/dracut-functions b/dracut-functions
index a77a002..a9b15cc 100755
--- a/dracut-functions
+++ b/dracut-functions
@@ -247,16 +247,17 @@ find_root_block_device() { find_block_device /; }
for_each_host_dev_fs()
{
local _func="$1"
+ local _dev
+ local _fs
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
+ _dev="$1"
+ [[ -b "$_dev" ]] || continue
+ _fs="$2"
+ $_func $_dev $_fs
done
}

View File

@ -1,27 +0,0 @@
From eead77320496939196428eb33b528533379f2bf0 Mon Sep 17 00:00:00 2001
From: Cong Wang <xiyou.wangcong@gmail.com>
Date: Tue, 20 Dec 2011 14:10:00 +0800
Subject: [PATCH] nfs: fix regex patterns in check()
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
---
modules.d/95nfs/module-setup.sh | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules.d/95nfs/module-setup.sh b/modules.d/95nfs/module-setup.sh
index 641d917..6778f28 100755
--- a/modules.d/95nfs/module-setup.sh
+++ b/modules.d/95nfs/module-setup.sh
@@ -9,9 +9,9 @@ check() {
[[ $hostonly ]] || [[ $mount_needs ]] && {
for fs in ${host_fs_types[@]}; do
- strstr "$fs" "|nfs" && return 0
- strstr "$fs" "|nfs3" && return 0
- strstr "$fs" "|nfs4" && return 0
+ strstr "$fs" "\|nfs" && return 0
+ strstr "$fs" "\|nfs3" && return 0
+ strstr "$fs" "\|nfs4" && return 0
done
return 255
}

View File

@ -1,38 +0,0 @@
From a72cae66dcceba812eedeb6c4e15961bd02af8a3 Mon Sep 17 00:00:00 2001
From: Cong Wang <xiyou.wangcong@gmail.com>
Date: Tue, 20 Dec 2011 14:10:01 +0800
Subject: [PATCH] lvm: pass the correct rd.lvm.lv parameter
rd.lvm.lv accepts ${DM_VG_NAME}/${DM_LV_NAME}, not ${DM_LV_NAME}.
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
---
modules.d/90lvm/module-setup.sh | 15 +++++----------
1 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh
index c910f13..01bfa8a 100755
--- a/modules.d/90lvm/module-setup.sh
+++ b/modules.d/90lvm/module-setup.sh
@@ -11,16 +11,11 @@ check() {
[[ $debug ]] && set -x
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"
+ unset DM_VG_NAME
+ unset DM_LV_NAME
+ eval $(udevadm info --query=property --name=$1|egrep '(DM_VG_NAME|DM_LV_NAME)=')
+ [[ ${DM_VG_NAME} ]] && [[ ${DM_LV_NAME} ]] || return
+ echo " rd.lvm.lv=${DM_VG_NAME}/${DM_LV_NAME} " >> "${initdir}/etc/cmdline.d/90lvm.conf"
}
[[ $hostonly ]] || [[ $mount_needs ]] && {

View File

@ -1,28 +0,0 @@
From ce32e32f2a8288de15968c22f57fff306fa81753 Mon Sep 17 00:00:00 2001
From: "Brian C. Lane" <bcl@redhat.com>
Date: Tue, 20 Dec 2011 14:22:33 -0800
Subject: [PATCH] Create a symlink for the live image's base loop device
It is useful to know that loop device that the live image's / is mounted
from. Make a /run/initramfs/live-baseloop symlink that points to it.
Edited-By: harald@redhat.com: changed /dev/live-baseloop
to /run/initramfs/live-baseloop
---
modules.d/90dmsquash-live/dmsquash-live-root | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/modules.d/90dmsquash-live/dmsquash-live-root b/modules.d/90dmsquash-live/dmsquash-live-root
index b704139..cb104e4 100755
--- a/modules.d/90dmsquash-live/dmsquash-live-root
+++ b/modules.d/90dmsquash-live/dmsquash-live-root
@@ -200,6 +200,9 @@ if [ -n "$ROOTFLAGS" ]; then
ROOTFLAGS="-o $ROOTFLAGS"
fi
+if [ -b "$BASE_LOOPDEV" ]; then
+ ln -s $BASE_LOOPDEV /dev/live-baseloop
+fi
ln -s /dev/mapper/live-rw /dev/root
printf '/bin/mount %s /dev/mapper/live-rw %s\n' "$ROOTFLAGS" "$NEWROOT" > $hookdir/mount/01-$$-live.sh

View File

@ -1,22 +0,0 @@
From 1cc57edaf56f309d6023f6fa5a86821f6dfbf919 Mon Sep 17 00:00:00 2001
From: Will Woods <wwoods@redhat.com>
Date: Wed, 11 Jan 2012 12:48:27 -0500
Subject: [PATCH] interpret 'off' as false in getargbool
Signed-off-by: Will Woods <wwoods@redhat.com>
---
modules.d/99base/dracut-lib.sh | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh
index b4fb435..4897a3d 100755
--- a/modules.d/99base/dracut-lib.sh
+++ b/modules.d/99base/dracut-lib.sh
@@ -124,6 +124,7 @@ getargbool() {
if [ -n "$_b" ]; then
[ $_b = "0" ] && return 1
[ $_b = "no" ] && return 1
+ [ $_b = "off" ] && return 1
fi
return 0
}

View File

@ -1,41 +0,0 @@
From a75c3afe685e563f919a1a87e0a12c996cfae735 Mon Sep 17 00:00:00 2001
From: Will Woods <wwoods@redhat.com>
Date: Wed, 11 Jan 2012 12:48:28 -0500
Subject: [PATCH] minor cleanups in parsing for dmsquash-live and livenet
- use wait_for_dev in livenet
- clarify log message and fix missing newline in dmsquash-live
Signed-off-by: Will Woods <wwoods@redhat.com>
---
modules.d/90dmsquash-live/parse-dmsquash-live.sh | 4 ++--
modules.d/90livenet/parse-livenet.sh | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules.d/90dmsquash-live/parse-dmsquash-live.sh b/modules.d/90dmsquash-live/parse-dmsquash-live.sh
index 920647e..5ccc0d0 100755
--- a/modules.d/90dmsquash-live/parse-dmsquash-live.sh
+++ b/modules.d/90dmsquash-live/parse-dmsquash-live.sh
@@ -43,9 +43,9 @@ case "$liveroot" in
live:/*.[Ii][Mm][Gg]|/*.[Ii][Mm][Gg])
[ -f "${root#live:}" ] && rootok=1 ;;
esac
-info "liveroot was $liveroot, is now $root"
+info "root was $liveroot, is now $root"
# make sure that init doesn't complain
[ -z "$root" ] && root="live"
-wait_for_dev /dev/mapper/live-rw
\ No newline at end of file
+wait_for_dev /dev/mapper/live-rw
diff --git a/modules.d/90livenet/parse-livenet.sh b/modules.d/90livenet/parse-livenet.sh
index 323fd4a..2e6bc4b 100755
--- a/modules.d/90livenet/parse-livenet.sh
+++ b/modules.d/90livenet/parse-livenet.sh
@@ -16,4 +16,4 @@ case "$liveurl" in
rootok=1 ;;
esac
-echo '[ -e /dev/root ]' > $hookdir/initqueue/finished/livenet.sh
+wait_for_dev /dev/root

View File

@ -1,31 +0,0 @@
From a996d703e901c307dd9faabd7731d959f47370a4 Mon Sep 17 00:00:00 2001
From: Dave Young <dyoung@redhat.com>
Date: Thu, 12 Jan 2012 16:00:31 +0800
Subject: [PATCH] fstab-sys: mount it in initramfs instead of newroot if mount
point is not found
fstab-sys now also handles device passed by dracut argument "--mount"
The "--mount" mount point is possible not exist in $NEWROOT. Thus mount it
in initramfs if mount point is not exist in real rootfs
---
modules.d/95fstab-sys/mount-sys.sh | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/modules.d/95fstab-sys/mount-sys.sh b/modules.d/95fstab-sys/mount-sys.sh
index a8fbd50..4de7285 100755
--- a/modules.d/95fstab-sys/mount-sys.sh
+++ b/modules.d/95fstab-sys/mount-sys.sh
@@ -20,7 +20,12 @@ fstab_mount() {
fi
_fs=$(det_fs "$_dev" "$_fs")
info "Mounting $_dev"
- mount -v -t $_fs -o $_opts $_dev $NEWROOT/$_mp 2>&1 | vinfo
+ if [[ -d $NEWROOT/$_mp ]]; then
+ mount -v -t $_fs -o $_opts $_dev $NEWROOT/$_mp 2>&1 | vinfo
+ else
+ mkdir -p "$_mp"
+ mount -v -t $_fs -o $_opts $_dev $_mp 2>&1 | vinfo
+ fi
done < $1
return 0
}

View File

@ -1,23 +0,0 @@
From 0de93fa1dae15839fc8738268942622ffb4a6451 Mon Sep 17 00:00:00 2001
From: Hermann Gausterer <git-dracut-2012@mrq1.org>
Date: Mon, 16 Jan 2012 17:19:12 +0100
Subject: [PATCH] typo fix
Signed-off-by: Hermann Gausterer <git-dracut-2012@mrq1.org>
---
modules.d/95iscsi/parse-iscsiroot.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/modules.d/95iscsi/parse-iscsiroot.sh b/modules.d/95iscsi/parse-iscsiroot.sh
index bc7cc5e..40720e8 100755
--- a/modules.d/95iscsi/parse-iscsiroot.sh
+++ b/modules.d/95iscsi/parse-iscsiroot.sh
@@ -40,7 +40,7 @@ if [ -n "$iscsiroot" ] ; then
[ -z "$netroot" ] && netroot=$root
# @deprecated
- echo "Warning: Argument isciroot is deprecated and might be removed in a future"
+ echo "Warning: Argument iscsiroot is deprecated and might be removed in a future"
echo "release. See 'man dracut.kernel' for more information."
# Accept iscsiroot argument?

View File

@ -1,29 +0,0 @@
From e263867f6bbad00697f06a9380e7b7355882aff3 Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@fedoraproject.org>
Date: Wed, 11 Jan 2012 10:28:12 +0000
Subject: [PATCH] mktemp was long obsoleted by coreutils
commit 2e55bb35640c5c2b3b5604e06232cc679559defa
Author: Peter Robinson <pbrobinson@gmail.com>
Date: Wed Jan 11 10:28:05 2012 +0000
mktemp was long obsoleted by coreutils
dracut.spec | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
---
dracut.spec | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/dracut.spec b/dracut.spec
index 1c50f37..3986894 100644
--- a/dracut.spec
+++ b/dracut.spec
@@ -68,7 +68,6 @@ Requires: filesystem >= 2.1.0
Requires: findutils
Requires: grep
Requires: gzip
-Requires: mktemp >= 1.5-5
Requires: module-init-tools >= 3.7-9
Requires: sed
Requires: udev

View File

@ -1,24 +0,0 @@
From 027dbc9f85f2e55af283d6714b0b1fed478900dd Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Fri, 20 Jan 2012 12:02:15 +0100
Subject: [PATCH] dmsquash-live: really changed /dev/live-baseloop to
/run/initramfs/
Forgot to amend my change to ce32e32f2a8288de15968c22f57fff306fa81753
---
modules.d/90dmsquash-live/dmsquash-live-root | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/modules.d/90dmsquash-live/dmsquash-live-root b/modules.d/90dmsquash-live/dmsquash-live-root
index cb104e4..d9fcc43 100755
--- a/modules.d/90dmsquash-live/dmsquash-live-root
+++ b/modules.d/90dmsquash-live/dmsquash-live-root
@@ -201,7 +201,7 @@ if [ -n "$ROOTFLAGS" ]; then
fi
if [ -b "$BASE_LOOPDEV" ]; then
- ln -s $BASE_LOOPDEV /dev/live-baseloop
+ ln -s $BASE_LOOPDEV /run/initramfs/live-baseloop
fi
ln -s /dev/mapper/live-rw /dev/root
printf '/bin/mount %s /dev/mapper/live-rw %s\n' "$ROOTFLAGS" "$NEWROOT" > $hookdir/mount/01-$$-live.sh

View File

@ -1,42 +0,0 @@
From 2e7b6616814a3706f0c15bc20c7c8303463bcba0 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Fri, 20 Jan 2012 12:06:41 +0100
Subject: [PATCH] 90kernel-modules/module-setup.sh: install modules.order
Also install modules.order and all modules.builtin*
---
modules.d/90kernel-modules/module-setup.sh | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh
index 257b3bc..7888428 100755
--- a/modules.d/90kernel-modules/module-setup.sh
+++ b/modules.d/90kernel-modules/module-setup.sh
@@ -68,7 +68,7 @@ installkernel() {
}
install() {
- local _f
+ local _f i
[ -f /etc/modprobe.conf ] && dracut_install /etc/modprobe.conf
for i in $(find -L /etc/modprobe.d/ -maxdepth 1 -type f -name '*.conf'); do
inst_simple "$i"
@@ -76,13 +76,14 @@ install() {
inst_hook cmdline 01 "$moddir/parse-kernel.sh"
inst_simple "$moddir/insmodpost.sh" /sbin/insmodpost.sh
- local f
-
for _f in modules.builtin.bin modules.builtin; do
- [[ $srcmods/$_f ]] && inst_simple "$srcmods/$_f" "/lib/modules/$kernel/$_f" \
- && break
+ [[ $srcmods/$_f ]] && break
done || {
dfatal "No modules.builtin.bin and modules.builtin found!"
return 1
}
+
+ for _f in modules.builtin.bin modules.builtin modules.order; do
+ [[ $srcmods/$_f ]] && inst_simple "$srcmods/$_f" "/lib/modules/$kernel/$_f"
+ done
}

View File

@ -1,42 +0,0 @@
From acfab3733f406a5b052941ffacc70511e9723106 Mon Sep 17 00:00:00 2001
From: Anton Blanchard <anton@samba.org>
Date: Tue, 27 Dec 2011 09:08:27 +1100
Subject: [PATCH] Handle upper case MAC addresses in ifname option
While the documentation states that ifname MAC addresses must be
lower case, we silently accept upper case ones and fail later on
when udev doesn't rename the device.
Instead of adding sanity checking on the MAC address just convert
it to lower case and remove the requirement completely.
---
dracut.cmdline.7.xml | 1 -
modules.d/40network/parse-ifname.sh | 3 ++-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dracut.cmdline.7.xml b/dracut.cmdline.7.xml
index 8a49056..9357e25 100644
--- a/dracut.cmdline.7.xml
+++ b/dracut.cmdline.7.xml
@@ -464,7 +464,6 @@ This parameter can be specified multiple times.</para>
<term><envar>ifname=</envar><replaceable>&lt;interface&gt;</replaceable>:<replaceable>&lt;MAC&gt;</replaceable></term>
<listitem>
<para>Assign network device name &lt;interface&gt; (ie eth0) to the NIC with MAC &lt;MAC&gt;.
-Note letters in the MAC-address must be lowercase!
<remark>Note: If you use this option you <emphasis remap="B">must</emphasis> specify an ifname= argument for all interfaces used in ip= or fcoe= arguments.</remark>
This parameter can be specified multiple times.</para>
</listitem>
diff --git a/modules.d/40network/parse-ifname.sh b/modules.d/40network/parse-ifname.sh
index 4c3c70e..26e6084 100755
--- a/modules.d/40network/parse-ifname.sh
+++ b/modules.d/40network/parse-ifname.sh
@@ -25,7 +25,8 @@ parse_ifname_opts() {
case $# in
7)
ifname_if=$1
- ifname_mac=$2:$3:$4:$5:$6:$7
+ # udev requires MAC addresses to be lower case
+ ifname_mac=`echo $2:$3:$4:$5:$6:$7 | tr '[:upper:]' '[:lower:]'`
;;
*)
die "Invalid arguments for ifname="

View File

@ -1,27 +0,0 @@
From b3d838e5d0f763beb9bb8b6ed6a28ad00eee9ff2 Mon Sep 17 00:00:00 2001
From: Anton Blanchard <anton@samba.org>
Date: Tue, 27 Dec 2011 09:08:28 +1100
Subject: [PATCH] server-id in ip= is not optional
The documentation suggests that server-id is an optional argument
but ip_to_var fails if it is not specified. Fix the documentation.
---
dracut.cmdline.7.xml | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dracut.cmdline.7.xml b/dracut.cmdline.7.xml
index 9357e25..87fb4ad 100644
--- a/dracut.cmdline.7.xml
+++ b/dracut.cmdline.7.xml
@@ -452,9 +452,9 @@ with a valid DHCP root-path.</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><envar>ip=</envar><replaceable>&lt;client-IP&gt;</replaceable>:<optional>
+ <term><envar>ip=</envar><replaceable>&lt;client-IP&gt;</replaceable>:
<replaceable>&lt;server-id&gt;</replaceable>
- </optional>:<replaceable>&lt;gateway-IP&gt;</replaceable>:<replaceable>&lt;netmask&gt;</replaceable>:<replaceable>&lt;client_hostname&gt;</replaceable>:<replaceable>&lt;interface&gt;</replaceable>:<replaceable>{none|off}</replaceable></term>
+ :<replaceable>&lt;gateway-IP&gt;</replaceable>:<replaceable>&lt;netmask&gt;</replaceable>:<replaceable>&lt;client_hostname&gt;</replaceable>:<replaceable>&lt;interface&gt;</replaceable>:<replaceable>{none|off}</replaceable></term>
<listitem>
<para>explicit network configuration. If you want do define a IPv6 address, put it in brackets (e.g. [2001:DB8::1]).
This parameter can be specified multiple times.</para>

View File

@ -1,38 +0,0 @@
From e7cbf8fd30ec39736b4f19fa2e68eba9776b8a80 Mon Sep 17 00:00:00 2001
From: Anton Blanchard <anton@samba.org>
Date: Tue, 27 Dec 2011 09:08:29 +1100
Subject: [PATCH] ip= server-id should be server-IP
From looking at the code it seems like server-id should really
be named server-IP.
---
dracut.cmdline.7.xml | 2 +-
modules.d/40network/parse-ip-opts.sh | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dracut.cmdline.7.xml b/dracut.cmdline.7.xml
index 87fb4ad..74e617c 100644
--- a/dracut.cmdline.7.xml
+++ b/dracut.cmdline.7.xml
@@ -453,7 +453,7 @@ with a valid DHCP root-path.</para>
</varlistentry>
<varlistentry>
<term><envar>ip=</envar><replaceable>&lt;client-IP&gt;</replaceable>:
- <replaceable>&lt;server-id&gt;</replaceable>
+ <replaceable>&lt;server-IP&gt;</replaceable>
:<replaceable>&lt;gateway-IP&gt;</replaceable>:<replaceable>&lt;netmask&gt;</replaceable>:<replaceable>&lt;client_hostname&gt;</replaceable>:<replaceable>&lt;interface&gt;</replaceable>:<replaceable>{none|off}</replaceable></term>
<listitem>
<para>explicit network configuration. If you want do define a IPv6 address, put it in brackets (e.g. [2001:DB8::1]).
diff --git a/modules.d/40network/parse-ip-opts.sh b/modules.d/40network/parse-ip-opts.sh
index 3e83ee3..77dbaf0 100755
--- a/modules.d/40network/parse-ip-opts.sh
+++ b/modules.d/40network/parse-ip-opts.sh
@@ -7,7 +7,7 @@
#
# ip=<interface>:[dhcp|on|any]
#
-# ip=<client-IP-number>:<server-id>:<gateway-IP-number>:<netmask>:<client-hostname>:<interface>:[dhcp|on|any|none|off]
+# ip=<client-IP-number>:<server-IP-number>:<gateway-IP-number>:<netmask>:<client-hostname>:<interface>:[dhcp|on|any|none|off]
#
# When supplying more than only ip= line, <interface> is mandatory and
# bootdev= must contain the name of the primary interface to use for

View File

@ -1,32 +0,0 @@
From 8e1ffb1859a08da46816cbf9f4676569ba5d49b9 Mon Sep 17 00:00:00 2001
From: Cong Wang <xiyou.wangcong@gmail.com>
Date: Tue, 10 Jan 2012 22:49:03 +0800
Subject: [PATCH] remove extra semicolons in dracut.8.xml
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
---
dracut.8.xml | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dracut.8.xml b/dracut.8.xml
index ba8ab07..221ad2e 100644
--- a/dracut.8.xml
+++ b/dracut.8.xml
@@ -398,7 +398,7 @@ the local host instead of a generic host.
</varlistentry>
<varlistentry>
<term>
- <option>--add_fstab;&nbsp;<replaceable>&lt;filename&gt;</replaceable>&nbsp;</option>
+ <option>--add_fstab&nbsp;<replaceable>&lt;filename&gt;</replaceable>&nbsp;</option>
</term>
<listitem>
<para>Add entries of <replaceable>&lt;filename&gt;</replaceable> to the initramfs /etc/fstab.</para>
@@ -406,7 +406,7 @@ the local host instead of a generic host.
</varlistentry>
<varlistentry>
<term>
- <option>--mount;&nbsp;&quot;<replaceable>&lt;device&gt;</replaceable> <replaceable>&lt;mountpoint&gt;</replaceable> <replaceable>&lt;filesystem type&gt;</replaceable> <replaceable>&lt;filesystem options&gt;</replaceable>&quot;</option>
+ <option>--mount&nbsp;&quot;<replaceable>&lt;device&gt;</replaceable> <replaceable>&lt;mountpoint&gt;</replaceable> <replaceable>&lt;filesystem type&gt;</replaceable> <replaceable>&lt;filesystem options&gt;</replaceable>&quot;</option>
</term>
<listitem>
<para>Add entries of <replaceable>&lt;filename&gt;</replaceable> to the initramfs /etc/fstab.</para>

View File

@ -1,42 +0,0 @@
From 59ee80764e08e8614c610d18b572427f8eefaa86 Mon Sep 17 00:00:00 2001
From: Dave Young <dyoung@redhat.com>
Date: Mon, 26 Dec 2011 14:29:11 +0800
Subject: [PATCH] deal common part of etc passwd in 99base
ssh module will need root user in /etc/passwd, so add root and nobody
to /etc/passwd in 99base instead of nfs module
Signed-off-by: Dave Young <dyoung@redhat.com>
---
modules.d/95nfs/module-setup.sh | 2 --
modules.d/99base/module-setup.sh | 4 ++++
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/modules.d/95nfs/module-setup.sh b/modules.d/95nfs/module-setup.sh
index 6778f28..3ccdafc 100755
--- a/modules.d/95nfs/module-setup.sh
+++ b/modules.d/95nfs/module-setup.sh
@@ -65,8 +65,6 @@ install() {
# Rather than copy the passwd file in, just set a user for rpcbind
# We'll save the state and restart the daemon from the root anyway
- egrep '^root:' "$initdir/etc/passwd" 2>/dev/null || echo 'root:x:0:0::/:/bin/sh' >> "$initdir/etc/passwd"
- egrep '^nobody:' /etc/passwd >> "$initdir/etc/passwd"
egrep '^nfsnobody:' /etc/passwd >> "$initdir/etc/passwd"
egrep '^rpc:' /etc/passwd >> "$initdir/etc/passwd"
egrep '^rpcuser:' /etc/passwd >> "$initdir/etc/passwd"
diff --git a/modules.d/99base/module-setup.sh b/modules.d/99base/module-setup.sh
index 5297a9d..f6c1209 100755
--- a/modules.d/99base/module-setup.sh
+++ b/modules.d/99base/module-setup.sh
@@ -20,6 +20,10 @@ install() {
dracut_install bash
(ln -s bash "${initdir}/bin/sh" || :)
fi
+
+ #add common users in /etc/passwd, it will be used by nfs/ssh currently
+ egrep '^root:' "$initdir/etc/passwd" 2>/dev/null || echo 'root:x:0:0::/:/bin/sh' >> "$initdir/etc/passwd"
+ egrep '^nobody:' /etc/passwd >> "$initdir/etc/passwd"
# install our scripts and hooks
inst "$moddir/init" "/init"
inst "$moddir/initqueue" "/sbin/initqueue"

View File

@ -1,166 +0,0 @@
From 4401925c822e2f7e927bad4c16e4a08ac6a18d9a Mon Sep 17 00:00:00 2001
From: Michal Soltys <soltys@ziu.info>
Date: Mon, 26 Dec 2011 14:29:15 +0800
Subject: [PATCH] Add job control support to emergency shell
Option --ctty will optionally add setsid binary to dracut's image.
During runtime, if rd.ctty is set and is a character device,
emergency shells will be spawned with job control.
in case no ctty was provided, shell was spawned without caring about
/dev/console. Also, the ctty is more opportunistic. If the image was
generated with --ctty, we will fallback to /dev/tty1 if rc.ctty is
invalid or missing. Otherwise we spawn standard shell on /dev/console
[dyoung@redhat.com: Rebased to usrmove branch]
Signed-off-by: Michal Soltys <soltys@ziu.info>
Signed-off-by: Dave Young <dyoung@redhat.com>
---
dracut | 3 ++-
dracut.8.xml | 9 +++++++++
dracut.cmdline.7.xml | 14 ++++++++++++++
modules.d/99base/init | 12 ++++++++++--
modules.d/99base/module-setup.sh | 1 +
modules.d/99shutdown/shutdown | 12 ++++++++++--
6 files changed, 46 insertions(+), 5 deletions(-)
diff --git a/dracut b/dracut
index 8c24e7b..3c21561 100755
--- a/dracut
+++ b/dracut
@@ -232,6 +232,7 @@ while (($# > 0)); do
--nolvmconf) lvmconf_l="no";;
--debug) debug="yes";;
--profile) profile="yes";;
+ --ctty) cttyhack="yes";;
-v|--verbose) ((verbosity_mod_l++));;
-q|--quiet) ((verbosity_mod_l--));;
-l|--local) allowlocal="yes" ;;
@@ -585,7 +586,7 @@ done
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 \
+ use_fstab libdir usrlibdir fscks nofscks cttyhack \
stdloglvl sysloglvl fileloglvl kmsgloglvl logfile \
debug host_fs_types host_devs
diff --git a/dracut.8.xml b/dracut.8.xml
index 221ad2e..955d4d2 100644
--- a/dracut.8.xml
+++ b/dracut.8.xml
@@ -297,6 +297,15 @@ include in the generic initramfs. This parameter can be specified multiple times
</varlistentry>
<varlistentry>
<term>
+ <option>--ctty</option>
+ </term>
+ <listitem>
+ <para>if possible, try to spawn an emergency shell on a terminal
+ with job control</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
<option>-h</option>
</term>
<term>
diff --git a/dracut.cmdline.7.xml b/dracut.cmdline.7.xml
index 74e617c..0fa4762 100644
--- a/dracut.cmdline.7.xml
+++ b/dracut.cmdline.7.xml
@@ -109,6 +109,20 @@ This parameter can be specified multiple times.</para>
<para>force loading kernel module &lt;drivername&gt; after all automatic loading modules have been loaded. This parameter can be specified multiple times.</para>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term>
+ <envar>rd.ctty=<replaceable>&lt;terminal&gt;</replaceable></envar>
+ </term>
+ <listitem>
+ <para>
+ if the dracut image was generated with --ctty option, try to
+ spawn an emergency shell on the specified terminal; if
+ <envar>rd.ctty</envar> is specified without a value or not
+ provided at all, the default is /dev/tty1. The '/dev' prefix
+ can be omitted.
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
</refsect2>
<refsect2 id="dracut-kernel-debug">
diff --git a/modules.d/99base/init b/modules.d/99base/init
index 1e54449..33a7379 100755
--- a/modules.d/99base/init
+++ b/modules.d/99base/init
@@ -40,6 +40,7 @@ wait_for_loginit()
emergency_shell()
{
+ local _ctty
set +e
if [ "$1" = "-n" ]; then
_rdshell_name=$2
@@ -57,8 +58,15 @@ emergency_shell()
echo "Dropping to debug shell."
echo
export PS1="$_rdshell_name:\${PWD}# "
- [ -e /.profile ] || echo "exec 0<>/dev/console 1<>/dev/console 2<>/dev/console" > /.profile
- sh -i -l
+ [ -e /.profile ] || >/.profile
+ _ctty=/dev/console
+ if type setsid >/dev/null 2>&1; then
+ _ctty="$(getarg rd.ctty=)" && _ctty="/dev/${_ctty##*/}"
+ [ -c "$_ctty" ] || _ctty=/dev/tty1
+ setsid sh -i -l 0<$_ctty 1>$_ctty 2>&1
+ else
+ sh -i -l 0<$_ctty 1>$_ctty 2>&1
+ fi
else
warn "Boot has failed. To debug this issue add \"rdshell\" to the kernel command line."
# cause a kernel panic
diff --git a/modules.d/99base/module-setup.sh b/modules.d/99base/module-setup.sh
index f6c1209..03058b1 100755
--- a/modules.d/99base/module-setup.sh
+++ b/modules.d/99base/module-setup.sh
@@ -16,6 +16,7 @@ install() {
dracut_install mount mknod mkdir modprobe pidof sleep chroot \
sed ls flock cp mv dmesg rm ln rmmod mkfifo umount readlink
dracut_install -o less
+ [[ $cttyhack = yes ]] && dracut_install -o setsid
if [ ! -e "${initdir}/bin/sh" ]; then
dracut_install bash
(ln -s bash "${initdir}/bin/sh" || :)
diff --git a/modules.d/99shutdown/shutdown b/modules.d/99shutdown/shutdown
index a31a95d..21bb37f 100755
--- a/modules.d/99shutdown/shutdown
+++ b/modules.d/99shutdown/shutdown
@@ -13,6 +13,7 @@ export TERM=linux
emergency_shell()
{
+ local _ctty
set +e
if [ "$1" = "-n" ]; then
_rdshell_name=$2
@@ -29,8 +30,15 @@ emergency_shell()
echo "Dropping to debug shell."
echo
export PS1="$_rdshell_name:\${PWD}# "
- [ -e /.profile ] || echo "exec 0<>/dev/console 1<>/dev/console 2<>/dev/console" > /.profile
- sh -i -l
+ [ -e /.profile ] || >/.profile
+ _ctty=/dev/console
+ if type setsid >/dev/null 2>&1; then
+ _ctty="$(getarg rd.ctty=)" && _ctty="/dev/${_ctty##*/}"
+ [ -c "$_ctty" ] || _ctty=/dev/tty1
+ setsid sh -i -l 0<$_ctty 1>$_ctty 2>&1
+ else
+ sh -i -l 0<$_ctty 1>$_ctty 2>&1
+ fi
else
exec /lib/systemd/systemd-shutdown "$@"
warn "Shutdown has failed. To debug this issue add \"rdshell\" to the kernel command line."

View File

@ -1,25 +0,0 @@
From 85bb744dfeb4f86979609b24323fec5181a1b98c Mon Sep 17 00:00:00 2001
From: Dave Young <dyoung@redhat.com>
Date: Mon, 26 Dec 2011 14:29:18 +0800
Subject: [PATCH] change root home dir to /root
ssh need to read knownhosts from home directory, so change root home to /root
Signed-off-by: Dave Young <dyoung@redhat.com>
---
modules.d/99base/module-setup.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/modules.d/99base/module-setup.sh b/modules.d/99base/module-setup.sh
index 03058b1..fad6c50 100755
--- a/modules.d/99base/module-setup.sh
+++ b/modules.d/99base/module-setup.sh
@@ -23,7 +23,7 @@ install() {
fi
#add common users in /etc/passwd, it will be used by nfs/ssh currently
- egrep '^root:' "$initdir/etc/passwd" 2>/dev/null || echo 'root:x:0:0::/:/bin/sh' >> "$initdir/etc/passwd"
+ egrep '^root:' "$initdir/etc/passwd" 2>/dev/null || echo 'root:x:0:0::/root:/bin/sh' >> "$initdir/etc/passwd"
egrep '^nobody:' /etc/passwd >> "$initdir/etc/passwd"
# install our scripts and hooks
inst "$moddir/init" "/init"

View File

@ -1,148 +0,0 @@
From cdfeb278ab4d4b6a9d848e1b9accc3554e4ac6eb Mon Sep 17 00:00:00 2001
From: Dave Young <dyoung@redhat.com>
Date: Mon, 26 Dec 2011 14:29:21 +0800
Subject: [PATCH] Add ssh client module code
Add ssh client module which support ssh key mode and interactive mode.
with --sshkey option you can provide the ssh key to be installed
>why not call it "ssh" module?
ssh-client is better, maybe future there will be ssh-server come in.
In debian these are also two different packages.
Usage:
1. sshkey mode:
transfer your public key to remote machine with ssh-copy-id or do it mannaully
example of options:
./dracut -l -H -a ssh-client --sshkey /root/.ssh/id_rsa i.img
2. interactive mode:
need use --ctty option, ie.:
./dracut -l -H -a ssh-client --ctty i.img
[v2 changes]:
per wangcong: add patch description about module name
add help line in usage()
remove useless comment
Signed-off-by: Dave Young <dyoung@redhat.com>
---
dracut | 4 ++-
dracut.8.xml | 8 ++++
modules.d/95ssh-client/module-setup.sh | 60 ++++++++++++++++++++++++++++++++
3 files changed, 71 insertions(+), 1 deletions(-)
create mode 100644 modules.d/95ssh-client/module-setup.sh
diff --git a/dracut b/dracut
index 3c21561..d0c335b 100755
--- a/dracut
+++ b/dracut
@@ -118,6 +118,7 @@ Creates initial ramdisk images for preloading modules
-M, --show-modules Print included module's name to standard output during
build.
--keep Keep the temporary initramfs for debugging purposes
+ --sshkey [SSHKEY] Add ssh key to initramfs (use with ssh-client module)
EOF
}
@@ -233,6 +234,7 @@ while (($# > 0)); do
--debug) debug="yes";;
--profile) profile="yes";;
--ctty) cttyhack="yes";;
+ --sshkey) read_arg sshkey "$@" || shift;;
-v|--verbose) ((verbosity_mod_l++));;
-q|--quiet) ((verbosity_mod_l--));;
-l|--local) allowlocal="yes" ;;
@@ -588,7 +590,7 @@ export initdir dracutbasedir dracutmodules drivers \
add_drivers mdadmconf lvmconf filesystems \
use_fstab libdir usrlibdir fscks nofscks cttyhack \
stdloglvl sysloglvl fileloglvl kmsgloglvl logfile \
- debug host_fs_types host_devs
+ debug host_fs_types host_devs sshkey
# Create some directory structure first
[[ $prefix ]] && mkdir -m 0755 -p "${initdir}${prefix}"
diff --git a/dracut.8.xml b/dracut.8.xml
index 955d4d2..5a5df54 100644
--- a/dracut.8.xml
+++ b/dracut.8.xml
@@ -370,6 +370,14 @@ Default:
</varlistentry>
<varlistentry>
<term>
+ <option>--sshkey&nbsp;<replaceable>&lt;sshkey file&gt;</replaceable></option>
+ </term>
+ <listitem>
+ <para>ssh key file used with ssh-client module.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
<option>-l</option>
</term>
<term>
diff --git a/modules.d/95ssh-client/module-setup.sh b/modules.d/95ssh-client/module-setup.sh
new file mode 100644
index 0000000..0ffc298
--- /dev/null
+++ b/modules.d/95ssh-client/module-setup.sh
@@ -0,0 +1,60 @@
+#!/bin/bash
+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
+# ex: ts=8 sw=4 sts=4 et filetype=sh
+
+# fixme: assume user is root
+
+check() {
+ # If our prerequisites are not met, fail.
+ type -P ssh >/dev/null || return 1
+ type -P scp >/dev/null || return 1
+ if [[ $sshkey ]]; then
+ [ ! -f $sshkey ] && {
+ derror "sshkey is not found!"
+ return 1
+ }
+ [[ ! $cttyhack = yes ]] && {
+ dinfo "--ctty is not used, you should make sure the machine is knowhost and copy the sshkey to remote machine!"
+ }
+ else
+ [[ ! $cttyhack = yes ]] && {
+ derror "ssh interactive mode need option --ctty!"
+ return 1
+ }
+ fi
+
+ return 0
+}
+
+depends() {
+ # We depend on network modules being loaded
+ echo network
+}
+
+inst_sshenv()
+{
+ if [ -d /root/.ssh ]; then
+ inst_dir /root/.ssh
+ chmod 700 ${initdir}/root/.ssh
+ fi
+
+ # Copy over ssh key and knowhosts if needed
+ [[ $sshkey ]] && {
+ inst $sshkey
+ [[ -f /root/.ssh/known_hosts ]] && inst /root/.ssh/known_hosts
+ [[ -f /etc/ssh/ssh_known_hosts ]] && inst /etc/ssh/ssh_known_hosts
+ }
+
+ # Copy over root and system-wide ssh configs.
+ [[ -f /root/.ssh/config ]] && inst /root/.ssh/config
+ [[ -f /etc/ssh/ssh_config ]] && inst /etc/ssh/ssh_config
+
+ return 0
+}
+
+install() {
+ inst ssh
+ inst scp
+ inst_sshenv
+}
+

View File

@ -1,24 +0,0 @@
From b93aaba84f8cfaaf7f8e07fc23935c80d9e87e20 Mon Sep 17 00:00:00 2001
From: Dave Young <dyoung@redhat.com>
Date: Mon, 26 Dec 2011 14:42:18 +0800
Subject: [PATCH] --ctty: add help line in usage
Adding missed help line in usage
Signed-off-by: Dave Young <dyoung@redhat.com>
---
dracut | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/dracut b/dracut
index d0c335b..fbf0f74 100755
--- a/dracut
+++ b/dracut
@@ -119,6 +119,7 @@ Creates initial ramdisk images for preloading modules
build.
--keep Keep the temporary initramfs for debugging purposes
--sshkey [SSHKEY] Add ssh key to initramfs (use with ssh-client module)
+ --ctty Add control tty for emergency shells
EOF
}

View File

@ -1,32 +0,0 @@
From e38fcc86086d62dfdcd776728b77d7d7acb20b80 Mon Sep 17 00:00:00 2001
From: James Buren <ryuo@frugalware.org>
Date: Sun, 22 Jan 2012 12:56:24 -0600
Subject: [PATCH] plymouth: add xz support for kernel modules
This rewrites a portion of the module to support xz, as well as allow
an easier expansion should future compression methods for kernel
modules ever materialize.
---
modules.d/50plymouth/module-setup.sh | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/modules.d/50plymouth/module-setup.sh b/modules.d/50plymouth/module-setup.sh
index eedc842..b78c718 100755
--- a/modules.d/50plymouth/module-setup.sh
+++ b/modules.d/50plymouth/module-setup.sh
@@ -14,8 +14,13 @@ depends() {
installkernel() {
local _modname
# Include KMS capable drm drivers
- for _modname in $(find "$srcmods/kernel/drivers/gpu/drm" "$srcmods/extra" \( -name '*.ko' -o -name '*.ko.gz' \) 2>/dev/null); do
- if zgrep -q drm_crtc_init $_modname; then
+ for _modname in $(find "$srcmods/kernel/drivers/gpu/drm" "$srcmods/extra" \( -name '*.ko' -o -name '*.ko.gz' -o -name '*.ko.xz' \) 2>/dev/null); do
+ case $_modname in
+ *.ko) grep -q drm_crtc_init $_modname ;;
+ *.ko.gz) zgrep -q drm_crtc_init $_modname ;;
+ *.ko.xz) xzgrep -q drm_crtc_init $_modname ;;
+ esac
+ if test $? -eq 0; then
# if the hardware is present, include module even if it is not currently loaded,
# as we could e.g. be in the installer; nokmsboot boot parameter will disable
# loading of the driver if needed

View File

@ -1,110 +0,0 @@
From 7fffc9f11f836d6e19414f0c0f23e7e8fb4f17c4 Mon Sep 17 00:00:00 2001
From: James Buren <ryuo@frugalware.org>
Date: Sun, 22 Jan 2012 13:02:47 -0600
Subject: [PATCH] add xz compression for kernel modules
---
dracut-functions | 11 ++++++++---
modules.d/40network/module-setup.sh | 1 +
modules.d/90kernel-modules/module-setup.sh | 1 +
modules.d/90multipath/module-setup.sh | 1 +
modules.d/95iscsi/module-setup.sh | 1 +
5 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/dracut-functions b/dracut-functions
index a9b15cc..3852478 100755
--- a/dracut-functions
+++ b/dracut-functions
@@ -364,7 +364,7 @@ inst_simple() {
inst "${_src%/*}/.${_src##*/}.hmac" "${target%/*}/.${target##*/}.hmac"
fi
ddebug "Installing $_src"
- cp --sparse=always -pfL "$_src" "${initdir}/$target"
+ cp --sparse=always -pfL "$_src" "${initdir}/$target"
}
# find symlinks linked to given library file
@@ -508,7 +508,7 @@ inst_symlink() {
if [[ -d $_realsrc ]]; then
inst_dir "$_realsrc"
else
- inst "$_realsrc" && mkdir -m 0755 -p "${_target%/*}"
+ inst "$_realsrc" && mkdir -m 0755 -p "${_target%/*}"
fi
if [[ -e "${_src}" ]]; then
ln -sfn $(convert_abs_rel "${_src}" "${_realsrc}") "$_target"
@@ -984,6 +984,7 @@ filter_kernel_modules_by_path () (
if ! [[ $hostonly ]]; then
_filtercmd='find "$srcmods/kernel/$1" "$srcmods/extra"'
_filtercmd+=' "$srcmods/weak-updates" -name "*.ko" -o -name "*.ko.gz"'
+ _filtercmd+=' -o -name "*.ko.xz"'
_filtercmd+=' 2>/dev/null'
else
_filtercmd='cut -d " " -f 1 </proc/modules|xargs modinfo -F filename '
@@ -996,13 +997,17 @@ filter_kernel_modules_by_path () (
$2 $initdir/$$.ko && echo "$_modname"
rm -f $initdir/$$.ko
;;
+ *.ko.xz) xz -dc "$_modname" > $initdir/$$.ko
+ $2 $initdir/$$.ko && echo "$_modname"
+ rm -f $initdir/$$.ko
+ ;;
esac
done
)
find_kernel_modules_by_path () (
if ! [[ $hostonly ]]; then
find "$srcmods/kernel/$1" "$srcmods/extra" "$srcmods/weak-updates" \
- -name "*.ko" -o -name "*.ko.gz" 2>/dev/null
+ -name "*.ko" -o -name "*.ko.gz" -o -name "*.ko.xz" 2>/dev/null
else
cut -d " " -f 1 </proc/modules \
| xargs modinfo -F filename -k $kernel 2>/dev/null
diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh
index fbf6f34..6c4ae92 100755
--- a/modules.d/40network/module-setup.sh
+++ b/modules.d/40network/module-setup.sh
@@ -36,6 +36,7 @@ installkernel() {
case "$_fname" in
*.ko) _fcont="$(< $_fname)" ;;
*.ko.gz) _fcont="$(gzip -dc $_fname)" ;;
+ *.ko.xz) _fcont="$(xz -dc $_fname)" ;;
esac
[[ $_fcont =~ $_net_drivers
&& ! $_fcont =~ iw_handler_get_spy ]] \
diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh
index 7888428..46d8591 100755
--- a/modules.d/90kernel-modules/module-setup.sh
+++ b/modules.d/90kernel-modules/module-setup.sh
@@ -13,6 +13,7 @@ installkernel() {
while read _f; do case "$_f" in
*.ko) [[ $(< $_f) =~ $_blockfuncs ]] && echo "$_f" ;;
*.ko.gz) [[ $(gzip -dc <$_f) =~ $_blockfuncs ]] && echo "$_f" ;;
+ *.ko.xz) [[ $(xz -dc <$_f) =~ $_blockfuncs ]] && echo "$_f" ;;
esac
done
}
diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh
index 43f0a3d..1502f59 100755
--- a/modules.d/90multipath/module-setup.sh
+++ b/modules.d/90multipath/module-setup.sh
@@ -40,6 +40,7 @@ installkernel() {
while read _f; do case "$_f" in
*.ko) [[ $(< $_f) =~ $_mpfuncs ]] && echo "$_f" ;;
*.ko.gz) [[ $(gzip -dc <$_f) =~ $_mpfuncs ]] && echo "$_f" ;;
+ *.ko.xz) [[ $(xz -dc <$_f) =~ $_mpfuncs ]] && echo "$_f" ;;
esac
done
}
diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh
index 8caaf73..560507c 100755
--- a/modules.d/95iscsi/module-setup.sh
+++ b/modules.d/95iscsi/module-setup.sh
@@ -48,6 +48,7 @@ installkernel() {
while read _f; do case "$_f" in
*.ko) [[ $(< $_f) =~ $_iscsifuncs ]] && echo "$_f" ;;
*.ko.gz) [[ $(gzip -dc <$_f) =~ $_iscsifuncs ]] && echo "$_f" ;;
+ *.ko.xz) [[ $(xz -dc <$_f) =~ $_iscsifuncs ]] && echo "$_f" ;;
esac
done
}

View File

@ -1,47 +0,0 @@
From 3ea5d2e28fe0e5790594d036c430dbad4e903186 Mon Sep 17 00:00:00 2001
From: Cong Wang <xiyou.wangcong@gmail.com>
Date: Tue, 10 Jan 2012 22:45:45 +0800
Subject: [PATCH] lsinitrd: add '-s' option to sort the initrd output by file
size
This is useful to analyse which files consume the space of initrd.
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
---
lsinitrd | 18 ++++++++++++++++--
1 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/lsinitrd b/lsinitrd
index 7da9f61..ad7ece9 100755
--- a/lsinitrd
+++ b/lsinitrd
@@ -19,7 +19,17 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-[[ $# -le 2 ]] || { echo "Usage: $(basename $0) [<initramfs file> [<filename>]]" ; exit 1 ; }
+[[ $# -le 2 ]] || { echo "Usage: $(basename $0) [-s] [<initramfs file> [<filename>]]" ; exit 1 ; }
+
+sorted=0
+while getopts "s" opt; do
+ case $opt in
+ s) sorted=1;;
+ \?) exit 1;;
+ esac
+done
+shift $((OPTIND-1))
+
image="${1:-/boot/initramfs-$(uname -r).img}"
[[ -f "$image" ]] || { echo "$image does not exist" ; exit 1 ; }
@@ -45,5 +55,9 @@ echo "$image: $(du -h $image | awk '{print $1}')"
echo "========================================================================"
$CAT "$image" | cpio --extract --verbose --quiet --to-stdout 'lib/dracut/dracut-*' 2>/dev/null
echo "========================================================================"
-$CAT "$image" | cpio --extract --verbose --quiet --list
+if [ "$sorted" -eq 1 ]; then
+ $CAT "$image" | cpio --extract --verbose --quiet --list | sort -n -k5
+else
+ $CAT "$image" | cpio --extract --verbose --quiet --list
+fi
echo "========================================================================"

View File

@ -1,25 +0,0 @@
From 1fcf2d2f4a7eb95a507f5a4e85640e3d25bce79e Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Mon, 23 Jan 2012 10:10:25 +0100
Subject: [PATCH] dracut: unset GREP_OPTIONS
GREP_OPTIONS can influence the image creation, if set to user defined
values, so unset it.
https://bugzilla.redhat.com/show_bug.cgi?id=676712
---
dracut | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/dracut b/dracut
index fbf0f74..9c833a8 100755
--- a/dracut
+++ b/dracut
@@ -278,6 +278,7 @@ fi
PATH=/sbin:/bin:/usr/sbin:/usr/bin
export PATH
unset LD_LIBRARY_PATH
+unset GREP_OPTIONS
[[ $debug ]] && {
export PS4='${BASH_SOURCE}@${LINENO}(${FUNCNAME[0]}): ';

View File

@ -1,38 +0,0 @@
From c96425c3647d1d5e7110ac369056df79a6024e1d Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Mon, 23 Jan 2012 10:34:03 +0100
Subject: [PATCH] lsinitrd: use xz with --single-stream, if available
The F16 installation image is two concatenated cpio images:
[xz-compressed dracut initramfs][uncompressed cpio with /squashfs.img]
So to show the contents, use xz with the "--single-stream" option.
https://bugzilla.redhat.com/show_bug.cgi?id=742299
---
lsinitrd | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/lsinitrd b/lsinitrd
index ad7ece9..1d953b7 100755
--- a/lsinitrd
+++ b/lsinitrd
@@ -36,12 +36,16 @@ image="${1:-/boot/initramfs-$(uname -r).img}"
CAT=zcat
FILE_T=$(file "$image")
+if echo "test"|xz|xz -dc --single-stream; then
+ XZ_SINGLE_STREAM="--single-stream"
+fi
+
if [[ "$FILE_T" =~ ": gzip compressed data" ]]; then
CAT=zcat
elif [[ "$FILE_T" =~ ": xz compressed data" ]]; then
- CAT=xzcat
+ CAT="xzcat $XZ_SINGLE_STREAM"
elif [[ "$FILE_T" =~ ": XZ compressed data" ]]; then
- CAT=xzcat
+ CAT="xzcat $XZ_SINGLE_STREAM"
elif [[ "$FILE_T" =~ ": data" ]]; then
CAT=lzcat
fi

View File

@ -1,65 +0,0 @@
From 39339512e2ea0724de9474a8bdac81e5abaf8c97 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Mon, 23 Jan 2012 10:41:41 +0100
Subject: [PATCH] plymouth/kernel: cleanup not needed parts for shutdown
remove plymouth and kernel parts from /run/initramfs, which are not
needed at shutdown.
https://bugzilla.redhat.com/show_bug.cgi?id=751189
---
modules.d/50plymouth/module-setup.sh | 1 +
modules.d/50plymouth/plymouth-cleanup.sh | 5 +++++
modules.d/90kernel-modules/kernel-cleanup.sh | 5 +++++
modules.d/90kernel-modules/module-setup.sh | 1 +
4 files changed, 12 insertions(+), 0 deletions(-)
create mode 100755 modules.d/50plymouth/plymouth-cleanup.sh
create mode 100755 modules.d/90kernel-modules/kernel-cleanup.sh
diff --git a/modules.d/50plymouth/module-setup.sh b/modules.d/50plymouth/module-setup.sh
index b78c718..5c9eaee 100755
--- a/modules.d/50plymouth/module-setup.sh
+++ b/modules.d/50plymouth/module-setup.sh
@@ -46,6 +46,7 @@ install() {
inst_hook pre-pivot 90 "$moddir"/plymouth-newroot.sh
inst_hook pre-trigger 10 "$moddir"/plymouth-pretrigger.sh
+ inst_hook pre-pivot 10 "$moddir"/plymouth-cleanup.sh
inst_hook emergency 50 "$moddir"/plymouth-emergency.sh
inst readlink
}
diff --git a/modules.d/50plymouth/plymouth-cleanup.sh b/modules.d/50plymouth/plymouth-cleanup.sh
new file mode 100755
index 0000000..d6d11e6
--- /dev/null
+++ b/modules.d/50plymouth/plymouth-cleanup.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
+# ex: ts=8 sw=4 sts=4 et filetype=sh
+
+rm -fr /usr/share/plymouth /usr/lib/plymouth /usr/lib64/plymouth
diff --git a/modules.d/90kernel-modules/kernel-cleanup.sh b/modules.d/90kernel-modules/kernel-cleanup.sh
new file mode 100755
index 0000000..d17714d
--- /dev/null
+++ b/modules.d/90kernel-modules/kernel-cleanup.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
+# ex: ts=8 sw=4 sts=4 et filetype=sh
+
+rm -fr /lib/modules
\ No newline at end of file
diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh
index 46d8591..88f0e2d 100755
--- a/modules.d/90kernel-modules/module-setup.sh
+++ b/modules.d/90kernel-modules/module-setup.sh
@@ -75,6 +75,7 @@ install() {
inst_simple "$i"
done
inst_hook cmdline 01 "$moddir/parse-kernel.sh"
+ inst_hook pre-pivot 20 "$moddir/kernel-cleanup.sh"
inst_simple "$moddir/insmodpost.sh" /sbin/insmodpost.sh
for _f in modules.builtin.bin modules.builtin; do

View File

@ -1,42 +0,0 @@
From da55af4763d6a88da5a0b31cb68cdc0a2adfcd7e Mon Sep 17 00:00:00 2001
From: Ian Dall <ian@beware.dropbear.id.au>
Date: Mon, 23 Jan 2012 10:46:10 +0100
Subject: [PATCH] network/dhclient-script: set FQDN
When booting with nfsroot, dracut doesn't necessarily set the initial
hostname correctly.
According to dhcp-options(5), the name may or may not be qualified with
the local domain. It goes on to say "it is preferable to use the
domain-name option to specify the domain name".
So dhclient-script needs to be able to handle the cases: a) where
host-name is fully qualified and domain name is also specified; b)
where hostname is fully qualified and the domain is not separately
specified; c) where host-name is "short" and domain-name is also
specified; and d) do its best where host-name is short but domain-name
is not specified.
The dhclient-script in initramfs does not handle case "c", apparently
the preferred situation properly, setting hostname to "short".
https://bugzilla.redhat.com/show_bug.cgi?id=756347
---
modules.d/40network/dhclient-script | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/modules.d/40network/dhclient-script b/modules.d/40network/dhclient-script
index 2c26838..e8bd8b2 100755
--- a/modules.d/40network/dhclient-script
+++ b/modules.d/40network/dhclient-script
@@ -41,7 +41,9 @@ setup_interface() {
done
fi >> /tmp/net.$netif.resolv.conf
- [ -n "$hostname" ] && echo "echo $hostname > /proc/sys/kernel/hostname" > /tmp/net.$netif.hostname
+ # Note: hostname can be fqdn OR short hostname, so chop off any
+ # trailing domain name and explicity add any domain if set.
+ [ -n "$hostname" ] && echo "echo ${hostname%.$domain}${domain+.$domain} > /proc/sys/kernel/hostname" > /tmp/net.$netif.hostname
}
PATH=/usr/sbin:/usr/bin:/sbin:/bin

View File

@ -1,92 +0,0 @@
From 6769292c0d43316b116552b0af56509496f96d80 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Mon, 23 Jan 2012 11:06:16 +0100
Subject: [PATCH] AUTHORS: updated and fixed .mailmap
---
.mailmap | 5 ++++-
AUTHORS | 28 +++++++++++++++++++---------
2 files changed, 23 insertions(+), 10 deletions(-)
diff --git a/.mailmap b/.mailmap
index b37295e..bce9b7c 100644
--- a/.mailmap
+++ b/.mailmap
@@ -6,4 +6,7 @@ Harald Hoyer <harald@redhat.com> <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Harald Hoyer <harald@redhat.com> <harald@eeepc.(none)>
Mike Snitzer <snitzer@redhat.com> <msnitzer@redhat.com>
Amerigo Wang <amwang@redhat.com> <xiyou.wangcong@gmail.com>
-
+Andrey Borzenkov <arvidjaar@gmail.com> <arvidjaar@mail.ru>
+Dan Horák <dhorak@redhat.com> <dan@danny.cz>
+John Reiser <jreiser@bitwagon.com> <jreiser@BitWagon.com>
+Luca Berra <bluca@vodka.it> <bluca@comedia.it>
diff --git a/AUTHORS b/AUTHORS
index 99eab35..12dbe15 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -7,45 +7,55 @@ Jeremy Katz <katzj@redhat.com>
David Dillow <dave@thedillows.org>
Michal Soltys <soltys@ziu.info>
Will Woods <wwoods@redhat.com>
+Andrey Borzenkov <arvidjaar@gmail.com>
Andreas Thienemann <andreas@bawue.net>
Hans de Goede <hdegoede@redhat.com>
Peter Jones <pjones@redhat.com>
-Luca Berra <bluca@comedia.it>
-Andrey Borzenkov <arvidjaar@mail.ru>
-Andrey Borzenkov <arvidjaar@gmail.com>
-Marc Grimme <grimme@atix.de>
+Amerigo Wang <amwang@redhat.com>
+Colin Guthrie <colin@mageia.org>
+John Reiser <jreiser@bitwagon.com>
+Luca Berra <bluca@vodka.it>
+Dave Young <dyoung@redhat.com>
Daniel Drake <dsd@laptop.org>
+Marc Grimme <grimme@atix.de>
Roberto Sassu <roberto.sassu@polito.it>
-Amerigo Wang <amwang@redhat.com>
+Anton Blanchard <anton@samba.org>
Bill Nottingham <notting@redhat.com>
+Brian C. Lane <bcl@redhat.com>
+Dan Horák <dhorak@redhat.com>
David Cantrell <dcantrell@redhat.com>
Lance Albertson <lance@osuosl.org>
Marian Ganisin <mganisin@redhat.com>
Michael Ploujnikov <plouj@somanetworks.com>
Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Alan Pevec <apevec@redhat.com>
-Dan Horák <dan@danny.cz>
+Ian Dall <ian@beware.dropbear.id.au>
+James Buren <ryuo@frugalware.org>
Joey Boggs <jboggs@redhat.com>
Jon Ander Hernandez <jonan.h@gmail.com>
Mike Snitzer <snitzer@redhat.com>
Peter Rajnoha <prajnoha@redhat.com>
+Przemysław Rudy <prudy1@o2.pl>
Vladislav Bogdanov <bubble@hoster-ok.com>
Alexander Todorov <atodorov@redhat.com>
Andy Lutomirski <luto@mit.edu>
+Anssi Hannula <anssi@mageia.org>
Christian Heinz <christian.ch.heinz@gmail.com>
-Dan Horák <dhorak@redhat.com>
Dave Jones <davej@redhat.com>
+Duane Griffin <duaneg@dghda.com>
Frederic Crozat <fcrozat@mandriva.com>
Glen Gray <slaine@slaine.org>
-Ian Dall <ian@beware.dropbear.id.au>
+Hermann Gausterer <git-dracut-2012@mrq1.org>
James Laska <jlaska@redhat.com>
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
+Leho Kraav <leho@kraav.com>
Lubomir Rintel <lkundrak@v3.sk>
-Luca Berra <bluca@vodka.it>
Matt <smoothsailing72@hotmail.com>
Matt Smith <shadowfax@gmx.com>
Michal Schmidt <mschmidt@redhat.com>
Munehiro Matsuda <haro@kgt.co.jp>
+Paolo Bonzini <pbonzini@redhat.com>
+Peter Robinson <pbrobinson@fedoraproject.org>
Pádraig Brady <P@draigBrady.com>
Quentin Armitage <quentin@armitage.org.uk>
Sergey Fionov <fionov@gmail.com>

View File

@ -1,187 +0,0 @@
From ccaa9bee2e813daa3460698d5aa444423d92483f Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Mon, 23 Jan 2012 11:26:17 +0100
Subject: [PATCH] dracut, dracut.8.xml: added more documentation about
"[LIST]"
added examples on how to use [LIST] on the shell command line.
https://bugzilla.redhat.com/show_bug.cgi?id=767736
---
dracut | 4 +++
dracut.8.xml | 69 +++++++++++++++++++++++++++++++++++++++++++++++-----------
2 files changed, 60 insertions(+), 13 deletions(-)
diff --git a/dracut b/dracut
index 9c833a8..f2e5feb 100755
--- a/dracut
+++ b/dracut
@@ -120,6 +120,10 @@ Creates initial ramdisk images for preloading modules
--keep Keep the temporary initramfs for debugging purposes
--sshkey [SSHKEY] Add ssh key to initramfs (use with ssh-client module)
--ctty Add control tty for emergency shells
+
+If [LIST] has multiple arguments, then you have to put these in quotes.
+For example:
+# dracut --add-drivers "module1 module2" ...
EOF
}
diff --git a/dracut.8.xml b/dracut.8.xml
index 5a5df54..88c97c3 100644
--- a/dracut.8.xml
+++ b/dracut.8.xml
@@ -20,21 +20,25 @@
</author>
<author>
<contrib>Developer</contrib>
+ <firstname>Philippe</firstname>
+ <surname>Seewer</surname>
+ <email>philippe.seewer@bfh.ch</email>
+ </author>
+ <author>
+ <contrib>Developer</contrib>
<firstname>Warren</firstname>
<surname>Togami</surname>
- <email>wtogami@redhat.com</email>
</author>
<author>
<contrib>Developer</contrib>
- <firstname>Jeremy</firstname>
- <surname>Katz</surname>
- <email>katzj@redhat.com</email>
+ <firstname>Amadeusz</firstname>
+ <surname>Żołnowski</surname>
+ <email>aidecoe@aidecoe.name</email>
</author>
<author>
<contrib>Developer</contrib>
- <firstname>Philippe</firstname>
- <surname>Seewer</surname>
- <email>philippe.seewer@bfh.ch</email>
+ <firstname>Jeremy</firstname>
+ <surname>Katz</surname>
</author>
<author>
<contrib>Developer</contrib>
@@ -42,12 +46,6 @@
<surname>Dillow</surname>
<email>dave@thedillows.org</email>
</author>
- <author>
- <contrib>Developer</contrib>
- <firstname>Amadeusz</firstname>
- <surname>Żołnowski</surname>
- <email>aidecoe@aidecoe.name</email>
- </author>
</authorgroup>
</refentryinfo>
<refmeta>
@@ -113,6 +111,11 @@ For a complete list of kernel command line options see
when building the initramfs.
Modules are located in
<filename>/usr/lib/dracut/modules.d</filename>. This parameter can be specified multiple times.</para>
+ <para>
+ If [LIST] has multiple arguments, then you have to put these in quotes.
+ For example:
+ <screen># dracut --modules "module1 module2" ...</screen>
+ </para>
</listitem>
</varlistentry>
<varlistentry>
@@ -124,6 +127,11 @@ Modules are located in
</term>
<listitem>
<para>omit a space-separated list of dracut modules. This parameter can be specified multiple times.</para>
+ <para>
+ If [LIST] has multiple arguments, then you have to put these in quotes.
+ For example:
+ <screen># dracut --omit "module1 module2" ...</screen>
+ </para>
</listitem>
</varlistentry>
<varlistentry>
@@ -135,6 +143,11 @@ Modules are located in
</term>
<listitem>
<para>add a space-separated list of dracut modules to the default set of modules. This parameter can be specified multiple times.</para>
+ <para>
+ If [LIST] has multiple arguments, then you have to put these in quotes.
+ For example:
+ <screen># dracut --add "module1 module2" ...</screen>
+ </para>
</listitem>
</varlistentry>
<varlistentry>
@@ -143,6 +156,11 @@ Modules are located in
</term>
<listitem>
<para>force to add a space-separated list of dracut modules to the default set of modules, when -H is specified. This parameter can be specified multiple times.</para>
+ <para>
+ If [LIST] has multiple arguments, then you have to put these in quotes.
+ For example:
+ <screen># dracut --force-add "module1 module2" ...</screen>
+ </para>
</listitem>
</varlistentry>
@@ -157,6 +175,11 @@ Modules are located in
<para>specify a space-separated list of kernel modules to exclusively include
in the initramfs.
The kernel modules have to be specified without the &quot;.ko&quot; suffix. This parameter can be specified multiple times.</para>
+ <para>
+ If [LIST] has multiple arguments, then you have to put these in quotes.
+ For example:
+ <screen># dracut --drivers "kmodule1 kmodule2" ...</screen>
+ </para>
</listitem>
</varlistentry>
<varlistentry>
@@ -166,6 +189,11 @@ The kernel modules have to be specified without the &quot;.ko&quot; suffix. This
<listitem>
<para>specify a space-separated list of kernel modules to add to the initramfs.
The kernel modules have to be specified without the &quot;.ko&quot; suffix. This parameter can be specified multiple times.</para>
+ <para>
+ If [LIST] has multiple arguments, then you have to put these in quotes.
+ For example:
+ <screen># dracut --add-drivers "kmodule1 kmodule2" ...</screen>
+ </para>
</listitem>
</varlistentry>
<varlistentry>
@@ -175,6 +203,11 @@ The kernel modules have to be specified without the &quot;.ko&quot; suffix. This
<listitem>
<para>specify a space-separated list of kernel filesystem modules to exclusively
include in the generic initramfs. This parameter can be specified multiple times.</para>
+ <para>
+ If [LIST] has multiple arguments, then you have to put these in quotes.
+ For example:
+ <screen># dracut --filesystems "filesystem1 filesystem2" ...</screen>
+ </para>
</listitem>
</varlistentry>
<varlistentry>
@@ -253,6 +286,11 @@ include in the generic initramfs. This parameter can be specified multiple times
<filename>dracut.conf</filename>'s specification; the
installation is opportunistic (non-existing tools are ignored)
</para>
+ <para>
+ If [LIST] has multiple arguments, then you have to put these in quotes.
+ For example:
+ <screen># dracut --fscks "fsck.foo barfsck" ...</screen>
+ </para>
</listitem>
</varlistentry>
<varlistentry>
@@ -450,6 +488,11 @@ TARGET directory in the final initramfs. If SOURCE is a file, it will be install
</term>
<listitem>
<para>install the space separated list of files into the initramfs.</para>
+ <para>
+ If [LIST] has multiple arguments, then you have to put these in quotes.
+ For example:
+ <screen># dracut --install "/bin/foo /sbin/bar" ...</screen>
+ </para>
</listitem>
</varlistentry>
<varlistentry>

View File

@ -1,23 +0,0 @@
From 1b91369455d2011b7eaa13e0a892d4dc914197c4 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Mon, 23 Jan 2012 11:32:06 +0100
Subject: [PATCH] 98usrmount/mount-usr.sh: do not mount /usr read-only
https://bugzilla.redhat.com/show_bug.cgi?id=782897
---
modules.d/98usrmount/mount-usr.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/modules.d/98usrmount/mount-usr.sh b/modules.d/98usrmount/mount-usr.sh
index fc205d5..b24446a 100755
--- a/modules.d/98usrmount/mount-usr.sh
+++ b/modules.d/98usrmount/mount-usr.sh
@@ -11,7 +11,7 @@ mount_usr()
# check, if we have to mount the /usr filesystem
while read _dev _mp _fs _opts _rest; do
if [ "$_mp" = "/usr" ]; then
- echo "$_dev $NEWROOT/$_mp $_fs ${_opts},ro $_rest"
+ echo "$_dev $NEWROOT/$_mp $_fs ${_opts} $_rest"
_usr_found="1"
break
fi

View File

@ -1,23 +0,0 @@
From c254ac796fe52d19ad47df99055cd58fee5e517e Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Mon, 23 Jan 2012 11:41:44 +0100
Subject: [PATCH] 40network: also look in drivers/s390/net for network drivers
https://bugzilla.redhat.com/show_bug.cgi?id=782074
---
modules.d/40network/module-setup.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh
index 6c4ae92..9017413 100755
--- a/modules.d/40network/module-setup.sh
+++ b/modules.d/40network/module-setup.sh
@@ -58,7 +58,7 @@ installkernel() {
[[ $debug ]] && set -x
}
- find_kernel_modules_by_path drivers/net | net_module_filter | instmods
+ find_kernel_modules_by_path drivers/net drivers/s390/net | net_module_filter | instmods
instmods ecb arc4
# bridge modules

View File

@ -1,29 +0,0 @@
From a29cf54c02d11af96e3c0e59935c536921d3fc9b Mon Sep 17 00:00:00 2001
From: Cong Wang <xiyou.wangcong@gmail.com>
Date: Tue, 10 Jan 2012 11:42:33 +0800
Subject: [PATCH] fix rpm build error after adding ssh-client module
This patch fixes the following error when building rpm,
error: Installed (but unpackaged) file(s) found:
/usr/lib/dracut/modules.d/95ssh-client/module-setup.sh
Based on my kdump tree.
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
---
dracut.spec | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/dracut.spec b/dracut.spec
index 3986894..16c8aa3 100644
--- a/dracut.spec
+++ b/dracut.spec
@@ -269,6 +269,7 @@ rm -rf $RPM_BUILD_ROOT
%{dracutlibdir}/modules.d/90livenet
%{dracutlibdir}/modules.d/95nbd
%{dracutlibdir}/modules.d/95nfs
+%{dracutlibdir}/modules.d/95ssh-client
%{dracutlibdir}/modules.d/45ifcfg
%{dracutlibdir}/modules.d/95znet

View File

@ -1,36 +0,0 @@
From 4fcd5409e09e693349e991bd2a78303114a735f5 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Mon, 23 Jan 2012 12:35:41 +0100
Subject: [PATCH] iscsi/multipath: also search in drivers/s390/scsi
---
modules.d/90multipath/module-setup.sh | 2 +-
modules.d/95iscsi/module-setup.sh | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh
index 1502f59..f3b40bc 100755
--- a/modules.d/90multipath/module-setup.sh
+++ b/modules.d/90multipath/module-setup.sh
@@ -45,7 +45,7 @@ installkernel() {
done
}
- ( find_kernel_modules_by_path drivers/scsi;
+ ( find_kernel_modules_by_path drivers/scsi drivers/s390/scsi ;
find_kernel_modules_by_path drivers/md ) | mp_mod_filter | instmods
[[ $debug ]] && set -x
}
diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh
index 560507c..5738941 100755
--- a/modules.d/95iscsi/module-setup.sh
+++ b/modules.d/95iscsi/module-setup.sh
@@ -52,7 +52,7 @@ installkernel() {
esac
done
}
- find_kernel_modules_by_path drivers/scsi \
+ find_kernel_modules_by_path drivers/scsi drivers/s390/scsi \
| iscsi_module_filter | instmods
}

View File

@ -1,24 +0,0 @@
From 4f10ae2b86af35051ec07e8710578501d1cf1e0a Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Mon, 23 Jan 2012 13:49:39 +0100
Subject: [PATCH] dracut: _get_fs_type() also handle /dev/block/maj:min
---
dracut | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/dracut b/dracut
index f2e5feb..db97b58 100755
--- a/dracut
+++ b/dracut
@@ -574,6 +574,10 @@ _get_fs_type() (
echo "$1|$ID_FS_TYPE"
return 1
fi
+ if [[ -b /dev/block/$1 ]] && get_fs_env /dev/block/$1; then
+ echo "/dev/block/$1|$ID_FS_TYPE"
+ return 1
+ fi
if fstype=$(find_dev_fstype $1); then
echo "$1|$fstype"
return 1

View File

@ -1,22 +0,0 @@
From 74132a10f35685a05a728d598d4e7f9905b3e35b Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Mon, 23 Jan 2012 13:50:05 +0100
Subject: [PATCH] dracut-functions: get_maj_min() major and minor was swapped
---
dracut-functions | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dracut-functions b/dracut-functions
index 3852478..e04b16d 100755
--- a/dracut-functions
+++ b/dracut-functions
@@ -180,7 +180,7 @@ get_fs_uuid() (
get_maj_min() {
local _dev
- _dev=$(stat -L -c '$((0x%T)):$((0x%t))' "$1" 2>/dev/null)
+ _dev=$(stat -L -c '$((0x%t)):$((0x%T))' "$1" 2>/dev/null)
_dev=$(eval "echo $_dev")
echo $_dev
}

View File

@ -1,23 +0,0 @@
From 5f282199c8362abce7e06adde909a24a47181008 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Mon, 23 Jan 2012 13:50:27 +0100
Subject: [PATCH] 90crypt/module-setup.sh: prepend "luks-" to hostonly cmdline
file
---
modules.d/90crypt/module-setup.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/modules.d/90crypt/module-setup.sh b/modules.d/90crypt/module-setup.sh
index a92c187..9dc55f5 100755
--- a/modules.d/90crypt/module-setup.sh
+++ b/modules.d/90crypt/module-setup.sh
@@ -20,7 +20,7 @@ check() {
break
done)
[[ ${ID_FS_UUID} ]] || continue
- echo " rd.luks.uuid=${ID_FS_UUID} " >> "${initdir}/etc/cmdline.d/90crypt.conf"
+ echo " rd.luks.uuid=luks-${ID_FS_UUID} " >> "${initdir}/etc/cmdline.d/90crypt.conf"
}
[[ $hostonly ]] || [[ $mount_needs ]] && {

View File

@ -1,33 +0,0 @@
From ba7fa583bf7fdc548e961f23d2801cb4e7d50aba Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Mon, 23 Jan 2012 16:08:46 +0100
Subject: [PATCH] 99base/init: remove tmpfs on /dev
tmpfs on /dev is not supported anymore and devtmpfs is supported in
kernels for a long time.
---
modules.d/99base/init | 11 +----------
1 files changed, 1 insertions(+), 10 deletions(-)
diff --git a/modules.d/99base/init b/modules.d/99base/init
index 33a7379..abfa3c5 100755
--- a/modules.d/99base/init
+++ b/modules.d/99base/init
@@ -110,16 +110,7 @@ if [ "$RD_DEBUG" = "yes" ]; then
fi
if ! ismounted /dev; then
- # try to mount devtmpfs
- if ! mount -t devtmpfs -o mode=0755,nosuid devtmpfs /dev >/dev/null 2>&1; then
- # if it failed fall back to normal tmpfs
- mount -t tmpfs -o mode=0755,nosuid tmpfs /dev >/dev/null 2>&1
- # Make some basic devices first, let udev handle the rest
- mknod -m 0666 /dev/null c 1 3
- mknod -m 0666 /dev/ptmx c 5 2
- mknod -m 0600 /dev/console c 5 1
- mknod -m 0660 /dev/kmsg c 1 11
- fi
+ mount -t devtmpfs -o mode=0755,nosuid devtmpfs /dev >/dev/null 2>&1
fi
# prepare the /dev directory

View File

@ -1,26 +0,0 @@
From a2a74022e2db0cc44ab68a846c3acafd9df1d971 Mon Sep 17 00:00:00 2001
From: Will Woods <wwoods@redhat.com>
Date: Tue, 24 Jan 2012 13:09:34 -0500
Subject: [PATCH] netroot: actually run netroot hooks
The line "source_all netroot" was trying to source netroot hooks from
/netroot, which doesn't exist, so netroot hooks were never executed.
Signed-off-by: Will Woods <wwoods@redhat.com>
---
modules.d/40network/netroot | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/modules.d/40network/netroot b/modules.d/40network/netroot
index 9d996cc..bda34df 100755
--- a/modules.d/40network/netroot
+++ b/modules.d/40network/netroot
@@ -123,7 +123,7 @@ if [ -n "$dest" ] && ! arping -q -f -w 60 -I $netif $dest ; then
fi
# Source netroot hooks before we start the handler
-source_all netroot
+source_all $hookdir/netroot
# Run the handler; don't store the root, it may change from device to device
# XXX other variables to export?

View File

@ -1,51 +0,0 @@
From 7f347723d88ffe8a942bbc445a00defa3f06f4e5 Mon Sep 17 00:00:00 2001
From: Cong Wang <xiyou.wangcong@gmail.com>
Date: Wed, 25 Jan 2012 09:04:17 +0800
Subject: [PATCH] let some modules to respect $mount_needs
Cc: Harald Hoyer <harald@redhat.com>
Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
---
modules.d/95iscsi/module-setup.sh | 2 +-
modules.d/95nbd/module-setup.sh | 2 +-
modules.d/95ssh-client/module-setup.sh | 1 +
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh
index 5738941..d645dba 100755
--- a/modules.d/95iscsi/module-setup.sh
+++ b/modules.d/95iscsi/module-setup.sh
@@ -23,7 +23,7 @@ check() {
[[ -d iscsi_session ]]
)
- [[ $hostonly ]] && {
+ [[ $hostonly ]] || [[ $mount_needs ]] && {
_rootdev=$(find_root_block_device)
if [[ $_rootdev ]]; then
# root lives on a block device, so we can be more precise about
diff --git a/modules.d/95nbd/module-setup.sh b/modules.d/95nbd/module-setup.sh
index 793687d..a6f812f 100755
--- a/modules.d/95nbd/module-setup.sh
+++ b/modules.d/95nbd/module-setup.sh
@@ -9,7 +9,7 @@ check() {
# if an nbd device is not somewhere in the chain of devices root is
# mounted on, fail the hostonly check.
- [[ $hostonly ]] && {
+ [[ $hostonly ]] || [[ $mount_needs ]] && {
is_nbd() { [[ -b /dev/block/$1 && $1 == 43:* ]] ;}
. $dracutfunctions
diff --git a/modules.d/95ssh-client/module-setup.sh b/modules.d/95ssh-client/module-setup.sh
index 0ffc298..3b84900 100644
--- a/modules.d/95ssh-client/module-setup.sh
+++ b/modules.d/95ssh-client/module-setup.sh
@@ -8,6 +8,7 @@ check() {
# If our prerequisites are not met, fail.
type -P ssh >/dev/null || return 1
type -P scp >/dev/null || return 1
+ [[ $mount_needs ]] && return 1
if [[ $sshkey ]]; then
[ ! -f $sshkey ] && {
derror "sshkey is not found!"

View File

@ -1,27 +0,0 @@
From 92dc0adca2eaeedf6937dc9c6897a07dc1939223 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Wed, 25 Jan 2012 09:59:12 +0100
Subject: [PATCH] 95ssh-client/module-setup.sh: spell corrections
---
modules.d/95ssh-client/module-setup.sh | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules.d/95ssh-client/module-setup.sh b/modules.d/95ssh-client/module-setup.sh
index 3b84900..3aa9bd2 100644
--- a/modules.d/95ssh-client/module-setup.sh
+++ b/modules.d/95ssh-client/module-setup.sh
@@ -15,11 +15,11 @@ check() {
return 1
}
[[ ! $cttyhack = yes ]] && {
- dinfo "--ctty is not used, you should make sure the machine is knowhost and copy the sshkey to remote machine!"
+ dinfo "--ctty is not used, you should make sure the machine is a knownhost and copy the sshkey to remote machine!"
}
else
[[ ! $cttyhack = yes ]] && {
- derror "ssh interactive mode need option --ctty!"
+ derror "ssh interactive mode needs option --ctty!"
return 1
}
fi

View File

@ -1,54 +0,0 @@
From 38164332e198f7cc8f339b42d555796918de04b3 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Wed, 25 Jan 2012 10:02:29 +0100
Subject: [PATCH] 95ssh-client/module-setup.sh: do not install ssh-client by
default
Do not install ssh-client by default and report the missing ctty in the
install section.
---
modules.d/95ssh-client/module-setup.sh | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/modules.d/95ssh-client/module-setup.sh b/modules.d/95ssh-client/module-setup.sh
index 3aa9bd2..4410e4e 100644
--- a/modules.d/95ssh-client/module-setup.sh
+++ b/modules.d/95ssh-client/module-setup.sh
@@ -9,22 +9,18 @@ check() {
type -P ssh >/dev/null || return 1
type -P scp >/dev/null || return 1
[[ $mount_needs ]] && return 1
+
if [[ $sshkey ]]; then
[ ! -f $sshkey ] && {
- derror "sshkey is not found!"
+ derror "ssh key: $sshkey is not found!"
return 1
}
[[ ! $cttyhack = yes ]] && {
dinfo "--ctty is not used, you should make sure the machine is a knownhost and copy the sshkey to remote machine!"
}
- else
- [[ ! $cttyhack = yes ]] && {
- derror "ssh interactive mode needs option --ctty!"
- return 1
- }
fi
- return 0
+ return 255
}
depends() {
@@ -54,6 +50,11 @@ inst_sshenv()
}
install() {
+ [[ ! $cttyhack = yes ]] && {
+ derror "ssh interactive mode needs option --ctty!"
+ return 1
+ }
+
inst ssh
inst scp
inst_sshenv

View File

@ -1,224 +0,0 @@
From ae8b82e395c9530a66288f7a9e939242137d3f56 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 26 Jan 2012 11:33:51 +0100
Subject: [PATCH] add usrmove module
---
dracut.spec | 1 +
modules.d/30usrmove/do-usrmove.sh | 7 ++
modules.d/30usrmove/module-setup.sh | 19 ++++
modules.d/30usrmove/usrmove-convert.sh | 153 ++++++++++++++++++++++++++++++++
4 files changed, 180 insertions(+), 0 deletions(-)
create mode 100755 modules.d/30usrmove/do-usrmove.sh
create mode 100755 modules.d/30usrmove/module-setup.sh
create mode 100755 modules.d/30usrmove/usrmove-convert.sh
diff --git a/dracut.spec b/dracut.spec
index 16c8aa3..06533e3 100644
--- a/dracut.spec
+++ b/dracut.spec
@@ -226,6 +226,7 @@ rm -rf $RPM_BUILD_ROOT
%{dracutlibdir}/modules.d/05busybox
%{dracutlibdir}/modules.d/10i18n
%{dracutlibdir}/modules.d/10rpmversion
+%{dracutlibdir}/modules.d/30usrmove
%{dracutlibdir}/modules.d/50plymouth
%{dracutlibdir}/modules.d/90btrfs
%{dracutlibdir}/modules.d/90crypt
diff --git a/modules.d/30usrmove/do-usrmove.sh b/modules.d/30usrmove/do-usrmove.sh
new file mode 100755
index 0000000..8bdf5ab
--- /dev/null
+++ b/modules.d/30usrmove/do-usrmove.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
+# ex: ts=8 sw=4 sts=4 et filetype=sh
+
+if getargbool 0 rd.usrmove; then
+ usrmove-convert "$NEWROOT" 2>&1 | vinfo
+fi
diff --git a/modules.d/30usrmove/module-setup.sh b/modules.d/30usrmove/module-setup.sh
new file mode 100755
index 0000000..05b2366
--- /dev/null
+++ b/modules.d/30usrmove/module-setup.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
+# ex: ts=8 sw=4 sts=4 et filetype=sh
+
+check() {
+ [[ $mount_needs ]] && return 1
+ return 255
+}
+
+depends() {
+ return 0
+}
+
+install() {
+ dracut_install bash
+ inst_hook pre-pivot 99 "$moddir/do-usrmove.sh"
+ inst "$moddir/usrmove-convert.sh" /usr/bin/usrmove-convert
+}
+
diff --git a/modules.d/30usrmove/usrmove-convert.sh b/modules.d/30usrmove/usrmove-convert.sh
new file mode 100755
index 0000000..3295074
--- /dev/null
+++ b/modules.d/30usrmove/usrmove-convert.sh
@@ -0,0 +1,153 @@
+#!/bin/bash
+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
+# ex: ts=8 sw=4 sts=4 et filetype=sh
+
+set -x
+
+ROOT="$1"
+
+if [[ ! -d "$ROOT" ]]; then
+ echo "Usage: $0 <rootdir>"
+ exit 1
+fi
+
+if [[ "$ROOT" -ef / ]]; then
+ echo "Can't convert the running system."
+ echo "Please boot with 'usrmove' on the kernel command line,"
+ echo "to update with the help of the initramfs,"
+ echo "or run this script from a rescue system."
+ exit 1
+fi
+
+while [[ "$ROOT" != "${ROOT%/}" ]]; do
+ ROOT=${ROOT%/}
+done
+
+needconvert() {
+ for dir in "$ROOT/bin" "$ROOT/sbin" "$ROOT/lib" "$ROOT/lib64"; do
+ if [[ -e "$dir" ]]; then
+ [[ -L "$dir" ]] || return 0
+ fi
+ done
+ return 1
+}
+
+if ! needconvert; then
+ echo "Your system is already converted."
+ exit 0
+fi
+
+testfile="$ROOT/.usrmovecheck$$"
+rm -f "$testfile"
+> "$testfile"
+if [[ ! -e "$testfile" ]]; then
+ echo "Cannot write to $ROOT/"
+ exit 1
+fi
+rm -f "$testfile"
+
+testfile="$ROOT/usr/.usrmovecheck$$"
+rm -f "$testfile"
+> "$testfile"
+if [[ ! -e "$testfile" ]]; then
+ echo "Cannot write to $ROOT/usr/"
+ exit 1
+fi
+rm -f "$testfile"
+
+ismounted() {
+ while read a m a; do
+ [[ "$m" = "$1" ]] && return 0
+ done < /proc/mounts
+ return 1
+}
+
+# clean up after ourselves no matter how we die.
+cleanup() {
+ echo "Something failed. Move back to the original state"
+ for dir in "$ROOT/bin" "$ROOT/sbin" "$ROOT/lib" "$ROOT/lib64" \
+ "$ROOT/usr/bin" "$ROOT/usr/sbin" "$ROOT/usr/lib" \
+ "$ROOT/usr/lib64"; do
+ [[ -d "${dir}.usrmove-new" ]] && rm -fr "${dir}.usrmove-new"
+ if [[ -d "${dir}.usrmove-old" ]]; then
+ mv "$dir" "${dir}.del~"
+ mv "${dir}.usrmove-old" "$dir"
+ rm -fr "${dir}.del~"
+ fi
+ done
+}
+
+trap 'ret=$?; [[ $ret -ne 0 ]] && cleanup;exit $ret;' EXIT
+trap 'exit 1;' SIGINT
+
+ismounted "$ROOT/usr" || CP_HARDLINK="-l"
+
+set -e
+
+# merge / and /usr in new dir in /usr
+for dir in bin sbin lib lib64; do
+ rm -rf "$ROOT/usr/${dir}.usrmove-new"
+ [[ -L "$ROOT/$dir" ]] && continue
+ [[ -d "$ROOT/$dir" ]] || continue
+ echo "Make a copy of \`$ROOT/usr/$dir'."
+ [[ -d "$ROOT/usr/$dir" ]] \
+ && cp -ax $CP_HARDLINK "$ROOT/usr/$dir" "$ROOT/usr/${dir}.usrmove-new"
+ echo "Merge the copy with \`$ROOT/$dir'."
+ [[ -d "$ROOT/usr/${dir}.usrmove-new" ]] \
+ || mkdir -p "$ROOT/usr/${dir}.usrmove-new"
+ cp -axT $CP_HARDLINK --backup --suffix=.usrmove~ "$ROOT/$dir" "$ROOT/usr/${dir}.usrmove-new"
+ echo "Clean up duplicates in \`$ROOT/usr/$dir'."
+ # delete all symlinks that have been backed up
+ find "$ROOT/usr/${dir}.usrmove-new" -type l -name '*.usrmove~' -delete || :
+ # replace symlink with backed up binary
+ find "$ROOT/usr/${dir}.usrmove-new" \
+ -name '*.usrmove~' \
+ -type f \
+ -exec bash -c 'p="{}";o=${p%%%%.usrmove~};
+ [[ -L "$o" ]] && mv -f "$p" "$o"' ';' || :
+done
+# switch over merged dirs in /usr
+for dir in bin sbin lib lib64; do
+ [[ -d "$ROOT/usr/${dir}.usrmove-new" ]] || continue
+ echo "Switch to new \`$ROOT/usr/$dir'."
+ rm -fr "$ROOT/usr/${dir}.usrmove-old"
+ mv "$ROOT/usr/$dir" "$ROOT/usr/${dir}.usrmove-old"
+ mv "$ROOT/usr/${dir}.usrmove-new" "$ROOT/usr/$dir"
+done
+
+# replace dirs in / with links to /usr
+for dir in bin sbin lib lib64; do
+ [[ -L "$ROOT/$dir" ]] && continue
+ [[ -d "$ROOT/$dir" ]] || continue
+ echo "Create \`$ROOT/$dir' symlink."
+ rm -rf "$ROOT/${dir}.usrmove-old" || :
+ mv "$ROOT/$dir" "$ROOT/${dir}.usrmove-old"
+ ln -sfn usr/$dir "$ROOT/$dir"
+done
+
+echo "Clean up backup files."
+# everything seems to work; cleanup
+for dir in bin sbin lib lib64; do
+ # if we get killed in the middle of "rm -rf", ensure not to leave
+ # an incomplete directory, which is moved back by cleanup()
+ [[ -d "$ROOT/usr/${dir}.usrmove-old" ]] \
+ && mv "$ROOT/usr/${dir}.usrmove-old" "$ROOT/usr/${dir}.usrmove-old~"
+ [[ -d "$ROOT/${dir}.usrmove-old" ]] \
+ && mv "$ROOT/${dir}.usrmove-old" "$ROOT/${dir}.usrmove-old~"
+done
+
+for dir in bin sbin lib lib64; do
+ [[ -d "$ROOT/usr/${dir}.usrmove-old~" ]] \
+ && rm -rf "$ROOT/usr/${dir}.usrmove-old~" || :
+ [[ -d "$ROOT/${dir}.usrmove-old~" ]] \
+ && rm -rf "$ROOT/${dir}.usrmove-old~" || :
+done
+
+set +e
+
+echo "Run ldconfig."
+ldconfig -r "$ROOT"
+echo "Set autorelabel flag."
+> "$ROOT/.autorelabel"
+echo "Done."
+exit 0

View File

@ -1,39 +0,0 @@
From 4cbc0c79ac19d021f6f884a779c19c05fd9e5a20 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 26 Jan 2012 12:41:03 +0100
Subject: [PATCH] dracut.spec: add compat symlinks to /sbin
---
dracut.spec | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/dracut.spec b/dracut.spec
index 06533e3..4eb3ba3 100644
--- a/dracut.spec
+++ b/dracut.spec
@@ -197,13 +197,25 @@ rm $RPM_BUILD_ROOT%{_bindir}/lsinitrd
mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
install -m 0644 dracut.logrotate $RPM_BUILD_ROOT/etc/logrotate.d/dracut_log
+# create the ghosts
+mkdir -p $RPM_BUILD_ROOT%{_sbindir} $RPM_BUILD_ROOT/sbin
+ln -s ../bin/dracut $RPM_BUILD_ROOT%{_sbindir}/dracut
+ln -s ../usr/bin/dracut $RPM_BUILD_ROOT/sbin/dracut
+
%clean
rm -rf $RPM_BUILD_ROOT
+%post -p <lua>
+posix.symlink("../bin/dracut", "%{_sbindir}/dracut")
+posix.symlink("../usr/bin/dracut", "/sbin/dracut")
+return 0
+
%files
%defattr(-,root,root,0755)
%doc README HACKING TODO COPYING AUTHORS NEWS dracut.html dracut.png dracut.svg
%{_bindir}/dracut
+%ghost /sbin/dracut
+%ghost %{_sbindir}/dracut
%if 0%{?fedora} > 12 || 0%{?rhel} >= 6 || 0%{?suse_version} > 9999
%{_bindir}/mkinitrd
%{_bindir}/lsinitrd

View File

@ -1,52 +0,0 @@
From 6334ffdbb0ff898667287df56f63a9d1b647ba19 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 26 Jan 2012 13:55:50 +0100
Subject: [PATCH] usrmove: install missing binaries and "set -x" only for
rd.debug
---
modules.d/30usrmove/do-usrmove.sh | 6 +++++-
modules.d/30usrmove/module-setup.sh | 1 +
modules.d/30usrmove/usrmove-convert.sh | 2 --
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/modules.d/30usrmove/do-usrmove.sh b/modules.d/30usrmove/do-usrmove.sh
index 8bdf5ab..6596a68 100755
--- a/modules.d/30usrmove/do-usrmove.sh
+++ b/modules.d/30usrmove/do-usrmove.sh
@@ -3,5 +3,9 @@
# ex: ts=8 sw=4 sts=4 et filetype=sh
if getargbool 0 rd.usrmove; then
- usrmove-convert "$NEWROOT" 2>&1 | vinfo
+ if getargbool 0 rd.debug; then
+ bash -x usrmove-convert "$NEWROOT" 2>&1 | vinfo
+ else
+ usrmove-convert "$NEWROOT" 2>&1 | vinfo
+ fi
fi
diff --git a/modules.d/30usrmove/module-setup.sh b/modules.d/30usrmove/module-setup.sh
index 05b2366..04b44ca 100755
--- a/modules.d/30usrmove/module-setup.sh
+++ b/modules.d/30usrmove/module-setup.sh
@@ -13,6 +13,7 @@ depends() {
install() {
dracut_install bash
+ dracut_install find ldconfig mv rm cp ln
inst_hook pre-pivot 99 "$moddir/do-usrmove.sh"
inst "$moddir/usrmove-convert.sh" /usr/bin/usrmove-convert
}
diff --git a/modules.d/30usrmove/usrmove-convert.sh b/modules.d/30usrmove/usrmove-convert.sh
index 3295074..8a623b3 100755
--- a/modules.d/30usrmove/usrmove-convert.sh
+++ b/modules.d/30usrmove/usrmove-convert.sh
@@ -2,8 +2,6 @@
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
-set -x
-
ROOT="$1"
if [[ ! -d "$ROOT" ]]; then

View File

@ -1,30 +0,0 @@
From 5ebad51b8461d501613f86bcc46fdda4eddbdaf9 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 26 Jan 2012 15:37:50 +0100
Subject: [PATCH] 30usrmove/usrmove-convert.sh: rename duplicate libraries
ldconfig does not ignore the duplicate leftover libs with a .usrmove~
suffix, so we rename ".so" to "_so".
---
modules.d/30usrmove/usrmove-convert.sh | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/modules.d/30usrmove/usrmove-convert.sh b/modules.d/30usrmove/usrmove-convert.sh
index 8a623b3..cb93993 100755
--- a/modules.d/30usrmove/usrmove-convert.sh
+++ b/modules.d/30usrmove/usrmove-convert.sh
@@ -141,6 +141,14 @@ for dir in bin sbin lib lib64; do
&& rm -rf "$ROOT/${dir}.usrmove-old~" || :
done
+for dir in lib lib64; do
+ [[ -d "$ROOT/$dir" ]] || continue
+ for lib in "$ROOT"/usr/${dir}/lib*.so*.usrmove~; do
+ [[ -f $lib ]] || continue
+ mv $lib ${lib/.so/_so}
+ done
+done
+
set +e
echo "Run ldconfig."

View File

@ -1,44 +0,0 @@
From e4d85a77aad660b7877a3af091921e73865bfce6 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 26 Jan 2012 16:39:09 +0100
Subject: [PATCH] dracut.spec: create compat symlink, instead of %ghost
---
dracut.spec | 16 +++++-----------
1 files changed, 5 insertions(+), 11 deletions(-)
diff --git a/dracut.spec b/dracut.spec
index 4eb3ba3..10556d0 100644
--- a/dracut.spec
+++ b/dracut.spec
@@ -197,25 +197,19 @@ rm $RPM_BUILD_ROOT%{_bindir}/lsinitrd
mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
install -m 0644 dracut.logrotate $RPM_BUILD_ROOT/etc/logrotate.d/dracut_log
-# create the ghosts
-mkdir -p $RPM_BUILD_ROOT%{_sbindir} $RPM_BUILD_ROOT/sbin
-ln -s ../bin/dracut $RPM_BUILD_ROOT%{_sbindir}/dracut
-ln -s ../usr/bin/dracut $RPM_BUILD_ROOT/sbin/dracut
+# create compat symlink
+mkdir -p $RPM_BUILD_ROOT/sbin
+ln -s /usr/bin/dracut $RPM_BUILD_ROOT/sbin/dracut
%clean
rm -rf $RPM_BUILD_ROOT
-%post -p <lua>
-posix.symlink("../bin/dracut", "%{_sbindir}/dracut")
-posix.symlink("../usr/bin/dracut", "/sbin/dracut")
-return 0
-
%files
%defattr(-,root,root,0755)
%doc README HACKING TODO COPYING AUTHORS NEWS dracut.html dracut.png dracut.svg
%{_bindir}/dracut
-%ghost /sbin/dracut
-%ghost %{_sbindir}/dracut
+# compat symlink
+/sbin/dracut
%if 0%{?fedora} > 12 || 0%{?rhel} >= 6 || 0%{?suse_version} > 9999
%{_bindir}/mkinitrd
%{_bindir}/lsinitrd

View File

@ -1,55 +0,0 @@
From c416b1de5a54ea83d29d99261324d8a4a403bc64 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 26 Jan 2012 17:30:06 +0100
Subject: [PATCH] fix kernel modules search for s390
find_kernel_modules_by_path only takes one parameter
fixes c254ac796fe52d19ad47df99055cd58fee5e517e
and 4fcd5409e09e693349e991bd2a78303114a735f5
---
modules.d/40network/module-setup.sh | 3 ++-
modules.d/90multipath/module-setup.sh | 2 +-
modules.d/95iscsi/module-setup.sh | 2 +-
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh
index 9017413..384baf1 100755
--- a/modules.d/40network/module-setup.sh
+++ b/modules.d/40network/module-setup.sh
@@ -58,7 +58,8 @@ installkernel() {
[[ $debug ]] && set -x
}
- find_kernel_modules_by_path drivers/net drivers/s390/net | net_module_filter | instmods
+ { find_kernel_modules_by_path drivers/net; find_kernel_modules_by_path drivers/s390/net } \
+ | net_module_filter | instmods
instmods ecb arc4
# bridge modules
diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh
index f3b40bc..b78c005 100755
--- a/modules.d/90multipath/module-setup.sh
+++ b/modules.d/90multipath/module-setup.sh
@@ -45,7 +45,7 @@ installkernel() {
done
}
- ( find_kernel_modules_by_path drivers/scsi drivers/s390/scsi ;
+ ( find_kernel_modules_by_path drivers/scsi; find_kernel_modules_by_path drivers/s390/scsi ;
find_kernel_modules_by_path drivers/md ) | mp_mod_filter | instmods
[[ $debug ]] && set -x
}
diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh
index d645dba..4b7e292 100755
--- a/modules.d/95iscsi/module-setup.sh
+++ b/modules.d/95iscsi/module-setup.sh
@@ -52,7 +52,7 @@ installkernel() {
esac
done
}
- find_kernel_modules_by_path drivers/scsi drivers/s390/scsi \
+ { find_kernel_modules_by_path drivers/scsi; find_kernel_modules_by_path drivers/s390/scsi } \
| iscsi_module_filter | instmods
}

View File

@ -1,37 +0,0 @@
From e684ee786a291cac8d443094817e4246c0ce31a6 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 26 Jan 2012 18:08:46 +0100
Subject: [PATCH] fix kernel modules search for s390
forgot last ; in {}
---
modules.d/40network/module-setup.sh | 2 +-
modules.d/95iscsi/module-setup.sh | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh
index 384baf1..ef7818a 100755
--- a/modules.d/40network/module-setup.sh
+++ b/modules.d/40network/module-setup.sh
@@ -58,7 +58,7 @@ installkernel() {
[[ $debug ]] && set -x
}
- { find_kernel_modules_by_path drivers/net; find_kernel_modules_by_path drivers/s390/net } \
+ { find_kernel_modules_by_path drivers/net; find_kernel_modules_by_path drivers/s390/net; } \
| net_module_filter | instmods
instmods ecb arc4
diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh
index 4b7e292..078682c 100755
--- a/modules.d/95iscsi/module-setup.sh
+++ b/modules.d/95iscsi/module-setup.sh
@@ -52,7 +52,7 @@ installkernel() {
esac
done
}
- { find_kernel_modules_by_path drivers/scsi; find_kernel_modules_by_path drivers/s390/scsi } \
+ { find_kernel_modules_by_path drivers/scsi; find_kernel_modules_by_path drivers/s390/scsi; } \
| iscsi_module_filter | instmods
}

View File

@ -1,24 +0,0 @@
From fe51c4ab3c5e153b6d2e56873c7e64a8818df056 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Mon, 30 Jan 2012 14:06:39 +0100
Subject: [PATCH] 30usrmove/usrmove-convert.sh: do not force selinux
autorelabel
---
modules.d/30usrmove/usrmove-convert.sh | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules.d/30usrmove/usrmove-convert.sh b/modules.d/30usrmove/usrmove-convert.sh
index cb93993..8aa8588 100755
--- a/modules.d/30usrmove/usrmove-convert.sh
+++ b/modules.d/30usrmove/usrmove-convert.sh
@@ -153,7 +153,7 @@ set +e
echo "Run ldconfig."
ldconfig -r "$ROOT"
-echo "Set autorelabel flag."
-> "$ROOT/.autorelabel"
+#echo "Set autorelabel flag."
+#> "$ROOT/.autorelabel"
echo "Done."
exit 0

View File

@ -1,38 +0,0 @@
From dfbb922ddbeceb90f09e4fe20e86a02be7d58fbc Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 2 Feb 2012 18:25:49 +0100
Subject: [PATCH] dracut-functions: install nosegneg libs additionally to
standard ones
---
dracut-functions | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/dracut-functions b/dracut-functions
index e04b16d..b6ac9ac 100755
--- a/dracut-functions
+++ b/dracut-functions
@@ -464,18 +464,16 @@ inst_binary() {
# See if we are loading an optimized version of a shared lib.
if [[ $_file =~ $_lib_regex ]]; then
- _tlibdir=${BASH_REMATCH[1]}
- _base=${_file##*/}
- # Prefer nosegneg libs to unoptimized ones.
+ _tlibdir=${BASH_REMATCH[1]}
+ _base=${_file##*/}
+ # Prefer nosegneg libs to unoptimized ones.
for _f in "$_tlibdir/i686/nosegneg" "$_tlibdir"; do
[[ -e $_f/$_base ]] || continue
- _file=$_f/$_base
+ inst_library $_f/$_base
break
done
- inst_library "$_file" "$_tlibdir/$_base"
- else
- inst_library "$_file"
fi
+ inst_library "$_file"
done
# Install the binary if it wasn't handled in the above loop.

View File

@ -1,453 +0,0 @@
From 2cf328ad0ae7fb5ee7de8fac5652e4cd58adca1a Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 2 Feb 2012 18:50:26 +0100
Subject: [PATCH] renamed usrmove to convertfs
---
modules.d/30convertfs/convertfs.sh | 176 ++++++++++++++++++++++++++++++++
modules.d/30convertfs/do-convertfs.sh | 11 ++
modules.d/30convertfs/module-setup.sh | 20 ++++
modules.d/30usrmove/do-usrmove.sh | 11 --
modules.d/30usrmove/module-setup.sh | 20 ----
modules.d/30usrmove/usrmove-convert.sh | 159 ----------------------------
6 files changed, 207 insertions(+), 190 deletions(-)
create mode 100755 modules.d/30convertfs/convertfs.sh
create mode 100755 modules.d/30convertfs/do-convertfs.sh
create mode 100755 modules.d/30convertfs/module-setup.sh
delete mode 100755 modules.d/30usrmove/do-usrmove.sh
delete mode 100755 modules.d/30usrmove/module-setup.sh
delete mode 100755 modules.d/30usrmove/usrmove-convert.sh
diff --git a/modules.d/30convertfs/convertfs.sh b/modules.d/30convertfs/convertfs.sh
new file mode 100755
index 0000000..6c76a4c
--- /dev/null
+++ b/modules.d/30convertfs/convertfs.sh
@@ -0,0 +1,176 @@
+#!/bin/bash
+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
+# ex: ts=8 sw=4 sts=4 et filetype=sh
+
+ROOT="$1"
+
+if [[ ! -d "$ROOT" ]]; then
+ echo "Usage: $0 <rootdir>"
+ exit 1
+fi
+
+if [[ "$ROOT" -ef / ]]; then
+ echo "Can't convert the running system."
+ echo "Please boot with 'rd.convertfs' on the kernel command line,"
+ echo "to update with the help of the initramfs,"
+ echo "or run this script from a rescue system."
+ exit 1
+fi
+
+while [[ "$ROOT" != "${ROOT%/}" ]]; do
+ ROOT=${ROOT%/}
+done
+
+needconvert() {
+ for dir in "$ROOT/bin" "$ROOT/sbin" "$ROOT/lib" "$ROOT/lib64"; do
+ if [[ -e "$dir" ]]; then
+ [[ -L "$dir" ]] || return 0
+ fi
+ done
+ return 1
+}
+
+if ! needconvert; then
+ echo "Your system is already converted."
+ exit 0
+fi
+
+testfile="$ROOT/.usrmovecheck$$"
+rm -f "$testfile"
+> "$testfile"
+if [[ ! -e "$testfile" ]]; then
+ echo "Cannot write to $ROOT/"
+ exit 1
+fi
+rm -f "$testfile"
+
+testfile="$ROOT/usr/.usrmovecheck$$"
+rm -f "$testfile"
+> "$testfile"
+if [[ ! -e "$testfile" ]]; then
+ echo "Cannot write to $ROOT/usr/"
+ exit 1
+fi
+rm -f "$testfile"
+
+ismounted() {
+ while read a m a; do
+ [[ "$m" = "$1" ]] && return 0
+ done < /proc/mounts
+ return 1
+}
+
+# clean up after ourselves no matter how we die.
+cleanup() {
+ echo "Something failed. Move back to the original state"
+ for dir in "$ROOT/bin" "$ROOT/sbin" "$ROOT/lib" "$ROOT/lib64" \
+ "$ROOT/usr/bin" "$ROOT/usr/sbin" "$ROOT/usr/lib" \
+ "$ROOT/usr/lib64"; do
+ [[ -d "${dir}.usrmove-new" ]] && rm -fr "${dir}.usrmove-new"
+ if [[ -d "${dir}.usrmove-old" ]]; then
+ mv "$dir" "${dir}.del~"
+ mv "${dir}.usrmove-old" "$dir"
+ rm -fr "${dir}.del~"
+ fi
+ done
+}
+
+trap 'ret=$?; [[ $ret -ne 0 ]] && cleanup;exit $ret;' EXIT
+trap 'exit 1;' SIGINT
+
+ismounted "$ROOT/usr" || CP_HARDLINK="-l"
+
+set -e
+
+# merge / and /usr in new dir in /usr
+for dir in bin sbin lib lib64; do
+ rm -rf "$ROOT/usr/${dir}.usrmove-new"
+ [[ -L "$ROOT/$dir" ]] && continue
+ [[ -d "$ROOT/$dir" ]] || continue
+ echo "Make a copy of \`$ROOT/usr/$dir'."
+ [[ -d "$ROOT/usr/$dir" ]] \
+ && cp -ax $CP_HARDLINK "$ROOT/usr/$dir" "$ROOT/usr/${dir}.usrmove-new"
+ echo "Merge the copy with \`$ROOT/$dir'."
+ [[ -d "$ROOT/usr/${dir}.usrmove-new" ]] \
+ || mkdir -p "$ROOT/usr/${dir}.usrmove-new"
+ cp -axT $CP_HARDLINK --backup --suffix=.usrmove~ "$ROOT/$dir" "$ROOT/usr/${dir}.usrmove-new"
+ echo "Clean up duplicates in \`$ROOT/usr/$dir'."
+ # delete all symlinks that have been backed up
+ find "$ROOT/usr/${dir}.usrmove-new" -type l -name '*.usrmove~' -delete || :
+ # replace symlink with backed up binary
+ find "$ROOT/usr/${dir}.usrmove-new" \
+ -name '*.usrmove~' \
+ -type f \
+ -exec bash -c 'p="{}";o=${p%%%%.usrmove~};
+ [[ -L "$o" ]] && mv -f "$p" "$o"' ';' || :
+done
+# switch over merged dirs in /usr
+for dir in bin sbin lib lib64; do
+ [[ -d "$ROOT/usr/${dir}.usrmove-new" ]] || continue
+ echo "Switch to new \`$ROOT/usr/$dir'."
+ rm -fr "$ROOT/usr/${dir}.usrmove-old"
+ mv "$ROOT/usr/$dir" "$ROOT/usr/${dir}.usrmove-old"
+ mv "$ROOT/usr/${dir}.usrmove-new" "$ROOT/usr/$dir"
+done
+
+# replace dirs in / with links to /usr
+for dir in bin sbin lib lib64; do
+ [[ -L "$ROOT/$dir" ]] && continue
+ [[ -d "$ROOT/$dir" ]] || continue
+ echo "Create \`$ROOT/$dir' symlink."
+ rm -rf "$ROOT/${dir}.usrmove-old" || :
+ mv "$ROOT/$dir" "$ROOT/${dir}.usrmove-old"
+ ln -sfn usr/$dir "$ROOT/$dir"
+done
+
+echo "Clean up backup files."
+# everything seems to work; cleanup
+for dir in bin sbin lib lib64; do
+ # if we get killed in the middle of "rm -rf", ensure not to leave
+ # an incomplete directory, which is moved back by cleanup()
+ [[ -d "$ROOT/usr/${dir}.usrmove-old" ]] \
+ && mv "$ROOT/usr/${dir}.usrmove-old" "$ROOT/usr/${dir}.usrmove-old~"
+ [[ -d "$ROOT/${dir}.usrmove-old" ]] \
+ && mv "$ROOT/${dir}.usrmove-old" "$ROOT/${dir}.usrmove-old~"
+done
+
+for dir in bin sbin lib lib64; do
+ [[ -d "$ROOT/usr/${dir}.usrmove-old~" ]] \
+ && rm -rf "$ROOT/usr/${dir}.usrmove-old~" || :
+ [[ -d "$ROOT/${dir}.usrmove-old~" ]] \
+ && rm -rf "$ROOT/${dir}.usrmove-old~" || :
+done
+
+for dir in lib lib64; do
+ [[ -d "$ROOT/$dir" ]] || continue
+ for lib in "$ROOT"/usr/${dir}/lib*.so*.usrmove~; do
+ [[ -f $lib ]] || continue
+ mv $lib ${lib/.so/_so}
+ done
+done
+
+set +e
+
+echo "Run ldconfig."
+ldconfig -r "$ROOT"
+
+. $ROOT/etc/selinux/config
+if [ "$SELINUX" != "disabled" ] && [ -f /etc/selinux/${SELINUXTYPE}/contexts/files/file_contexts ]; then
+ echo "Fixing SELinux labels"
+ /usr/sbin/setfiles -r $ROOT -p /etc/selinux/${SELINUXTYPE}/contexts/files/file_contexts $ROOT/sbin $ROOT/bin $ROOT/lib $ROOT/lib64 $ROOT/usr/lib $ROOT/usr/lib64 $ROOT/etc/ld.so.cache $ROOT/var/cache/ldconfig || :
+fi
+
+if [ -d $ROOT/var/run ]; then
+ echo "Converting /var/run to symlink"
+ mv -f $ROOT/var/run $ROOT/var/run.runmove~
+ ln -sfn ../run $ROOT/var/run
+fi
+
+if [ -d $ROOT/var/lock ]; then
+ echo "Converting /var/lock to symlink"
+ mv -f $ROOT/var/lock $ROOT/var/lock.lockmove~
+ ln -sfn ../run/lock $ROOT/var/lock
+fi
+
+echo "Done."
+exit 0
diff --git a/modules.d/30convertfs/do-convertfs.sh b/modules.d/30convertfs/do-convertfs.sh
new file mode 100755
index 0000000..99738e3
--- /dev/null
+++ b/modules.d/30convertfs/do-convertfs.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
+# ex: ts=8 sw=4 sts=4 et filetype=sh
+
+if getargbool 0 rd.convertfs; then
+ if getargbool 0 rd.debug; then
+ bash -x convertfs "$NEWROOT" 2>&1 | vinfo
+ else
+ convertfs "$NEWROOT" 2>&1 | vinfo
+ fi
+fi
diff --git a/modules.d/30convertfs/module-setup.sh b/modules.d/30convertfs/module-setup.sh
new file mode 100755
index 0000000..48ffa3e
--- /dev/null
+++ b/modules.d/30convertfs/module-setup.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
+# ex: ts=8 sw=4 sts=4 et filetype=sh
+
+check() {
+ [[ $mount_needs ]] && return 1
+ return 255
+}
+
+depends() {
+ return 0
+}
+
+install() {
+ dracut_install bash
+ dracut_install find ldconfig mv rm cp ln
+ inst_hook pre-pivot 99 "$moddir/do-convertfs.sh"
+ inst "$moddir/convertfs.sh" /usr/bin/convertfs
+}
+
diff --git a/modules.d/30usrmove/do-usrmove.sh b/modules.d/30usrmove/do-usrmove.sh
deleted file mode 100755
index 6596a68..0000000
--- a/modules.d/30usrmove/do-usrmove.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/bash
-# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
-# ex: ts=8 sw=4 sts=4 et filetype=sh
-
-if getargbool 0 rd.usrmove; then
- if getargbool 0 rd.debug; then
- bash -x usrmove-convert "$NEWROOT" 2>&1 | vinfo
- else
- usrmove-convert "$NEWROOT" 2>&1 | vinfo
- fi
-fi
diff --git a/modules.d/30usrmove/module-setup.sh b/modules.d/30usrmove/module-setup.sh
deleted file mode 100755
index 04b44ca..0000000
--- a/modules.d/30usrmove/module-setup.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/bash
-# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
-# ex: ts=8 sw=4 sts=4 et filetype=sh
-
-check() {
- [[ $mount_needs ]] && return 1
- return 255
-}
-
-depends() {
- return 0
-}
-
-install() {
- dracut_install bash
- dracut_install find ldconfig mv rm cp ln
- inst_hook pre-pivot 99 "$moddir/do-usrmove.sh"
- inst "$moddir/usrmove-convert.sh" /usr/bin/usrmove-convert
-}
-
diff --git a/modules.d/30usrmove/usrmove-convert.sh b/modules.d/30usrmove/usrmove-convert.sh
deleted file mode 100755
index 8aa8588..0000000
--- a/modules.d/30usrmove/usrmove-convert.sh
+++ /dev/null
@@ -1,159 +0,0 @@
-#!/bin/bash
-# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
-# ex: ts=8 sw=4 sts=4 et filetype=sh
-
-ROOT="$1"
-
-if [[ ! -d "$ROOT" ]]; then
- echo "Usage: $0 <rootdir>"
- exit 1
-fi
-
-if [[ "$ROOT" -ef / ]]; then
- echo "Can't convert the running system."
- echo "Please boot with 'usrmove' on the kernel command line,"
- echo "to update with the help of the initramfs,"
- echo "or run this script from a rescue system."
- exit 1
-fi
-
-while [[ "$ROOT" != "${ROOT%/}" ]]; do
- ROOT=${ROOT%/}
-done
-
-needconvert() {
- for dir in "$ROOT/bin" "$ROOT/sbin" "$ROOT/lib" "$ROOT/lib64"; do
- if [[ -e "$dir" ]]; then
- [[ -L "$dir" ]] || return 0
- fi
- done
- return 1
-}
-
-if ! needconvert; then
- echo "Your system is already converted."
- exit 0
-fi
-
-testfile="$ROOT/.usrmovecheck$$"
-rm -f "$testfile"
-> "$testfile"
-if [[ ! -e "$testfile" ]]; then
- echo "Cannot write to $ROOT/"
- exit 1
-fi
-rm -f "$testfile"
-
-testfile="$ROOT/usr/.usrmovecheck$$"
-rm -f "$testfile"
-> "$testfile"
-if [[ ! -e "$testfile" ]]; then
- echo "Cannot write to $ROOT/usr/"
- exit 1
-fi
-rm -f "$testfile"
-
-ismounted() {
- while read a m a; do
- [[ "$m" = "$1" ]] && return 0
- done < /proc/mounts
- return 1
-}
-
-# clean up after ourselves no matter how we die.
-cleanup() {
- echo "Something failed. Move back to the original state"
- for dir in "$ROOT/bin" "$ROOT/sbin" "$ROOT/lib" "$ROOT/lib64" \
- "$ROOT/usr/bin" "$ROOT/usr/sbin" "$ROOT/usr/lib" \
- "$ROOT/usr/lib64"; do
- [[ -d "${dir}.usrmove-new" ]] && rm -fr "${dir}.usrmove-new"
- if [[ -d "${dir}.usrmove-old" ]]; then
- mv "$dir" "${dir}.del~"
- mv "${dir}.usrmove-old" "$dir"
- rm -fr "${dir}.del~"
- fi
- done
-}
-
-trap 'ret=$?; [[ $ret -ne 0 ]] && cleanup;exit $ret;' EXIT
-trap 'exit 1;' SIGINT
-
-ismounted "$ROOT/usr" || CP_HARDLINK="-l"
-
-set -e
-
-# merge / and /usr in new dir in /usr
-for dir in bin sbin lib lib64; do
- rm -rf "$ROOT/usr/${dir}.usrmove-new"
- [[ -L "$ROOT/$dir" ]] && continue
- [[ -d "$ROOT/$dir" ]] || continue
- echo "Make a copy of \`$ROOT/usr/$dir'."
- [[ -d "$ROOT/usr/$dir" ]] \
- && cp -ax $CP_HARDLINK "$ROOT/usr/$dir" "$ROOT/usr/${dir}.usrmove-new"
- echo "Merge the copy with \`$ROOT/$dir'."
- [[ -d "$ROOT/usr/${dir}.usrmove-new" ]] \
- || mkdir -p "$ROOT/usr/${dir}.usrmove-new"
- cp -axT $CP_HARDLINK --backup --suffix=.usrmove~ "$ROOT/$dir" "$ROOT/usr/${dir}.usrmove-new"
- echo "Clean up duplicates in \`$ROOT/usr/$dir'."
- # delete all symlinks that have been backed up
- find "$ROOT/usr/${dir}.usrmove-new" -type l -name '*.usrmove~' -delete || :
- # replace symlink with backed up binary
- find "$ROOT/usr/${dir}.usrmove-new" \
- -name '*.usrmove~' \
- -type f \
- -exec bash -c 'p="{}";o=${p%%%%.usrmove~};
- [[ -L "$o" ]] && mv -f "$p" "$o"' ';' || :
-done
-# switch over merged dirs in /usr
-for dir in bin sbin lib lib64; do
- [[ -d "$ROOT/usr/${dir}.usrmove-new" ]] || continue
- echo "Switch to new \`$ROOT/usr/$dir'."
- rm -fr "$ROOT/usr/${dir}.usrmove-old"
- mv "$ROOT/usr/$dir" "$ROOT/usr/${dir}.usrmove-old"
- mv "$ROOT/usr/${dir}.usrmove-new" "$ROOT/usr/$dir"
-done
-
-# replace dirs in / with links to /usr
-for dir in bin sbin lib lib64; do
- [[ -L "$ROOT/$dir" ]] && continue
- [[ -d "$ROOT/$dir" ]] || continue
- echo "Create \`$ROOT/$dir' symlink."
- rm -rf "$ROOT/${dir}.usrmove-old" || :
- mv "$ROOT/$dir" "$ROOT/${dir}.usrmove-old"
- ln -sfn usr/$dir "$ROOT/$dir"
-done
-
-echo "Clean up backup files."
-# everything seems to work; cleanup
-for dir in bin sbin lib lib64; do
- # if we get killed in the middle of "rm -rf", ensure not to leave
- # an incomplete directory, which is moved back by cleanup()
- [[ -d "$ROOT/usr/${dir}.usrmove-old" ]] \
- && mv "$ROOT/usr/${dir}.usrmove-old" "$ROOT/usr/${dir}.usrmove-old~"
- [[ -d "$ROOT/${dir}.usrmove-old" ]] \
- && mv "$ROOT/${dir}.usrmove-old" "$ROOT/${dir}.usrmove-old~"
-done
-
-for dir in bin sbin lib lib64; do
- [[ -d "$ROOT/usr/${dir}.usrmove-old~" ]] \
- && rm -rf "$ROOT/usr/${dir}.usrmove-old~" || :
- [[ -d "$ROOT/${dir}.usrmove-old~" ]] \
- && rm -rf "$ROOT/${dir}.usrmove-old~" || :
-done
-
-for dir in lib lib64; do
- [[ -d "$ROOT/$dir" ]] || continue
- for lib in "$ROOT"/usr/${dir}/lib*.so*.usrmove~; do
- [[ -f $lib ]] || continue
- mv $lib ${lib/.so/_so}
- done
-done
-
-set +e
-
-echo "Run ldconfig."
-ldconfig -r "$ROOT"
-#echo "Set autorelabel flag."
-#> "$ROOT/.autorelabel"
-echo "Done."
-exit 0

View File

@ -1,30 +0,0 @@
From 61ad49e7d33a89e8ca4d604c2da5ff69c2548bdc Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 2 Feb 2012 19:18:48 +0100
Subject: [PATCH] 30convertfs/convertfs.sh: fix check for /var/run and
/var/lock
---
modules.d/30convertfs/convertfs.sh | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules.d/30convertfs/convertfs.sh b/modules.d/30convertfs/convertfs.sh
index 6c76a4c..eaeb8e4 100755
--- a/modules.d/30convertfs/convertfs.sh
+++ b/modules.d/30convertfs/convertfs.sh
@@ -160,13 +160,13 @@ if [ "$SELINUX" != "disabled" ] && [ -f /etc/selinux/${SELINUXTYPE}/contexts/fil
/usr/sbin/setfiles -r $ROOT -p /etc/selinux/${SELINUXTYPE}/contexts/files/file_contexts $ROOT/sbin $ROOT/bin $ROOT/lib $ROOT/lib64 $ROOT/usr/lib $ROOT/usr/lib64 $ROOT/etc/ld.so.cache $ROOT/var/cache/ldconfig || :
fi
-if [ -d $ROOT/var/run ]; then
+if [ ! -L $ROOT/var/run ]; then
echo "Converting /var/run to symlink"
mv -f $ROOT/var/run $ROOT/var/run.runmove~
ln -sfn ../run $ROOT/var/run
fi
-if [ -d $ROOT/var/lock ]; then
+if [ ! -L $ROOT/var/lock ]; then
echo "Converting /var/lock to symlink"
mv -f $ROOT/var/lock $ROOT/var/lock.lockmove~
ln -sfn ../run/lock $ROOT/var/lock

View File

@ -9,8 +9,8 @@
%endif
Name: dracut
Version: 014
Release: 81.git20120202%{?dist}
Version: 015
Release: 1%{?dist}
Summary: Initramfs generator using udev
%if 0%{?fedora} || 0%{?rhel} > 6
@ -24,86 +24,6 @@ URL: https://dracut.wiki.kernel.org/
# Source can be generated by
# http://git.kernel.org/?p=boot/dracut/dracut.git;a=snapshot;h=%{version};sf=tgz
Source0: http://www.kernel.org/pub/linux/utils/boot/dracut/dracut-%{version}.tar.bz2
Patch1: 0001-dracut-export-host_fs_types-host_devs.patch
Patch2: 0002-module-setup.sh-use-host_fs_types-host_devs.patch
Patch3: 0003-95iscsi-iscsiroot-unset-used-variables-before-starti.patch
Patch4: 0004-99base-dracut-lib.sh-killproc-prefix-local-variables.patch
Patch5: 0005-dracut.spec-remove-unnecessary-dependencies.patch
Patch6: 0006-TEST-12-RAID-DEG-mkdir-run.patch
Patch7: 0007-99base-dracut-lib.sh-added-inst_mount_hook-add_mount.patch
Patch8: 0008-dracut-add-add-fstab-and-mount-option.patch
Patch9: 0009-mkinitrd-dracut.sh-s-read_args-read_arg-g.patch
Patch10: 0010-Fix-live-update-script-769970.patch
Patch11: 0011-Makefile-set-bindir-to-prefix-bin-rather-than-sbin.patch
Patch12: 0012-Makefile-dash-does-not-like-expansion.patch
Patch13: 0013-mkinitrd-Mention-the-nocompress-option-in-help-outpu.patch
Patch14: 0014-Fix-Unicode-keytable.patch
Patch15: 0015-Handle-compressed-kmods.patch
Patch16: 0016-Only-install-files-from-etc-ld.so.conf.d-directory.patch
Patch17: 0017-plymouth-Include-kms-modules-even-if-they-are-not-cu.patch
Patch18: 0018-kernel-modules-Find-and-ulitmately-dereference-any-s.patch
Patch19: 0019-btrfs-Ensure-crc32c-module-is-installed.patch
Patch20: 0020-resume-Fix-failure-when-invalid-device-passed-via-re.patch
Patch21: 0021-dmsquash-Ensure-the-loop-kernel-module-is-included-a.patch
Patch22: 0022-init-Fix-bogus-message-about-invalid-root-device.patch
Patch23: 0023-udev-Attempt-to-install-any-programs-used-by-udev-ru.patch
Patch24: 0024-98usrmount-mount-usr.sh-Don-t-pass-mount-options-to-.patch
Patch25: 0025-TEST-10-RAID-fixed-TESTDIR-handling.patch
Patch26: 0026-Allow-to-add-mount-points-even-not-in-hostonly-mode.patch
Patch27: 0027-Check-module-dependencies-of-mount-points.patch
Patch28: 0028-Fix-get_maj_min-to-follow-symlink.patch
Patch29: 0029-Pass-device-name-instead-of-major-minor-in-for_each_.patch
Patch30: 0030-nfs-fix-regex-patterns-in-check.patch
Patch31: 0031-lvm-pass-the-correct-rd.lvm.lv-parameter.patch
Patch32: 0032-Create-a-symlink-for-the-live-image-s-base-loop-devi.patch
Patch33: 0033-interpret-off-as-false-in-getargbool.patch
Patch34: 0034-minor-cleanups-in-parsing-for-dmsquash-live-and-live.patch
Patch35: 0035-fstab-sys-mount-it-in-initramfs-instead-of-newroot-i.patch
Patch36: 0036-typo-fix.patch
Patch37: 0037-mktemp-was-long-obsoleted-by-coreutils.patch
Patch38: 0038-dmsquash-live-really-changed-dev-live-baseloop-to-ru.patch
Patch39: 0039-90kernel-modules-module-setup.sh-install-modules.ord.patch
Patch40: 0040-Handle-upper-case-MAC-addresses-in-ifname-option.patch
Patch41: 0041-server-id-in-ip-is-not-optional.patch
Patch42: 0042-ip-server-id-should-be-server-IP.patch
Patch43: 0043-remove-extra-semicolons-in-dracut.8.xml.patch
Patch44: 0044-deal-common-part-of-etc-passwd-in-99base.patch
Patch45: 0045-Add-job-control-support-to-emergency-shell.patch
Patch46: 0046-change-root-home-dir-to-root.patch
Patch47: 0047-Add-ssh-client-module-code.patch
Patch48: 0048-ctty-add-help-line-in-usage.patch
Patch49: 0049-plymouth-add-xz-support-for-kernel-modules.patch
Patch50: 0050-add-xz-compression-for-kernel-modules.patch
Patch51: 0051-lsinitrd-add-s-option-to-sort-the-initrd-output-by-f.patch
Patch52: 0052-dracut-unset-GREP_OPTIONS.patch
Patch53: 0053-lsinitrd-use-xz-with-single-stream-if-available.patch
Patch54: 0054-plymouth-kernel-cleanup-not-needed-parts-for-shutdow.patch
Patch55: 0055-network-dhclient-script-set-FQDN.patch
Patch56: 0056-AUTHORS-updated-and-fixed-.mailmap.patch
Patch57: 0057-dracut-dracut.8.xml-added-more-documentation-about-L.patch
Patch58: 0058-98usrmount-mount-usr.sh-do-not-mount-usr-read-only.patch
Patch59: 0059-40network-also-look-in-drivers-s390-net-for-network-.patch
Patch60: 0060-fix-rpm-build-error-after-adding-ssh-client-module.patch
Patch61: 0061-iscsi-multipath-also-search-in-drivers-s390-scsi.patch
Patch62: 0062-dracut-_get_fs_type-also-handle-dev-block-maj-min.patch
Patch63: 0063-dracut-functions-get_maj_min-major-and-minor-was-swa.patch
Patch64: 0064-90crypt-module-setup.sh-prepend-luks-to-hostonly-cmd.patch
Patch65: 0065-99base-init-remove-tmpfs-on-dev.patch
Patch66: 0066-netroot-actually-run-netroot-hooks.patch
Patch67: 0067-let-some-modules-to-respect-mount_needs.patch
Patch68: 0068-95ssh-client-module-setup.sh-spell-corrections.patch
Patch69: 0069-95ssh-client-module-setup.sh-do-not-install-ssh-clie.patch
Patch70: 0070-add-usrmove-module.patch
Patch71: 0071-dracut.spec-add-compat-symlinks-to-sbin.patch
Patch72: 0072-usrmove-install-missing-binaries-and-set-x-only-for-.patch
Patch73: 0073-30usrmove-usrmove-convert.sh-rename-duplicate-librar.patch
Patch74: 0074-dracut.spec-create-compat-symlink-instead-of-ghost.patch
Patch75: 0075-fix-kernel-modules-search-for-s390.patch
Patch76: 0076-fix-kernel-modules-search-for-s390.patch
Patch77: 0077-30usrmove-usrmove-convert.sh-do-not-force-selinux-au.patch
Patch78: 0078-dracut-functions-install-nosegneg-libs-additionally-.patch
Patch79: 0079-renamed-usrmove-to-convertfs.patch
Patch80: 0080-30convertfs-convertfs.sh-fix-check-for-var-run-and-v.patch
BuildArch: noarch
@ -144,7 +64,6 @@ Requires: bash
Requires: bzip2
Requires: coreutils
Requires: cpio
Requires: dash
Requires: filesystem >= 2.1.0
Requires: findutils
Requires: grep
@ -388,6 +307,9 @@ rm -rf $RPM_BUILD_ROOT
%dir /var/lib/dracut/overlay
%changelog
* Tue Feb 07 2012 Harald Hoyer <harald@redhat.com> 015-1
- version 015
* Thu Feb 02 2012 Harald Hoyer <harald@redhat.com> 014-81.git20120202
- update to latest git

View File

@ -1 +1 @@
aa17c17e2af7a19a232e05a59831eab5 dracut-014.tar.bz2
f44dfa66a483ad79ab16597dcf4cfcff dracut-015.tar.bz2