diff --git a/.gitignore b/.gitignore index efc94a2..5f1aa32 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /dracut-016.tar.bz2 /dracut-017.tar.bz2 /dracut-018.tar.bz2 +/dracut-019.tar.bz2 diff --git a/0001-dracut-lib-add-str_ends-to-go-along-with-str_starts.patch b/0001-dracut-lib-add-str_ends-to-go-along-with-str_starts.patch deleted file mode 100644 index 21fdb61..0000000 --- a/0001-dracut-lib-add-str_ends-to-go-along-with-str_starts.patch +++ /dev/null @@ -1,25 +0,0 @@ -From d8f0e320c267af0ce373066f524eab618ce931af Mon Sep 17 00:00:00 2001 -From: Will Woods -Date: Thu, 5 Apr 2012 13:01:35 -0400 -Subject: [PATCH] dracut-lib: add str_ends, to go along with str_starts - ---- - modules.d/99base/dracut-lib.sh | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh -index cb2e4dc..1ecd286 100755 ---- a/modules.d/99base/dracut-lib.sh -+++ b/modules.d/99base/dracut-lib.sh -@@ -12,6 +12,11 @@ str_starts() { - [ "${1#$2*}" != "$1" ] - } - -+# returns OK if $1 contains $2 at the end -+str_ends() { -+ [ "${1%*$2}" != "$1" ] -+} -+ - # replaces all occurrences of 'search' in 'str' with 'replacement' - # - # str_replace str search replacement diff --git a/0002-run-setup_net-at-start-of-initqueue-online-hook.patch b/0002-run-setup_net-at-start-of-initqueue-online-hook.patch deleted file mode 100644 index 1f0edc6..0000000 --- a/0002-run-setup_net-at-start-of-initqueue-online-hook.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 1e4a880125ed2d8991d10e8f8a41b37bad898c28 Mon Sep 17 00:00:00 2001 -From: Will Woods -Date: Thu, 5 Apr 2012 13:01:36 -0400 -Subject: [PATCH] run setup_net at start of initqueue/online hook - -This makes sure the network is active and ready to use during the -initqueue/online hook. - -It also makes it so you can run setup_net repeatedly without causing -error messages. ---- - modules.d/40network/net-genrules.sh | 3 +++ - modules.d/40network/net-lib.sh | 3 +++ - 2 files changed, 6 insertions(+) - -diff --git a/modules.d/40network/net-genrules.sh b/modules.d/40network/net-genrules.sh -index 84fd3ac..b3d5584 100755 ---- a/modules.d/40network/net-genrules.sh -+++ b/modules.d/40network/net-genrules.sh -@@ -53,5 +53,8 @@ fix_bootif() { - - # Run the "online" hook - printf 'SUBSYSTEM=="net", ACTION=="online", RUN+="/sbin/initqueue --onetime --env netif=$env{INTERFACE} source_hook initqueue/online"\n' -+ # And make sure we run setup_net at the start of the hook -+ echo '. /lib/net-lib.sh; setup_net $netif' > \ -+ $hookdir/initqueue/online/05-setup_net.sh - - } > /etc/udev/rules.d/60-net.rules -diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh -index 467c79f..a7abe81 100644 ---- a/modules.d/40network/net-lib.sh -+++ b/modules.d/40network/net-lib.sh -@@ -59,12 +59,14 @@ ifdown() { - ip link set $netif down - ip addr flush dev $netif - echo "#empty" > /etc/resolv.conf -+ rm -f /tmp/net.$netif.did-setup - # TODO: send "offline" uevent? - } - - setup_net() { - local netif="$1" f="" gw_ip="" netroot_ip="" iface="" IFACES="" - [ -e /tmp/net.$netif.up ] || return 1 -+ [ -e /tmp/net.$netif.did-setup ] && return - [ -e "/tmp/net.ifaces" ] && read IFACES < /tmp/net.ifaces - [ -z "$IFACES" ] && IFACES="$netif" - for iface in $IFACES ; do -@@ -100,6 +102,7 @@ setup_net() { - if [ -n "$dest" ] && ! arping -q -f -w 60 -I $netif $dest ; then - info "Resolving $dest via ARP on $netif failed" - fi -+ > /tmp/net.$netif.did-setup - } - - set_ifname() { diff --git a/0003-network-add-save_netinfo-fix-problems-with-nfs-NM-ta.patch b/0003-network-add-save_netinfo-fix-problems-with-nfs-NM-ta.patch deleted file mode 100644 index 5488f55..0000000 --- a/0003-network-add-save_netinfo-fix-problems-with-nfs-NM-ta.patch +++ /dev/null @@ -1,65 +0,0 @@ -From e173f0b384f699c2519db879f3f562b1f6676d8d Mon Sep 17 00:00:00 2001 -From: Will Woods -Date: Thu, 5 Apr 2012 13:01:37 -0400 -Subject: [PATCH] network: add save_netinfo, fix problems with nfs->NM - takeover - -For NetworkManager to properly take over a NFS-root system, we need to -have the interface name(s) in /tmp/net.ifaces and save the dhclient -lease. This lets the ifcfg module do its magic. - -save_netinfo should properly write out /tmp/net.ifaces when needed, and -copies the dhclient files into place. ---- - modules.d/40network/net-lib.sh | 16 ++++++++++++++++ - modules.d/40network/netroot.sh | 10 ++-------- - 2 files changed, 18 insertions(+), 8 deletions(-) - -diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh -index a7abe81..c0f73da 100644 ---- a/modules.d/40network/net-lib.sh -+++ b/modules.d/40network/net-lib.sh -@@ -105,6 +105,22 @@ setup_net() { - > /tmp/net.$netif.did-setup - } - -+save_netinfo() { -+ local netif="$1" IFACES="" f="" i="" -+ [ -e /tmp/net.ifaces ] && read IFACES < /tmp/net.ifaces -+ # Add $netif to the front of IFACES (if it's not there already). -+ set -- "$netif" -+ for i in $IFACES; do [ "$i" != "$netif" ] && set -- "$@" "$i"; done -+ IFACES="$*" -+ for i in $IFACES; do -+ for f in /tmp/dhclient.$i.*; do -+ [ -f $f ] && cp -f $f /tmp/net.${f#/tmp/dhclient.} -+ done -+ done -+ echo $IFACES > /tmp/.net.ifaces.new -+ mv /tmp/.net.ifaces.new /tmp/net.ifaces -+} -+ - set_ifname() { - local name="$1" mac="$2" num=0 n="" - # if it's already set, return the existing name -diff --git a/modules.d/40network/netroot.sh b/modules.d/40network/netroot.sh -index ac1c215..1bb62bb 100755 ---- a/modules.d/40network/netroot.sh -+++ b/modules.d/40network/netroot.sh -@@ -84,14 +84,8 @@ source_hook netroot - # Run the handler; don't store the root, it may change from device to device - # XXX other variables to export? - if $handler $netif $netroot $NEWROOT; then -- # Network rootfs mount successful -- for iface in $IFACES ; do -- [ -f /tmp/dhclient.$iface.lease ] && cp /tmp/dhclient.$iface.lease /tmp/net.$iface.lease -- [ -f /tmp/dhclient.$iface.dhcpopts ] && cp /tmp/dhclient.$iface.dhcpopts /tmp/net.$iface.dhcpopts -- done -- -- # Save used netif for later use -- [ ! -f /tmp/net.ifaces ] && echo $netif > /tmp/net.ifaces -+ # Network rootfs mount successful - save interface info for ifcfg etc. -+ save_netinfo $netif - else - warn "Mounting root via '$netif' failed" - # If we're trying with multiple interfaces, put that one down. diff --git a/0004-Make-splitsep-work-as-documented-with-less-vars-than.patch b/0004-Make-splitsep-work-as-documented-with-less-vars-than.patch deleted file mode 100644 index b6188c0..0000000 --- a/0004-Make-splitsep-work-as-documented-with-less-vars-than.patch +++ /dev/null @@ -1,35 +0,0 @@ -From f7cadaa843498c4b986f8a030fab39002ad108b6 Mon Sep 17 00:00:00 2001 -From: Will Woods -Date: Thu, 5 Apr 2012 13:01:38 -0400 -Subject: [PATCH] Make splitsep work as documented with less vars than fields - -According to its comment in dracut-lib.sh: - - splitsep ":" "one:all:the:rest" one two - -should set two="all:the:rest". But there's no check to see if the -current field is the last field, so it just gets "all". ---- - modules.d/99base/dracut-lib.sh | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh -index 1ecd286..e10a34d 100755 ---- a/modules.d/99base/dracut-lib.sh -+++ b/modules.d/99base/dracut-lib.sh -@@ -224,13 +224,14 @@ splitsep() { - local sep="$1"; local str="$2"; shift 2 - local tmp - -- while [ -n "$str" -a -n "$*" ]; do -+ while [ -n "$str" -a "$#" -gt 1 ]; do - tmp="${str%%$sep*}" - eval "$1=${tmp}" - str="${str#$tmp}" - str="${str#$sep}" - shift - done -+ [ -n "$str" -a -n "$1" ] && eval "$1=$str" - - return 0 - } diff --git a/0005-shutdown-use-emergency_shell-from-dracut-lib.patch b/0005-shutdown-use-emergency_shell-from-dracut-lib.patch deleted file mode 100644 index adffe75..0000000 --- a/0005-shutdown-use-emergency_shell-from-dracut-lib.patch +++ /dev/null @@ -1,109 +0,0 @@ -From bd3bf2ce41379459e79b9f48027d457caecce30a Mon Sep 17 00:00:00 2001 -From: Will Woods -Date: Thu, 5 Apr 2012 13:01:39 -0400 -Subject: [PATCH] shutdown: use emergency_shell from dracut-lib - ---- - modules.d/99base/dracut-lib.sh | 10 ++++---- - modules.d/99shutdown/shutdown.sh | 47 +++----------------------------------- - 2 files changed, 9 insertions(+), 48 deletions(-) - -diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh -index e10a34d..a29d586 100755 ---- a/modules.d/99base/dracut-lib.sh -+++ b/modules.d/99base/dracut-lib.sh -@@ -767,15 +767,17 @@ emergency_shell() - { - local _ctty - set +e -+ local _rdshell_name="dracut" action="Boot" hook="emergency" - if [ "$1" = "-n" ]; then - _rdshell_name=$2 - shift 2 -- else -- _rdshell_name=dracut -+ elif [ "$1" = "--shutdown" ]; then -+ _rdshell_name=$2; action="Shutdown"; hook="shutdown-emergency" -+ shift 2 - fi - echo ; echo - warn $@ -- source_hook emergency -+ source_hook "$hook" - echo - wait_for_loginit - [ -e /run/initramfs/.die ] && exit 1 -@@ -798,7 +800,7 @@ emergency_shell() - strstr "$(setsid --help 2>/dev/null)" "ctty" && CTTY="-c" - setsid $CTTY /bin/sh -i -l 0<$_ctty 1>$_ctty 2>&1 - else -- warn "Boot has failed. To debug this issue add \"rdshell\" to the kernel command line." -+ warn "$action has failed. To debug this issue add \"rd.shell\" to the kernel command line." - # cause a kernel panic - exit 1 - fi -diff --git a/modules.d/99shutdown/shutdown.sh b/modules.d/99shutdown/shutdown.sh -index 8817a4c..45345a4 100755 ---- a/modules.d/99shutdown/shutdown.sh -+++ b/modules.d/99shutdown/shutdown.sh -@@ -12,49 +12,8 @@ - export TERM=linux - PATH=/usr/sbin:/usr/bin:/sbin:/bin - --emergency_shell() --{ -- local _ctty -- set +e -- if [ "$1" = "-n" ]; then -- _rdshell_name=$2 -- shift 2 -- else -- _rdshell_name=dracut -- fi -- echo ; echo -- warn $@ -- source_hook shutdown-emergency -- echo -- if getargbool 1 rd.shell -y rdshell || getarg rd.break rdbreak; then -- echo "Dropping to debug shell." -- echo -- export PS1="$_rdshell_name:\${PWD}# " -- [ -e /.profile ] || >/.profile -- -- _ctty="$(getarg rd.ctty=)" && _ctty="/dev/${_ctty##*/}" -- if [ -z "$_ctty" ]; then -- _ctty=console -- while [ -f /sys/class/tty/$_ctty/active ]; do -- _ctty=$(cat /sys/class/tty/$_ctty/active) -- _ctty=${_ctty##* } # last one in the list -- done -- _ctty=/dev/$_ctty -- fi -- [ -c "$_ctty" ] || _ctty=/dev/tty1 -- strstr "$(setsid --help)" "control" && CTTY="-c" -- setsid $CTTY /bin/sh -i -l 0<$_ctty 1>$_ctty 2>&1 -- else -- exec /lib/systemd/systemd-shutdown "$@" -- warn "Shutdown has failed. To debug this issue add \"rdshell\" to the kernel command line." -- # cause a kernel panic -- exit 1 -- fi --} -- --trap "emergency_shell Signal caught!" 0 -- --getarg 'rd.break=pre-shutdown' && emergency_shell -n cmdline "Break before pre-shutdown" -+trap "emergency_shell --shutdown shutdown Signal caught!" 0 -+getarg 'rd.break=pre-shutdown' && emergency_shell --shutdown pre-shutdown "Break before pre-shutdown" - - umount_a() { - local _did_umount="n" -@@ -97,7 +56,7 @@ while _check_shutdown; do - done - _check_shutdown final - --getarg 'rd.break=shutdown' && emergency_shell -n cmdline "Break before shutdown" -+getarg 'rd.break=shutdown' && emergency_shell --shutdown shutdown "Break before shutdown" - [ "$1" = "reboot" ] && reboot -f -d -n --no-wall - [ "$1" = "poweroff" ] && poweroff -f -d -n --no-wall - [ "$1" = "halt" ] && halt -f -d -n --no-wall diff --git a/0006-rootfs-block-avoid-remount-when-options-don-t-change.patch b/0006-rootfs-block-avoid-remount-when-options-don-t-change.patch deleted file mode 100644 index 189a976..0000000 --- a/0006-rootfs-block-avoid-remount-when-options-don-t-change.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 6625b74e90a0b6918c90c408215e76719e459883 Mon Sep 17 00:00:00 2001 -From: Daniel Drake -Date: Wed, 11 Apr 2012 23:00:43 +0100 -Subject: [PATCH] rootfs-block: avoid remount when options don't change - -Mounting, unmounting and then mounting a disk partition takes some -time. - -On embedded systems such as OLPC XO where we disable fsck and fstab -reading, the root options are not going to change throughout the -mount_root() function, so remounting is time consuming and without -change. - -Detect and optimize for this case so that the filesystem is only -mounted once. ---- - modules.d/95rootfs-block/mount-root.sh | 12 ++++++++---- - 1 file changed, 8 insertions(+), 4 deletions(-) - -diff --git a/modules.d/95rootfs-block/mount-root.sh b/modules.d/95rootfs-block/mount-root.sh -index 2c89431..aef99ae 100755 ---- a/modules.d/95rootfs-block/mount-root.sh -+++ b/modules.d/95rootfs-block/mount-root.sh -@@ -98,20 +98,24 @@ mount_root() { - # them; rflags is guaranteed to not be empty - rflags="${rootopts:+"${rootopts},"}${rflags}" - -- umount "$NEWROOT" -- - # backslashes are treated as escape character in fstab - # esc_root=$(echo ${root#block:} | sed 's,\\,\\\\,g') - # printf '%s %s %s %s 1 1 \n' "$esc_root" "$NEWROOT" "$rootfs" "$rflags" >/etc/fstab - -+ ran_fsck=0 - if [ -z "$fastboot" -a "$READONLY" != "yes" ] && ! strstr "${rflags},${rootopts}" _netdev; then -+ umount "$NEWROOT" - fsck_single "${root#block:}" "$rootfs" "$fsckoptions" - _ret=$? - [ $_ret -ne 255 ] && echo $_ret >/run/initramfs/root-fsck -+ ran_fsck=1 - fi - -- info "Remounting ${root#block:} with -o ${rflags}" -- mount -t "$rootfs" -o "$rflags" "${root#block:}" "$NEWROOT" 2>&1 | vinfo -+ if [ -n "$rootopts" -o "$ran_fsck" = "1" ]; then -+ info "Remounting ${root#block:} with -o ${rflags}" -+ umount "$NEWROOT" &>/dev/null -+ mount -t "$rootfs" -o "$rflags" "${root#block:}" "$NEWROOT" 2>&1 | vinfo -+ fi - - [ -f "$NEWROOT"/forcefsck ] && rm -f "$NEWROOT"/forcefsck 2>/dev/null - [ -f "$NEWROOT"/.autofsck ] && rm -f "$NEWROOT"/.autofsck 2>/dev/null diff --git a/0007-Debian-multiarch-support.patch b/0007-Debian-multiarch-support.patch deleted file mode 100644 index bcc733d..0000000 --- a/0007-Debian-multiarch-support.patch +++ /dev/null @@ -1,279 +0,0 @@ -From c9143a63fef0d6f2dfd7cc37b09fc68d744d900f Mon Sep 17 00:00:00 2001 -From: Jon Ander Hernandez -Date: Tue, 10 Apr 2012 15:14:38 +0200 -Subject: [PATCH] Debian multiarch support - -Another solution could be searching in directories found at -/etc/ld.so.conf.d/*.conf or adding a new parameter. Here is a patch -which adds a new --libdirs parameter, and also a new inst_libdir_file -function which will try to expand metacharacters on each lib -directory: - - inst_libdir_file "libdevmapper-event-lvm*.so" ---- - dracut-functions.sh | 28 ++++++++++++++++++++++++++++ - dracut.sh | 12 ++++++++++-- - modules.d/01fips/module-setup.sh | 11 +++++------ - modules.d/40network/module-setup.sh | 9 ++------- - modules.d/80cms/module-setup.sh | 4 +--- - modules.d/90dm/module-setup.sh | 4 +--- - modules.d/90dmraid/module-setup.sh | 4 +--- - modules.d/90lvm/module-setup.sh | 4 +--- - modules.d/90multipath/module-setup.sh | 6 ++++-- - modules.d/95nfs/module-setup.sh | 6 +----- - modules.d/95udev-rules/module-setup.sh | 4 +--- - modules.d/98syslog/module-setup.sh | 8 +++----- - 12 files changed, 58 insertions(+), 42 deletions(-) - -diff --git a/dracut-functions.sh b/dracut-functions.sh -index 910f2d8..f5611dc 100755 ---- a/dracut-functions.sh -+++ b/dracut-functions.sh -@@ -677,6 +677,34 @@ dracut_install() { - done - } - -+ -+# inst_libdir_file [-n ] [...] -+# Install a located on a lib directory to the initramfs image -+# -n install non-matching files -+inst_libdir_file() { -+ if [[ "$1" == "-n" ]]; then -+ local _pattern=$1 -+ shift 2 -+ for _dir in $libdirs; do -+ for _i in "$@"; do -+ for _f in "$_dir"/$_i; do -+ [[ "$_i" =~ $_pattern ]] || continue -+ [[ -e "$_i" ]] && dracut_install "$_i" -+ done -+ done -+ done -+ else -+ for _dir in $libdirs; do -+ for _i in "$@"; do -+ for _f in "$_dir"/$_i; do -+ [[ -e "$_f" ]] && dracut_install "$_f" -+ done -+ done -+ done -+ fi -+} -+ -+ - # install function decompressing the target and handling symlinks - # $@ = list of compressed (gz or bz2) files or symlinks pointing to such files - # -diff --git a/dracut.sh b/dracut.sh -index 0418c78..7f61143 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -221,6 +221,7 @@ while (($# > 0)); do - --filesystems) push_arg filesystems_l "$@" || shift;; - -I|--install) push_arg install_items_l "$@" || shift;; - --fwdir) push_arg fw_dir_l "$@" || shift;; -+ --libdirs) push_arg libdirs_l "$@" || shift;; - --fscks) push_arg fscks_l "$@" || shift;; - --add-fstab) push_arg add_fstab_l "$@" || shift;; - --mount) push_arg fstab_lines "$@" || shift;; -@@ -400,6 +401,13 @@ if (( ${#fw_dir_l[@]} )); then - done - fi - -+if (( ${#libdirs_l[@]} )); then -+ libdirs='' -+ while pop libdirs_l val; do -+ libdirs+="$val " -+ done -+fi -+ - [[ $stdloglvl_l ]] && stdloglvl=$stdloglvl_l - [[ ! $stdloglvl ]] && stdloglvl=4 - stdloglvl=$((stdloglvl + verbosity_mod_l)) -@@ -505,14 +513,14 @@ ddebug "Executing $0 $dracut_args" - - # Detect lib paths - [[ $libdir ]] || for libdir in /lib64 /lib; do -- [[ -d $libdir ]] && break -+ [[ -d $libdir ]] && libdirs+=" $libdir" && break - done || { - dfatal 'No lib directory?!!!' - exit 1 - } - - [[ $usrlibdir ]] || for usrlibdir in /usr/lib64 /usr/lib; do -- [[ -d $usrlibdir ]] && break -+ [[ -d $usrlibdir ]] && libdirs+=" $usrlibdir" && break - done || dwarn 'No usr/lib directory!' - - # This is kinda legacy -- eventually it should go away. -diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh -index a490827..6bfe31e 100755 ---- a/modules.d/01fips/module-setup.sh -+++ b/modules.d/01fips/module-setup.sh -@@ -34,12 +34,11 @@ install() { - - dracut_install sha512hmac rmmod insmod mount uname umount - -- for _dir in "$usrlibdir" "$libdir"; do -- [[ -e $_dir/libsoftokn3.so ]] && \ -- dracut_install $_dir/libsoftokn3.so $_dir/libsoftokn3.chk \ -- $_dir/libfreebl3.so $_dir/libfreebl3.chk && \ -- break -- done -+ inst_libdir_file libsoftokn3.so -+ inst_libdir_file libsoftokn3.so -+ inst_libdir_file libsoftokn3.chk -+ inst_libdir_file libfreebl3.so -+ inst_libdir_file libfreebl3.chk - - dracut_install $usrlibdir/hmaccalc/sha512hmac.hmac - if command -v prelink >/dev/null; then -diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh -index c91f164..97fc5cb 100755 ---- a/modules.d/40network/module-setup.sh -+++ b/modules.d/40network/module-setup.sh -@@ -89,12 +89,7 @@ install() { - - _arch=$(uname -m) - -- for _dir in "$usrlibdir/tls/$_arch" "$usrlibdir/tls" "$usrlibdir/$_arch" \ -- "$usrlibdir" "$libdir"; do -- for _i in "$_dir"/libnss_dns.so.* "$_dir"/libnss_mdns4_minimal.so.*; do -- [ -e "$_i" ] && dracut_install "$_i" -- done -- done -- -+ inst_libdir_file {"tls/$_arch/",tls/,"$_arch/",}"libnss_dns.so.*" -+ inst_libdir_file {"tls/$_arch/",tls/,"$_arch/",}"libnss_mdns4_minimal.so.*" - } - -diff --git a/modules.d/80cms/module-setup.sh b/modules.d/80cms/module-setup.sh -index 5cb5413..5cce1b4 100755 ---- a/modules.d/80cms/module-setup.sh -+++ b/modules.d/80cms/module-setup.sh -@@ -31,9 +31,7 @@ install() { - [[ -f $file ]] && inst $file - done - -- for file in {"$usrlibdir","$libdir"}/gconv/*; do -- [[ -f $file ]] && inst $file -- done -+ inst_libdir_file "gconv/*" - #inst /usr/lib/locale/locale-archive - - dracut_install cmsfs-fuse fusermount ulockmgr_server bash tr insmod rmmod cat -diff --git a/modules.d/90dm/module-setup.sh b/modules.d/90dm/module-setup.sh -index a55d591..bac854a 100755 ---- a/modules.d/90dm/module-setup.sh -+++ b/modules.d/90dm/module-setup.sh -@@ -22,9 +22,7 @@ install() { - - type -P dmeventd >/dev/null && dracut_install dmeventd - -- for _i in {"$libdir","$usrlibdir"}/libdevmapper-event.so*; do -- [ -e "$_i" ] && dracut_install "$_i" -- done -+ inst_libdir_file "libdevmapper-event.so*" - - inst_rules 10-dm.rules 13-dm-disk.rules 95-dm-notify.rules - # Gentoo ebuild for LVM2 prior to 2.02.63-r1 doesn't install above rules -diff --git a/modules.d/90dmraid/module-setup.sh b/modules.d/90dmraid/module-setup.sh -index 786cf25..0a8ed7f 100755 ---- a/modules.d/90dmraid/module-setup.sh -+++ b/modules.d/90dmraid/module-setup.sh -@@ -62,9 +62,7 @@ install() { - inst_rules 64-md-raid.rules - fi - -- for _i in {"$libdir","$usrlibdir"}/libdmraid-events*.so*; do -- [ -e "$_i" ] && dracut_install "$_i" -- done -+ inst_libdir_file "libdmraid-events*.so*" - - inst_rules "$moddir/61-dmraid-imsm.rules" - #inst "$moddir/dmraid-cleanup.sh" /sbin/dmraid-cleanup -diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh -index cf46372..15c824d 100755 ---- a/modules.d/90lvm/module-setup.sh -+++ b/modules.d/90lvm/module-setup.sh -@@ -60,8 +60,6 @@ install() { - inst "$moddir/lvm_scan.sh" /sbin/lvm_scan - inst_hook cmdline 30 "$moddir/parse-lvm.sh" - -- for _i in {"$libdir","$usrlibdir"}/libdevmapper-event-lvm*.so; do -- [ -e "$_i" ] && dracut_install "$_i" -- done -+ inst_libdir_file "libdevmapper-event-lvm*.so" - } - -diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh -index b78c005..8a193c4 100755 ---- a/modules.d/90multipath/module-setup.sh -+++ b/modules.d/90multipath/module-setup.sh -@@ -62,11 +62,13 @@ install() { - /sbin/xdrgetprio \ - /etc/xdrdevices.conf \ - /etc/multipath.conf \ -- /etc/multipath/* \ -- "$libdir"/libmultipath* "$libdir"/multipath/*; do -+ /etc/multipath/*; do - [ -e "$_f" ] && inst "$_f" - done - -+ inst_libdir_file "libmultipath*" -+ inst_libdir_file "multipath/*" -+ - inst_hook pre-trigger 02 "$moddir/multipathd.sh" - inst_hook pre-pivot 02 "$moddir/multipathd-stop.sh" - inst_rules 40-multipath.rules -diff --git a/modules.d/95nfs/module-setup.sh b/modules.d/95nfs/module-setup.sh -index 7853783..455f52f 100755 ---- a/modules.d/95nfs/module-setup.sh -+++ b/modules.d/95nfs/module-setup.sh -@@ -54,11 +54,7 @@ install() { - _nsslibs=${_nsslibs#|} - _nsslibs=${_nsslibs%|} - -- for _i in {/usr,}$libdir/libnss*.so; do -- [[ -e $_i ]] || continue -- [[ "$_i" =~ $_nsslibs ]] || continue -- dracut_install "$_i" -- done -+ inst_libdir_file -n "$_nsslibs" "libnss*.so" - - inst_hook cmdline 90 "$moddir/parse-nfsroot.sh" - inst_hook pre-udev 99 "$moddir/nfs-start-rpc.sh" -diff --git a/modules.d/95udev-rules/module-setup.sh b/modules.d/95udev-rules/module-setup.sh -index 5f8bae8..1c71336 100755 ---- a/modules.d/95udev-rules/module-setup.sh -+++ b/modules.d/95udev-rules/module-setup.sh -@@ -74,8 +74,6 @@ install() { - [ -f /etc/arch-release ] && \ - inst "$moddir/load-modules.sh" /lib/udev/load-modules.sh - -- for _i in {"$libdir","$usrlibdir"}/libnss_files*; do -- [ -e "$_i" ] && dracut_install "$_i" -- done -+ inst_libdir_file "libnss_files*" - } - -diff --git a/modules.d/98syslog/module-setup.sh b/modules.d/98syslog/module-setup.sh -index 5579c5a..bd6e92c 100755 ---- a/modules.d/98syslog/module-setup.sh -+++ b/modules.d/98syslog/module-setup.sh -@@ -16,11 +16,9 @@ install() { - local _installs - if type -P rsyslogd >/dev/null; then - _installs="rsyslogd" -- for _i in {"$libdir","$usrlibdir"}/rsyslog/lmnet.so \ -- {"$libdir","$usrlibdir"}/rsyslog/imklog.so \ -- {"$libdir","$usrlibdir"}/rsyslog/imuxsock.so ; do -- [ -e "$_i" ] && _installs="$_installs $_i" -- done -+ inst_libdir_file rsyslog/lmnet.so -+ inst_libdir_file rsyslog/imklog.so -+ inst_libdir_file rsyslog/imuxsock.so - elif type -P syslogd >/dev/null; then - _installs="syslogd" - elif type -P syslog-ng >/dev/null; then diff --git a/0008-dracut.sh-log-installed-modules-to-initdir-lib-dracu.patch b/0008-dracut.sh-log-installed-modules-to-initdir-lib-dracu.patch deleted file mode 100644 index b7f7224..0000000 --- a/0008-dracut.sh-log-installed-modules-to-initdir-lib-dracu.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 0a35a80b934a0a5a34e3c23244aca0caa440e5d4 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 16 Apr 2012 13:10:22 +0200 -Subject: [PATCH] dracut.sh: log installed modules to - $initdir/lib/dracut/modules.txt - ---- - dracut.sh | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/dracut.sh b/dracut.sh -index 7f61143..1048e75 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -720,6 +720,11 @@ for moddir in "$dracutbasedir/modules.d"/[0-9][0-9]*; do - fi - done - unset moddir -+ -+for i in $modules_loaded; do -+ echo "$i" >> $initdir/lib/dracut/modules.txt -+done -+ - dinfo "*** Including modules done ***" - - ## final stuff that has to happen diff --git a/0009-lvm-disable-lvmetad.patch b/0009-lvm-disable-lvmetad.patch deleted file mode 100644 index 492b151..0000000 --- a/0009-lvm-disable-lvmetad.patch +++ /dev/null @@ -1,53 +0,0 @@ -From b8a81fb885c981d795a664ae8665e68d7359231a Mon Sep 17 00:00:00 2001 -From: Peter Rajnoha -Date: Tue, 10 Apr 2012 04:40:53 -0400 -Subject: [PATCH] lvm: disable lvmetad - -Currently dracut uses lvm.conf as found in the system and modifies only -global/locking_type setting. As there's a new feature introduced - the lvmetad -daemon, dracut should disable its use as well by setting "global/use_lvmetad=0" -(patch attached). - -Otherwise, there's a warning message issued: - -dracut: WARNING: Failed to connect to lvmetad: No such file or directory. -Falling back to internal scanning. - -@@ -, +, @@ - modules.d/90lvm/lvm_scan.sh | 2 ++ - modules.d/90lvm/module-setup.sh | 1 + - 2 files changed, 3 insertions(+), 0 deletions(-) ---- - modules.d/90lvm/lvm_scan.sh | 2 ++ - modules.d/90lvm/module-setup.sh | 1 + - 2 files changed, 3 insertions(+) - -diff --git a/modules.d/90lvm/lvm_scan.sh b/modules.d/90lvm/lvm_scan.sh -index 104565f..17c29bc 100755 ---- a/modules.d/90lvm/lvm_scan.sh -+++ b/modules.d/90lvm/lvm_scan.sh -@@ -35,10 +35,12 @@ if [ ! -e /etc/lvm/lvm.conf ]; then - if [ -n $SNAPSHOT ]; then - echo 'global {'; - echo ' locking_type = 1'; -+ echo ' use_lvmetad = 0'; - echo '}'; - else - echo 'global {'; - echo ' locking_type = 4'; -+ echo ' use_lvmetad = 0'; - echo '}'; - fi - } > /etc/lvm/lvm.conf -diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh -index 15c824d..2ce5c50 100755 ---- a/modules.d/90lvm/module-setup.sh -+++ b/modules.d/90lvm/module-setup.sh -@@ -49,6 +49,7 @@ install() { - # FIXME: near-term hack to establish read-only locking; - # use command-line lvm.conf editor once it is available - sed -i -e 's/\(^[[:space:]]*\)locking_type[[:space:]]*=[[:space:]]*[[:digit:]]/\1locking_type = 4/' ${initdir}/etc/lvm/lvm.conf -+ sed -i -e 's/\(^[[:space:]]*\)use_lvmetad[[:space:]]*=[[:space:]]*[[:digit:]]/\1use_lvmetad = 0/' ${initdir}/etc/lvm/lvm.conf - fi - fi - diff --git a/0010-udev-rules-remove-01-ignore.rules.patch b/0010-udev-rules-remove-01-ignore.rules.patch deleted file mode 100644 index ee21461..0000000 --- a/0010-udev-rules-remove-01-ignore.rules.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 324be70f8070105c106c5901dd0575cb116cebc9 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 16 Apr 2012 14:50:35 +0200 -Subject: [PATCH] udev-rules: remove 01-ignore.rules - ---- - modules.d/95udev-rules/01-ignore.rules | 1 - - modules.d/95udev-rules/module-setup.sh | 3 --- - 2 files changed, 4 deletions(-) - delete mode 100644 modules.d/95udev-rules/01-ignore.rules - -diff --git a/modules.d/95udev-rules/01-ignore.rules b/modules.d/95udev-rules/01-ignore.rules -deleted file mode 100644 -index b32f22e..0000000 ---- a/modules.d/95udev-rules/01-ignore.rules -+++ /dev/null -@@ -1 +0,0 @@ --KERNEL=="ram[0-9]*", OPTIONS+="ignore_device", OPTIONS+="last_rule" -diff --git a/modules.d/95udev-rules/module-setup.sh b/modules.d/95udev-rules/module-setup.sh -index 1c71336..b17232f 100755 ---- a/modules.d/95udev-rules/module-setup.sh -+++ b/modules.d/95udev-rules/module-setup.sh -@@ -20,9 +20,6 @@ install() { - #Some debian udev rules are named differently - inst_rules 50-udev.rules 95-late.rules - -- # ignore some devices in the initrd -- inst_rules "$moddir/01-ignore.rules" -- - # for firmware loading - inst_rules 50-firmware.rules - dracut_install cat uname diff --git a/0011-lsinitrd-support-symlinks.patch b/0011-lsinitrd-support-symlinks.patch deleted file mode 100644 index 683558e..0000000 --- a/0011-lsinitrd-support-symlinks.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 25ff71b0c756bf2036bec78557398946d45bcbd3 Mon Sep 17 00:00:00 2001 -From: Nikoli -Date: Tue, 17 Apr 2012 11:31:27 +0200 -Subject: [PATCH] lsinitrd: support symlinks - ---- - lsinitrd.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lsinitrd.sh b/lsinitrd.sh -index 1eaa37d..e6767dc 100755 ---- a/lsinitrd.sh -+++ b/lsinitrd.sh -@@ -34,7 +34,7 @@ image="${1:-/boot/initramfs-$(uname -r).img}" - [[ -f "$image" ]] || { echo "$image does not exist" ; exit 1 ; } - - CAT=zcat --FILE_T=$(file "$image") -+FILE_T=$(file --dereference "$image") - - if echo "test"|xz|xz -dc --single-stream >/dev/null 2>&1; then - XZ_SINGLE_STREAM="--single-stream" diff --git a/0012-dracut.cmdline.7.asc-document-resume-option.patch b/0012-dracut.cmdline.7.asc-document-resume-option.patch deleted file mode 100644 index b64e907..0000000 --- a/0012-dracut.cmdline.7.asc-document-resume-option.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 97903dfc476ae0c5ccaa4ddef294e2da43411355 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Tue, 17 Apr 2012 12:06:51 +0200 -Subject: [PATCH] dracut.cmdline.7.asc: document "resume=" option - ---- - dracut.cmdline.7.asc | 11 +++++++++++ - 1 file changed, 11 insertions(+) - -diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc -index a1e06dd..c77fee5 100644 ---- a/dracut.cmdline.7.asc -+++ b/dracut.cmdline.7.asc -@@ -64,6 +64,17 @@ rootfstype=ext3 - do not honor special mount options for the root filesystem found in - _/etc/fstab_ of the real root. - -+**resume=**__ -++ -+E.g.: -++ -+---- -+resume=/dev/disk/by-path/pci-0000:00:1f.1-scsi-0:0:1:0-part1 -+resume=/dev/disk/by-uuid/3f5ad593-4546-4a94-a374-bcfb68aa11f7 -+resume=UUID=3f5ad593-4546-4a94-a374-bcfb68aa11f7 -+---- -+ -+ - Misc - ~~~~ - **rd.driver.blacklist=**_[,,...]_:: diff --git a/0013-virtfs-root-filesystem-support.patch b/0013-virtfs-root-filesystem-support.patch deleted file mode 100644 index cf2c680..0000000 --- a/0013-virtfs-root-filesystem-support.patch +++ /dev/null @@ -1,169 +0,0 @@ -From a7c9cbe1a21ecc306fce3127be0a4ad75c5fcfcb Mon Sep 17 00:00:00 2001 -From: Lennert Buytenhek -Date: Sun, 15 Apr 2012 02:40:17 +0200 -Subject: [PATCH] virtfs root filesystem support - -Qemu/KVM provides virtfs, a paravirtualised filesystem that is -implemented by running the Plan 9 folder sharing protocol over -virtio. - -Make booting with root=virtfs:foobar use the virtfs filesystem -with mount tag 'foobar' as root filesystem, to allow booting -virtual machines off virtfs. - -Note that this only handles 9p over virtio (i.e. virtfs), and -doesn't attempt to handle mounting 9p filesystems over TCP/IP, -for example. - -Signed-off-by: Lennert Buytenhek ---- - dracut.spec | 1 + - modules.d/95virtfs/module-setup.sh | 27 +++++++++++++ - modules.d/95virtfs/mount-virtfs.sh | 75 ++++++++++++++++++++++++++++++++++++ - modules.d/95virtfs/parse-virtfs.sh | 9 +++++ - 4 files changed, 112 insertions(+) - create mode 100755 modules.d/95virtfs/module-setup.sh - create mode 100755 modules.d/95virtfs/mount-virtfs.sh - create mode 100755 modules.d/95virtfs/parse-virtfs.sh - -diff --git a/dracut.spec b/dracut.spec -index 074cb10..9cd08b7 100644 ---- a/dracut.spec -+++ b/dracut.spec -@@ -270,6 +270,7 @@ rm -rf $RPM_BUILD_ROOT - %{dracutlibdir}/modules.d/95zfcp - %{dracutlibdir}/modules.d/95terminfo - %{dracutlibdir}/modules.d/95udev-rules -+%{dracutlibdir}/modules.d/95virtfs - %{dracutlibdir}/modules.d/96securityfs - %{dracutlibdir}/modules.d/97biosdevname - %{dracutlibdir}/modules.d/97masterkey -diff --git a/modules.d/95virtfs/module-setup.sh b/modules.d/95virtfs/module-setup.sh -new file mode 100755 -index 0000000..a6081c2 ---- /dev/null -+++ b/modules.d/95virtfs/module-setup.sh -@@ -0,0 +1,27 @@ -+#!/bin/bash -+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- -+# ex: ts=8 sw=4 sts=4 et filetype=sh -+ -+check() { -+ [[ $hostonly ]] || [[ $mount_needs ]] && { -+ for fs in ${host_fs_types[@]}; do -+ strstr "$fs" "\|9p" && return 0 -+ done -+ return 1 -+ } -+ -+ return 0 -+} -+ -+depends() { -+ return 0 -+} -+ -+installkernel() { -+ instmods 9p 9pnet_virtio -+} -+ -+install() { -+ inst_hook cmdline 95 "$moddir/parse-virtfs.sh" -+ inst_hook mount 99 "$moddir/mount-virtfs.sh" -+} -diff --git a/modules.d/95virtfs/mount-virtfs.sh b/modules.d/95virtfs/mount-virtfs.sh -new file mode 100755 -index 0000000..dfebf38 ---- /dev/null -+++ b/modules.d/95virtfs/mount-virtfs.sh -@@ -0,0 +1,75 @@ -+#!/bin/sh -+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- -+# ex: ts=8 sw=4 sts=4 et filetype=sh -+ -+type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh -+ -+filter_rootopts() { -+ rootopts=$1 -+ # strip ro and rw options -+ local OLDIFS="$IFS" -+ IFS=, -+ set -- $rootopts -+ IFS="$OLDIFS" -+ local v -+ while [ $# -gt 0 ]; do -+ case $1 in -+ rw|ro);; -+ defaults);; -+ *) -+ v="$v,${1}";; -+ esac -+ shift -+ done -+ rootopts=${v#,} -+ echo $rootopts -+} -+ -+mount_root() { -+ local _ret -+ -+ rootfs="9p" -+ rflags="trans=virtio,version=9p2000.L" -+ -+ modprobe 9pnet_virtio -+ -+ mount -t ${rootfs} -o "$rflags",ro "${root#virtfs:}" "$NEWROOT" -+ -+ rootopts= -+ if getargbool 1 rd.fstab -n rd_NO_FSTAB \ -+ && ! getarg rootflags \ -+ && [ -f "$NEWROOT/etc/fstab" ] \ -+ && ! [ -L "$NEWROOT/etc/fstab" ]; then -+ # if $NEWROOT/etc/fstab contains special mount options for -+ # the root filesystem, -+ # remount it with the proper options -+ rootopts="defaults" -+ while read dev mp fs opts rest; do -+ # skip comments -+ [ "${dev%%#*}" != "$dev" ] && continue -+ -+ if [ "$mp" = "/" ]; then -+ rootopts=$opts -+ break -+ fi -+ done < "$NEWROOT/etc/fstab" -+ -+ rootopts=$(filter_rootopts $rootopts) -+ fi -+ -+ # we want rootflags (rflags) to take precedence so prepend rootopts to -+ # them; rflags is guaranteed to not be empty -+ rflags="${rootopts:+"${rootopts},"}${rflags}" -+ -+ umount "$NEWROOT" -+ -+ info "Remounting ${root#virtfs:} with -o ${rflags}" -+ mount -t ${rootfs} -o "$rflags" "${root#virtfs:}" "$NEWROOT" 2>&1 | vinfo -+ -+ [ -f "$NEWROOT"/forcefsck ] && rm -f "$NEWROOT"/forcefsck 2>/dev/null -+ [ -f "$NEWROOT"/.autofsck ] && rm -f "$NEWROOT"/.autofsck 2>/dev/null -+} -+ -+if [ -n "$root" -a -z "${root%%virtfs:*}" ]; then -+ mount_root -+fi -diff --git a/modules.d/95virtfs/parse-virtfs.sh b/modules.d/95virtfs/parse-virtfs.sh -new file mode 100755 -index 0000000..ce6de6d ---- /dev/null -+++ b/modules.d/95virtfs/parse-virtfs.sh -@@ -0,0 +1,9 @@ -+#!/bin/sh -+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- -+# ex: ts=8 sw=4 sts=4 et filetype=sh -+ -+if [ "${root%%:*}" = "virtfs" ] ; then -+ modprobe 9pnet_virtio -+ -+ rootok=1 -+fi diff --git a/0014-dracut.spec-do-not-include-IMA-and-selinux-modules-w.patch b/0014-dracut.spec-do-not-include-IMA-and-selinux-modules-w.patch deleted file mode 100644 index d50981a..0000000 --- a/0014-dracut.spec-do-not-include-IMA-and-selinux-modules-w.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 04ab68a4dd7dada7cd5fa2afc11ce7a12275af14 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Tue, 17 Apr 2012 12:12:56 +0200 -Subject: [PATCH] dracut.spec: do not include IMA and selinux modules with - systemd - ---- - dracut.spec | 16 +++++++++++++--- - 1 file changed, 13 insertions(+), 3 deletions(-) - -diff --git a/dracut.spec b/dracut.spec -index 9cd08b7..9f64213 100644 ---- a/dracut.spec -+++ b/dracut.spec -@@ -187,6 +187,14 @@ rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/02fips-aesni - # remove gentoo specific modules - rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/50gensplash - -+%if %{defined _unitdir} -+# with systemd IMA and selinux modules do not make sense -+rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/96securityfs -+rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/97masterkey -+rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/98integrity -+rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/98selinux -+%endif -+ - mkdir -p $RPM_BUILD_ROOT/boot/dracut - mkdir -p $RPM_BUILD_ROOT/var/lib/dracut/overlay - mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log -@@ -271,13 +279,15 @@ rm -rf $RPM_BUILD_ROOT - %{dracutlibdir}/modules.d/95terminfo - %{dracutlibdir}/modules.d/95udev-rules - %{dracutlibdir}/modules.d/95virtfs -+%if %{undefined _unitdir} - %{dracutlibdir}/modules.d/96securityfs --%{dracutlibdir}/modules.d/97biosdevname - %{dracutlibdir}/modules.d/97masterkey --%{dracutlibdir}/modules.d/98ecryptfs -+%{dracutlibdir}/modules.d/98selinux - %{dracutlibdir}/modules.d/98integrity -+%endif -+%{dracutlibdir}/modules.d/97biosdevname -+%{dracutlibdir}/modules.d/98ecryptfs - %{dracutlibdir}/modules.d/98pollcdrom --%{dracutlibdir}/modules.d/98selinux - %{dracutlibdir}/modules.d/98syslog - %{dracutlibdir}/modules.d/98usrmount - %{dracutlibdir}/modules.d/99base diff --git a/0015-Do-not-run-plymouth-hook-if-the-binary-is-missing.patch b/0015-Do-not-run-plymouth-hook-if-the-binary-is-missing.patch deleted file mode 100644 index 23cabe3..0000000 --- a/0015-Do-not-run-plymouth-hook-if-the-binary-is-missing.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 9f630a188942c6d235c3a747d67e44e725d8e869 Mon Sep 17 00:00:00 2001 -From: Colin Guthrie -Date: Sat, 14 Apr 2012 16:03:34 +0100 -Subject: [PATCH] Do not run plymouth hook if the binary is missing. - -There is a remove-boot-splash script in Mageia that can -strip plymouth from an initrd. Make this script a noop -if that has happened. ---- - modules.d/50plymouth/plymouth-pretrigger.sh | 44 ++++++++++++++------------- - 1 file changed, 23 insertions(+), 21 deletions(-) - -diff --git a/modules.d/50plymouth/plymouth-pretrigger.sh b/modules.d/50plymouth/plymouth-pretrigger.sh -index 57955e7..50828af 100755 ---- a/modules.d/50plymouth/plymouth-pretrigger.sh -+++ b/modules.d/50plymouth/plymouth-pretrigger.sh -@@ -2,27 +2,29 @@ - # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- - # ex: ts=8 sw=4 sts=4 et filetype=sh - --if getargbool 1 plymouth.enable && getargbool 1 rd.plymouth -n rd_NO_PLYMOUTH; then -- [ -c /dev/null ] || mknod -m 0666 /dev/null c 1 3 -- # first trigger graphics subsystem -- udevadm trigger --action=add --attr-match=class=0x030000 >/dev/null 2>&1 -- # first trigger graphics and tty subsystem -- udevadm trigger --action=add --subsystem-match=graphics --subsystem-match=drm --subsystem-match=tty >/dev/null 2>&1 -+if [ -x /bin/plymouthd ]; then -+ if getargbool 1 plymouth.enable && getargbool 1 rd.plymouth -n rd_NO_PLYMOUTH; then -+ [ -c /dev/null ] || mknod -m 0666 /dev/null c 1 3 -+ # first trigger graphics subsystem -+ udevadm trigger --action=add --attr-match=class=0x030000 >/dev/null 2>&1 -+ # first trigger graphics and tty subsystem -+ udevadm trigger --action=add --subsystem-match=graphics --subsystem-match=drm --subsystem-match=tty >/dev/null 2>&1 - -- udevadm settle --timeout=30 2>&1 | vinfo -- [ -c /dev/zero ] || mknod -m 0666 /dev/zero c 1 5 -- [ -c /dev/tty0 ] || mknod -m 0620 /dev/tty0 c 4 0 -- [ -e /dev/systty ] || ln -s tty0 /dev/systty -- [ -c /dev/fb0 ] || mknod -m 0660 /dev/fb0 c 29 0 -- [ -e /dev/fb ] || ln -s fb0 /dev/fb -+ udevadm settle --timeout=30 2>&1 | vinfo -+ [ -c /dev/zero ] || mknod -m 0666 /dev/zero c 1 5 -+ [ -c /dev/tty0 ] || mknod -m 0620 /dev/tty0 c 4 0 -+ [ -e /dev/systty ] || ln -s tty0 /dev/systty -+ [ -c /dev/fb0 ] || mknod -m 0660 /dev/fb0 c 29 0 -+ [ -e /dev/fb ] || ln -s fb0 /dev/fb - -- info "Starting plymouth daemon" -- mkdir -m 0755 /run/plymouth -- consoledev=$(getarg console= | sed -e 's/,.*//') -- consoledev=${consoledev:-tty0} -- [ -x /lib/udev/console_init ] && /lib/udev/console_init "/dev/$consoledev" -- [ -x /bin/plymouthd ] && /bin/plymouthd --attach-to-session --pid-file /run/plymouth/pid -- /bin/plymouth --show-splash 2>&1 | vinfo -- # reset tty after plymouth messed with it -- [ -x /lib/udev/console_init ] && /lib/udev/console_init /dev/tty0 -+ info "Starting plymouth daemon" -+ mkdir -m 0755 /run/plymouth -+ consoledev=$(getarg console= | sed -e 's/,.*//') -+ consoledev=${consoledev:-tty0} -+ [ -x /lib/udev/console_init ] && /lib/udev/console_init "/dev/$consoledev" -+ [ -x /bin/plymouthd ] && /bin/plymouthd --attach-to-session --pid-file /run/plymouth/pid -+ /bin/plymouth --show-splash 2>&1 | vinfo -+ # reset tty after plymouth messed with it -+ [ -x /lib/udev/console_init ] && /lib/udev/console_init /dev/tty0 -+ fi - fi diff --git a/0016-man-Fix-add-fstab-option-in-man-page.patch b/0016-man-Fix-add-fstab-option-in-man-page.patch deleted file mode 100644 index b26d1ea..0000000 --- a/0016-man-Fix-add-fstab-option-in-man-page.patch +++ /dev/null @@ -1,22 +0,0 @@ -From bd66d2b59ab4077c48478e5c616d3ee31ebc9095 Mon Sep 17 00:00:00 2001 -From: Colin Guthrie -Date: Sat, 14 Apr 2012 18:14:29 +0100 -Subject: [PATCH] man: Fix --add-fstab option in man page - ---- - dracut.8.asc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/dracut.8.asc b/dracut.8.asc -index 24b7a8c..cadd740 100644 ---- a/dracut.8.asc -+++ b/dracut.8.asc -@@ -247,7 +247,7 @@ provide a valid _/etc/fstab_. - **--fstab**:: - Use _/etc/fstab_ instead of _/proc/self/mountinfo_. - --**--add_fstab** __ :: -+**--add-fstab** __ :: - Add entries of __ to the initramfs /etc/fstab. - - **--mount** "__ __ __ __":: diff --git a/0017-udevd-moved-to-lib-systemd-systemd-udevd.patch b/0017-udevd-moved-to-lib-systemd-systemd-udevd.patch deleted file mode 100644 index 7b7558d..0000000 --- a/0017-udevd-moved-to-lib-systemd-systemd-udevd.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 8a1a2f6ca4c9c82f45ed793ffc9902451a04bc41 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 18 Apr 2012 12:42:39 +0200 -Subject: [PATCH] udevd moved to /lib/systemd/systemd-udevd - ---- - dracut.conf.d/fedora.conf.example | 1 + - modules.d/95udev-rules/module-setup.sh | 10 +++++++++- - modules.d/99base/init.sh | 2 +- - 3 files changed, 11 insertions(+), 2 deletions(-) - -diff --git a/dracut.conf.d/fedora.conf.example b/dracut.conf.d/fedora.conf.example -index 02a530e..617d967 100644 ---- a/dracut.conf.d/fedora.conf.example -+++ b/dracut.conf.d/fedora.conf.example -@@ -8,3 +8,4 @@ omit_drivers+=" .*/fs/ocfs/.* " - stdloglvl=3 - realinitpath="/usr/lib/systemd/systemd" - install_items+=" vi /etc/virc ps grep cat rm " -+prefix="/" -diff --git a/modules.d/95udev-rules/module-setup.sh b/modules.d/95udev-rules/module-setup.sh -index b17232f..cc42eb7 100755 ---- a/modules.d/95udev-rules/module-setup.sh -+++ b/modules.d/95udev-rules/module-setup.sh -@@ -8,12 +8,20 @@ install() { - # ultimately, /lib/initramfs/rules.d or somesuch which includes links/copies - # of the rules we want so that we just copy those in would be best - dracut_install udevadm -- [ -x /sbin/udevd ] && dracut_install udevd -+ if [ -x /sbin/udevd ]; then -+ dracut_install udevd -+ mkdir -p ${initdir}/lib/systemd -+ ln -s /sbin/udevd ${initdir}/lib/systemd/systemd-udevd -+ elif [ -x /lib/systemd/systemd-udevd ]; then -+ inst /lib/systemd/systemd-udevd -+ fi - - for i in /etc/udev/udev.conf /etc/group; do - inst_simple $i - done -+ - dracut_install basename -+ - inst_rules 50-udev-default.rules 60-persistent-storage.rules \ - 61-persistent-storage-edd.rules 80-drivers.rules 95-udev-late.rules \ - 60-pcmcia.rules -diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh -index 2f87a20..0ea72e8 100755 ---- a/modules.d/99base/init.sh -+++ b/modules.d/99base/init.sh -@@ -110,7 +110,7 @@ getarg 'rd.break=pre-udev' 'rdbreak=pre-udev' && emergency_shell -n pre-udev "Br - source_hook pre-udev - - # start up udev and trigger cold plugs --udevd --daemon --resolve-names=never -+/lib/systemd/systemd-udevd --daemon --resolve-names=never - - UDEV_LOG_PRIO_ARG=--log-priority - UDEV_QUEUE_EMPTY="udevadm settle --timeout=0" diff --git a/0018-base-init.sh-mount-tmpfs-with-strictatime.patch b/0018-base-init.sh-mount-tmpfs-with-strictatime.patch deleted file mode 100644 index 4f056f8..0000000 --- a/0018-base-init.sh-mount-tmpfs-with-strictatime.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 7f217d77266d4c9c283e7a6d4f576d412a1df9e5 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 18 Apr 2012 12:44:00 +0200 -Subject: [PATCH] base/init.sh: mount tmpfs with strictatime - ---- - modules.d/99base/init.sh | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh -index 0ea72e8..65bc88f 100755 ---- a/modules.d/99base/init.sh -+++ b/modules.d/99base/init.sh -@@ -46,7 +46,7 @@ if [ "$RD_DEBUG" = "yes" ]; then - fi - - if ! ismounted /dev; then -- mount -t devtmpfs -o mode=0755,nosuid devtmpfs /dev >/dev/null -+ mount -t devtmpfs -o mode=0755,nosuid,strictatime devtmpfs /dev >/dev/null - fi - - # prepare the /dev directory -@@ -62,12 +62,12 @@ fi - - if ! ismounted /dev/shm; then - mkdir -m 0755 /dev/shm -- mount -t tmpfs -o mode=1777,nosuid,nodev tmpfs /dev/shm >/dev/null -+ mount -t tmpfs -o mode=1777,nosuid,nodev,strictatime tmpfs /dev/shm >/dev/null - fi - - if ! ismounted /run; then - mkdir -m 0755 /newrun -- mount -t tmpfs -o mode=0755,nosuid,nodev tmpfs /newrun >/dev/null -+ mount -t tmpfs -o mode=0755,nosuid,nodev,strictatime tmpfs /newrun >/dev/null - cp -a /run/* /newrun >/dev/null 2>&1 - mount --move /newrun /run - rm -fr /newrun diff --git a/0019-99shutdown-shutdown.sh-export-PATH.patch b/0019-99shutdown-shutdown.sh-export-PATH.patch deleted file mode 100644 index 4992a2b..0000000 --- a/0019-99shutdown-shutdown.sh-export-PATH.patch +++ /dev/null @@ -1,26 +0,0 @@ -From b4664769dc63959c60c459effcf64ba284afdc55 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 18 Apr 2012 13:08:12 +0200 -Subject: [PATCH] 99shutdown/shutdown.sh: export PATH - ---- - modules.d/99shutdown/shutdown.sh | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) - -diff --git a/modules.d/99shutdown/shutdown.sh b/modules.d/99shutdown/shutdown.sh -index 45345a4..aa0a81f 100755 ---- a/modules.d/99shutdown/shutdown.sh -+++ b/modules.d/99shutdown/shutdown.sh -@@ -7,10 +7,9 @@ - # Copyright 2011, Red Hat, Inc. - # Harald Hoyer - --#!/bin/sh --. /lib/dracut-lib.sh - export TERM=linux --PATH=/usr/sbin:/usr/bin:/sbin:/bin -+export PATH=/usr/sbin:/usr/bin:/sbin:/bin -+. /lib/dracut-lib.sh - - trap "emergency_shell --shutdown shutdown Signal caught!" 0 - getarg 'rd.break=pre-shutdown' && emergency_shell --shutdown pre-shutdown "Break before pre-shutdown" diff --git a/0020-Makefile-do-not-install-systemd-service-in-reboot.patch b/0020-Makefile-do-not-install-systemd-service-in-reboot.patch deleted file mode 100644 index e34ee4d..0000000 --- a/0020-Makefile-do-not-install-systemd-service-in-reboot.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 2de297334b4e186c1c823e8a1e04f46ae46b899a Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 18 Apr 2012 13:14:55 +0200 -Subject: [PATCH] Makefile: do not install systemd service in reboot - -shutdown is enough. It is pulled in on reboot. ---- - Makefile | 3 --- - 1 file changed, 3 deletions(-) - -diff --git a/Makefile b/Makefile -index c62aae1..5ce1778 100644 ---- a/Makefile -+++ b/Makefile -@@ -57,11 +57,8 @@ install: doc - if [ -n "$(systemdsystemunitdir)" ]; then \ - mkdir -p $(DESTDIR)$(systemdsystemunitdir); \ - install -m 0644 dracut-shutdown.service $(DESTDIR)$(systemdsystemunitdir); \ -- mkdir -p $(DESTDIR)$(systemdsystemunitdir)/reboot.target.wants; \ - mkdir -p $(DESTDIR)$(systemdsystemunitdir)/shutdown.target.wants; \ - ln -s ../dracut-shutdown.service \ -- $(DESTDIR)$(systemdsystemunitdir)/reboot.target.wants/dracut-shutdown.service; \ -- ln -s ../dracut-shutdown.service \ - $(DESTDIR)$(systemdsystemunitdir)/shutdown.target.wants/dracut-shutdown.service; \ - fi - diff --git a/0021-network-module-setup.sh-include-all-kernel-drivers-n.patch b/0021-network-module-setup.sh-include-all-kernel-drivers-n.patch deleted file mode 100644 index 563be43..0000000 --- a/0021-network-module-setup.sh-include-all-kernel-drivers-n.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 76b83902dc28c8b7240c346b3e9a721712301bbf Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 18 Apr 2012 13:49:48 +0200 -Subject: [PATCH] network/module-setup.sh: include all kernel/drivers/net/phy - drivers - ---- - modules.d/40network/module-setup.sh | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh -index 97fc5cb..253a87e 100755 ---- a/modules.d/40network/module-setup.sh -+++ b/modules.d/40network/module-setup.sh -@@ -61,6 +61,7 @@ installkernel() { - { find_kernel_modules_by_path drivers/net; find_kernel_modules_by_path drivers/s390/net; } \ - | net_module_filter | instmods - -+ instmods =drivers/net/phy - instmods ecb arc4 - # bridge modules - instmods bridge stp llc diff --git a/0022-add-pre-pivot-cleanup-hook.patch b/0022-add-pre-pivot-cleanup-hook.patch deleted file mode 100644 index b60a5de..0000000 --- a/0022-add-pre-pivot-cleanup-hook.patch +++ /dev/null @@ -1,105 +0,0 @@ -From 2e7257a2e3bf91c11e8cc56f609b288403f9be14 Mon Sep 17 00:00:00 2001 -From: Dave Young -Date: Thu, 19 Apr 2012 12:01:36 +0800 -Subject: [PATCH] add pre-pivot-cleanup hook - -Sometimes some hook script will need to be before the cleanup hook scripts -For example dhclient killing, nfs cleanup, etc. must not happen before kdump -because it will use their fuctionalities. - -So here introduce a new hook pre-pivot-cleanup, all cleanup scripts will go there. -that means pre-pivot hook is splited to two hooks pre-pivot and pre-pivot-cleanup - -Signed-off-by: Dave Young ---- - README.modules | 3 +++ - dracut-functions.sh | 2 +- - dracut.asc | 7 ++++++- - dracut.cmdline.7.asc | 2 +- - modules.d/99base/init.sh | 7 ++++++- - 5 files changed, 17 insertions(+), 4 deletions(-) - -diff --git a/README.modules b/README.modules -index 21461de..188d011 100644 ---- a/README.modules -+++ b/README.modules -@@ -103,6 +103,9 @@ init has the following hook points to inject scripts: - a timeout. - - /lib/dracut/hooks/pre-pivot/*.sh -+ scripts to run before latter initramfs cleanups -+ -+/lib/dracut/hooks/pre-pivot-cleanup/*.sh - scripts to run before the real init is executed and the initramfs - disappears - All processes started before should be killed here. -diff --git a/dracut-functions.sh b/dracut-functions.sh -index f5611dc..ccf3ba6 100755 ---- a/dracut-functions.sh -+++ b/dracut-functions.sh -@@ -36,7 +36,7 @@ fi - [[ $hookdirs ]] || { - hookdirs="cmdline pre-udev pre-trigger netroot " - hookdirs+="initqueue initqueue/settled initqueue/online initqueue/finished initqueue/timeout " -- hookdirs+="pre-mount pre-pivot mount " -+ hookdirs+="pre-mount pre-pivot pre-pivot-cleanup mount " - hookdirs+="emergency shutdown-emergency shutdown cleanup " - export hookdirs - } -diff --git a/dracut.asc b/dracut.asc -index 1a0e3d2..9621db2 100644 ---- a/dracut.asc -+++ b/dracut.asc -@@ -854,12 +854,17 @@ This hook is mainly to mount the real root device. - - === Hook: pre-pivot - -+This hook is called before pre-pivot-cleanup hook, This is a good place for -+actions other than cleanups which need to be called before pivot. -+ -+ -+=== Hook: pre-pivot-cleanup -+ - This hook is the last hook and is called before init finally switches root to - the real root device. This is a good place to clean up and kill processes not - needed anymore. - - -- - === Cleanup and switch_root - - Init kills all udev processes, cleans up the environment, sets up the arguments -diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc -index c77fee5..76db651 100644 ---- a/dracut.cmdline.7.asc -+++ b/dracut.cmdline.7.asc -@@ -105,7 +105,7 @@ Debug - **rd.break**:: - drop to a shell at the end - --**rd.break=**_{cmdline|pre-udev|pre-trigger|initqueue|pre-mount|mount|pre-pivot}_:: -+**rd.break=**_{cmdline|pre-udev|pre-trigger|initqueue|pre-mount|mount|pre-pivot|pre-pivot-cleanup}_:: - drop to a shell on defined breakpoint - - **rd.udev.info**:: -diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh -index 65bc88f..88ec184 100755 ---- a/modules.d/99base/init.sh -+++ b/modules.d/99base/init.sh -@@ -224,10 +224,15 @@ done - while read dev mp rest; do [ "$mp" = "$NEWROOT" ] && echo $dev; done < /proc/mounts - } | vinfo - --# pre pivot scripts are sourced just before we switch over to the new root. -+# pre pivot scripts are sourced just before we doing cleanup and switch over -+# to the new root. - getarg 'rd.break=pre-pivot' 'rdbreak=pre-pivot' && emergency_shell -n pre-pivot "Break pre-pivot" - source_hook pre-pivot - -+# pre pivot cleanup scripts are sourced just before we switch over to the new root. -+getarg 'rd.break=pre-pivot-cleanup' 'rdbreak=pre-pivot-cleanup' && emergency_shell -n pre-pivot-cleanup "Break pre-pivot-cleanup" -+source_hook pre-pivot-cleanup -+ - # By the time we get here, the root filesystem should be mounted. - # Try to find init. - for i in "$(getarg real_init=)" "$(getarg init=)" $(getargs rd.distroinit=) /sbin/init; do diff --git a/0023-move-cleanup-scripts-to-pre-pivot-cleanup-hook.patch b/0023-move-cleanup-scripts-to-pre-pivot-cleanup-hook.patch deleted file mode 100644 index 8618ece..0000000 --- a/0023-move-cleanup-scripts-to-pre-pivot-cleanup-hook.patch +++ /dev/null @@ -1,86 +0,0 @@ -From 1bd76bf981d5cec3d5ba879102d84040aa5b902d Mon Sep 17 00:00:00 2001 -From: Dave Young -Date: Thu, 19 Apr 2012 12:01:43 +0800 -Subject: [PATCH] move cleanup scripts to pre-pivot-cleanup hook - -below cleanup scripts is moved: -40network: kill-dhclient.sh -90crypt: crypt-cleanup.sh -90multipath: multipathd-stop.sh -95iscsi: cleanup-iscsi.sh -95nfs: nfsroot-cleanup.sh - -Signed-off-by: Dave Young ---- - modules.d/40network/module-setup.sh | 2 +- - modules.d/90crypt/module-setup.sh | 2 +- - modules.d/90multipath/module-setup.sh | 2 +- - modules.d/95iscsi/module-setup.sh | 2 +- - modules.d/95nfs/module-setup.sh | 2 +- - 5 files changed, 5 insertions(+), 5 deletions(-) - -diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh -index 253a87e..c2ad815 100755 ---- a/modules.d/40network/module-setup.sh -+++ b/modules.d/40network/module-setup.sh -@@ -86,7 +86,7 @@ install() { - inst_hook cmdline 97 "$moddir/parse-bridge.sh" - inst_hook cmdline 98 "$moddir/parse-ip-opts.sh" - inst_hook cmdline 99 "$moddir/parse-ifname.sh" -- inst_hook pre-pivot 10 "$moddir/kill-dhclient.sh" -+ inst_hook pre-pivot-cleanup 10 "$moddir/kill-dhclient.sh" - - _arch=$(uname -m) - -diff --git a/modules.d/90crypt/module-setup.sh b/modules.d/90crypt/module-setup.sh -index 8fdf32b..4a66516 100755 ---- a/modules.d/90crypt/module-setup.sh -+++ b/modules.d/90crypt/module-setup.sh -@@ -48,7 +48,7 @@ install() { - inst "$moddir"/probe-keydev.sh /sbin/probe-keydev - inst_hook cmdline 10 "$moddir/parse-keydev.sh" - inst_hook cmdline 30 "$moddir/parse-crypt.sh" -- inst_hook pre-pivot 30 "$moddir/crypt-cleanup.sh" -+ inst_hook pre-pivot-cleanup 30 "$moddir/crypt-cleanup.sh" - inst_simple /etc/crypttab - inst "$moddir/crypt-lib.sh" "/lib/dracut-crypt-lib.sh" - } -diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh -index 8a193c4..f044f33 100755 ---- a/modules.d/90multipath/module-setup.sh -+++ b/modules.d/90multipath/module-setup.sh -@@ -70,7 +70,7 @@ install() { - inst_libdir_file "multipath/*" - - inst_hook pre-trigger 02 "$moddir/multipathd.sh" -- inst_hook pre-pivot 02 "$moddir/multipathd-stop.sh" -+ inst_hook pre-pivot-cleanup 02 "$moddir/multipathd-stop.sh" - inst_rules 40-multipath.rules - } - -diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh -index b6c1c1f..a001a28 100755 ---- a/modules.d/95iscsi/module-setup.sh -+++ b/modules.d/95iscsi/module-setup.sh -@@ -63,7 +63,7 @@ install() { - inst hostname - inst iscsi-iname - inst_hook cmdline 90 "$moddir/parse-iscsiroot.sh" -- inst_hook pre-pivot 90 "$moddir/cleanup-iscsi.sh" -+ inst_hook pre-pivot-cleanup 90 "$moddir/cleanup-iscsi.sh" - inst "$moddir/iscsiroot.sh" "/sbin/iscsiroot" - inst "$moddir/mount-lun.sh" "/bin/mount-lun.sh" - } -diff --git a/modules.d/95nfs/module-setup.sh b/modules.d/95nfs/module-setup.sh -index 455f52f..3587bdd 100755 ---- a/modules.d/95nfs/module-setup.sh -+++ b/modules.d/95nfs/module-setup.sh -@@ -58,7 +58,7 @@ install() { - - inst_hook cmdline 90 "$moddir/parse-nfsroot.sh" - inst_hook pre-udev 99 "$moddir/nfs-start-rpc.sh" -- inst_hook pre-pivot 99 "$moddir/nfsroot-cleanup.sh" -+ inst_hook pre-pivot-cleanup 99 "$moddir/nfsroot-cleanup.sh" - inst "$moddir/nfsroot.sh" "/sbin/nfsroot" - inst "$moddir/nfs-lib.sh" "/lib/nfs-lib.sh" - mkdir -m 0755 -p "$initdir/var/lib/nfs/rpc_pipefs" diff --git a/0024-network-parse-ip-opts.sh-remove-check-for-netroot.patch b/0024-network-parse-ip-opts.sh-remove-check-for-netroot.patch deleted file mode 100644 index 9d39039..0000000 --- a/0024-network-parse-ip-opts.sh-remove-check-for-netroot.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 689c3e1fcd0fff7ae978d0543fa980272f89dff2 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 19 Apr 2012 16:41:04 +0200 -Subject: [PATCH] network/parse-ip-opts.sh: remove check for netroot - -with anaconda and all other kind of stuff, we might want network, even -for root not on the network ---- - modules.d/40network/parse-ip-opts.sh | 8 -------- - 1 file changed, 8 deletions(-) - -diff --git a/modules.d/40network/parse-ip-opts.sh b/modules.d/40network/parse-ip-opts.sh -index 97702a2..5637a9a 100755 ---- a/modules.d/40network/parse-ip-opts.sh -+++ b/modules.d/40network/parse-ip-opts.sh -@@ -17,14 +17,6 @@ - command -v getarg >/dev/null || . /lib/dracut-lib.sh - command -v ibft_to_cmdline >/dev/null || . /lib/net-lib.sh - --# Check if ip= lines should be used --if getarg ip= >/dev/null ; then -- if [ -z "$netroot" ] ; then -- echo "Warning: No netboot configured, ignoring ip= lines" -- return; -- fi --fi -- - # Don't mix BOOTIF=macaddr from pxelinux and ip= lines - getarg ip= >/dev/null && getarg BOOTIF= >/dev/null && \ - die "Mixing BOOTIF and ip= lines is dangerous" diff --git a/0025-url-lib-don-t-add-existing-handlers-multiple-times.patch b/0025-url-lib-don-t-add-existing-handlers-multiple-times.patch deleted file mode 100644 index 89d342c..0000000 --- a/0025-url-lib-don-t-add-existing-handlers-multiple-times.patch +++ /dev/null @@ -1,27 +0,0 @@ -From c6a91ec9928f7f09dd70ad597bf96ac60f6b652d Mon Sep 17 00:00:00 2001 -From: Will Woods -Date: Fri, 20 Apr 2012 16:20:24 -0400 -Subject: [PATCH] url-lib: don't add existing handlers multiple times - -Every time url-lib gets imported we end up making the list of handlers -longer with redundant entries. That's silly - we shouldn't add items -that already exist. - -Note that this means you'll have to manipulate the handler list yourself -if you want to change the position/priority of existing handlers. ---- - modules.d/45url-lib/url-lib.sh | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/modules.d/45url-lib/url-lib.sh b/modules.d/45url-lib/url-lib.sh -index e305a68..7930146 100755 ---- a/modules.d/45url-lib/url-lib.sh -+++ b/modules.d/45url-lib/url-lib.sh -@@ -43,6 +43,7 @@ add_url_handler() { - local schemes="$@" scheme="" - set -- - for scheme in $schemes; do -+ [ "$(get_url_handler $scheme)" = "$handler" ] && continue - set -- "$@" "$scheme:$handler" - done - set -- $@ $url_handler_map # add new items to *front* of list diff --git a/0026-url-lib-don-t-use-progress-bar-if-TERM-dumb-RHBZ-814.patch b/0026-url-lib-don-t-use-progress-bar-if-TERM-dumb-RHBZ-814.patch deleted file mode 100644 index 70b8b29..0000000 --- a/0026-url-lib-don-t-use-progress-bar-if-TERM-dumb-RHBZ-814.patch +++ /dev/null @@ -1,34 +0,0 @@ -From dc1504121b1119f9d797aa276f040f3dfe9d56a3 Mon Sep 17 00:00:00 2001 -From: Will Woods -Date: Fri, 20 Apr 2012 16:20:25 -0400 -Subject: [PATCH] url-lib: don't use --progress-bar if TERM=dumb (RHBZ#814713) - -Basically, s390 is the only place I've ever seen TERM=dumb, and it's too -dumb to handle '\r', so --progress-bar produces waaaaay too much output. - -The normal progress meter only prints something once per second, so -that's reasonable on terminals where '\r' doesn't work. - -See also: https://bugzilla.redhat.com/show_bug.cgi?id=814713 ---- - modules.d/45url-lib/url-lib.sh | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/modules.d/45url-lib/url-lib.sh b/modules.d/45url-lib/url-lib.sh -index 7930146..5721294 100755 ---- a/modules.d/45url-lib/url-lib.sh -+++ b/modules.d/45url-lib/url-lib.sh -@@ -54,7 +54,12 @@ add_url_handler() { - - export CURL_HOME="/run/initramfs/url-lib" - mkdir -p $CURL_HOME --curl_args="--location --retry 3 --fail --show-error --progress-bar" -+curl_args="--location --retry 3 --fail --show-error" -+ -+# technically "dumb" can handle the progress bar, but the only thing I've ever -+# seen using TERM=dumb is s390 CMS, and it's too dumb for --progress-bar -+[ "$TERM" != "dumb" ] && curl_args="$curl_args --progress-bar" -+ - curl_fetch_url() { - local url="$1" outloc="$2" - echo "$url" > /proc/self/fd/0 diff --git a/0027-base-add-debug_on-and-debug_off-functions.patch b/0027-base-add-debug_on-and-debug_off-functions.patch deleted file mode 100644 index 8f767ef..0000000 --- a/0027-base-add-debug_on-and-debug_off-functions.patch +++ /dev/null @@ -1,206 +0,0 @@ -From c32908cee324c60cc6d31a7030a9fb11cdfa0d45 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 23 Apr 2012 11:28:10 +0200 -Subject: [PATCH] base: add debug_on() and debug_off() functions - ---- - modules.d/99base/dracut-lib.sh | 42 +++++++++++++++++++++++++++------------- - modules.d/99base/init.sh | 6 ++---- - 2 files changed, 31 insertions(+), 17 deletions(-) - -diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh -index a29d586..f46c4a7 100755 ---- a/modules.d/99base/dracut-lib.sh -+++ b/modules.d/99base/dracut-lib.sh -@@ -2,6 +2,14 @@ - # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- - # ex: ts=8 sw=4 sts=4 et filetype=sh - -+debug_off() { -+ set +x -+} -+ -+debug_on() { -+ [ "$RD_DEBUG" = "yes" ] && set -x -+} -+ - # returns OK if $1 contains $2 - strstr() { - [ "${1#*$2*}" != "$1" ] -@@ -93,29 +101,29 @@ _dogetarg() { - } - - getarg() { -- set +x -+ debug_off - while [ $# -gt 0 ]; do - case $1 in - -y) if _dogetarg $2 >/dev/null; then - echo 1 -- [ "$RD_DEBUG" = "yes" ] && set -x -+ debug_on - return 0 - fi - shift 2;; - -n) if _dogetarg $2 >/dev/null; then - echo 0; -- [ "$RD_DEBUG" = "yes" ] && set -x -+ debug_on - return 1 - fi - shift 2;; - *) if _dogetarg $1; then -- [ "$RD_DEBUG" = "yes" ] && set -x -+ debug_on - return 0; - fi - shift;; - esac - done -- [ "$RD_DEBUG" = "yes" ] && set -x -+ debug_on - return 1 - } - -@@ -135,7 +143,7 @@ getargbool() { - } - - _dogetargs() { -- set +x -+ debug_off - local _o _found _key - unset _o - unset _found -@@ -158,7 +166,7 @@ _dogetargs() { - } - - getargs() { -- set +x -+ debug_off - local _val _i _args _gfound - unset _val - unset _gfound -@@ -175,10 +183,10 @@ getargs() { - else - echo -n 1 - fi -- [ "$RD_DEBUG" = "yes" ] && set -x -+ debug_on - return 0 - fi -- [ "$RD_DEBUG" = "yes" ] && set -x -+ debug_on - return 1; - } - -@@ -221,6 +229,7 @@ getoptcomma() { - # - # TODO: ':' inside fields. - splitsep() { -+ debug_off - local sep="$1"; local str="$2"; shift 2 - local tmp - -@@ -232,7 +241,7 @@ splitsep() { - shift - done - [ -n "$str" -a -n "$1" ] && eval "$1=$str" -- -+ debug_on - return 0 - } - -@@ -248,7 +257,7 @@ setdebug() { - fi - export RD_DEBUG - fi -- [ "$RD_DEBUG" = "yes" ] && set -x -+ debug_on - } - - setdebug -@@ -347,6 +356,7 @@ check_occurances() { - } - - incol2() { -+ debug_off - local dummy check; - local file="$1"; - local str="$2"; -@@ -355,8 +365,12 @@ incol2() { - [ -z "$str" ] && return 1; - - while read dummy check restofline; do -- [ "$check" = "$str" ] && return 0 -+ if [ "$check" = "$str" ]; then -+ debug_on -+ return 0 -+ fi - done < $file -+ debug_on - return 1 - } - -@@ -719,6 +733,7 @@ cancel_wait_for_dev() - } - - killproc() { -+ debug_off - local _exe="$(command -v $1)" - local _sig=$2 - local _i -@@ -729,6 +744,7 @@ killproc() { - kill $_sig ${_i##*/} - fi - done -+ debug_on - } - - need_shutdown() { -@@ -739,7 +755,7 @@ wait_for_loginit() - { - [ "$RD_DEBUG" = "yes" ] || return - [ -e /run/initramfs/loginit.pipe ] || return -- set +x -+ debug_off - echo "DRACUT_LOG_END" - exec 0<>/dev/console 1<>/dev/console 2<>/dev/console - # wait for loginit -diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh -index 88ec184..cb03137 100755 ---- a/modules.d/99base/init.sh -+++ b/modules.d/99base/init.sh -@@ -277,7 +277,6 @@ for var in root rflags fstype netroot NEWROOT; do - done - - export RD_TIMESTAMP --set +x # Turn off debugging for this section - # Clean up the environment - for i in $(export -p); do - i=${i#declare -x} -@@ -298,7 +297,6 @@ rm -f /tmp/export.orig - initargs="" - read CLINE /dev/null ; then -- set +x # Turn off debugging for this section - ignoreargs="console BOOT_IMAGE" - # only pass arguments after init= to the init - CLINE=${CLINE#*init=} -@@ -312,7 +310,7 @@ if getarg init= >/dev/null ; then - done - unset CLINE - else -- set +x # Turn off debugging for this section -+ debug_off # Turn off debugging for this section - set -- $CLINE - for x in "$@"; do - case "$x" in -@@ -322,7 +320,7 @@ else - esac - done - fi --[ "$RD_DEBUG" = "yes" ] && set -x -+debug_on - - if ! [ -d "$NEWROOT"/run ]; then - NEWRUN=/dev/.initramfs diff --git a/0028-base-add-export_n-function.patch b/0028-base-add-export_n-function.patch deleted file mode 100644 index 614b16f..0000000 --- a/0028-base-add-export_n-function.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 476eb1b345764a7317f32da52b9b36f26fdf51ba Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 23 Apr 2012 11:28:59 +0200 -Subject: [PATCH] base: add export_n() function - -resembles export -n for dash ---- - modules.d/99base/dracut-lib.sh | 13 +++++++++++++ - modules.d/99base/init.sh | 12 ++++-------- - 2 files changed, 17 insertions(+), 8 deletions(-) - -diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh -index f46c4a7..a4aa20c 100755 ---- a/modules.d/99base/dracut-lib.sh -+++ b/modules.d/99base/dracut-lib.sh -@@ -821,3 +821,16 @@ emergency_shell() - exit 1 - fi - } -+ -+# Retain the values of these variables but ensure that they are unexported -+# This is a POSIX-compliant equivalent of bash's "export -n" -+export_n() -+{ -+ local var -+ local val -+ for var in "$@"; do -+ eval val=\$$var -+ unset $var -+ [ -n "$val" ] && eval $var=\"$val\" -+ done -+} -diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh -index cb03137..aea739f 100755 ---- a/modules.d/99base/init.sh -+++ b/modules.d/99base/init.sh -@@ -251,7 +251,6 @@ done - emergency_shell - } - -- - if [ $UDEVVERSION -lt 168 ]; then - # stop udev queue before killing it - udevadm control --stop-exec-queue -@@ -268,13 +267,10 @@ else - udevadm info --cleanup-db - fi - --# Retain the values of these variables but ensure that they are unexported --# This is a POSIX-compliant equivalent of bash's "export -n" --for var in root rflags fstype netroot NEWROOT; do -- eval tmp=\$$var -- unset $var -- [ -n "$tmp" ] && eval $var=\"$tmp\" --done -+debug_off # Turn off debugging for this section -+ -+# unexport some vars -+export_n root rflags fstype netroot NEWROOT - - export RD_TIMESTAMP - # Clean up the environment diff --git a/0029-base-dracut-lib.sh-add-arguments-for-source_hook-and.patch b/0029-base-dracut-lib.sh-add-arguments-for-source_hook-and.patch deleted file mode 100644 index 266428b..0000000 --- a/0029-base-dracut-lib.sh-add-arguments-for-source_hook-and.patch +++ /dev/null @@ -1,37 +0,0 @@ -From f8d50f60b376682217eb1a88e2e07c54cd5e9955 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 23 Apr 2012 11:30:08 +0200 -Subject: [PATCH] base/dracut-lib.sh: add arguments for source_hook() and - source_all() - ---- - modules.d/99base/dracut-lib.sh | 10 +++++++--- - 1 file changed, 7 insertions(+), 3 deletions(-) - -diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh -index a4aa20c..a6b8d1a 100755 ---- a/modules.d/99base/dracut-lib.sh -+++ b/modules.d/99base/dracut-lib.sh -@@ -264,15 +264,19 @@ setdebug - - source_all() { - local f -- [ "$1" ] && [ -d "/$1" ] || return -- for f in "/$1"/*.sh; do [ -e "$f" ] && . "$f"; done -+ local _dir -+ _dir=$1; shift -+ [ "$_dir" ] && [ -d "/$_dir" ] || return -+ for f in "/$_dir"/*.sh; do [ -e "$f" ] && . "$f" "$@"; done - } - - hookdir=/lib/dracut/hooks - export hookdir - - source_hook() { -- source_all "/lib/dracut/hooks/$1" -+ local _dir -+ _dir=$1; shift -+ source_all "/lib/dracut/hooks/$_dir" "$@" - } - - check_finished() { diff --git a/0030-merge-cleanup-and-pre-pivot-cleanup-hooks.patch b/0030-merge-cleanup-and-pre-pivot-cleanup-hooks.patch deleted file mode 100644 index 102d7e1..0000000 --- a/0030-merge-cleanup-and-pre-pivot-cleanup-hooks.patch +++ /dev/null @@ -1,165 +0,0 @@ -From eef7649e712481aa3bd821d4b11c39541611b4fd Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 23 Apr 2012 11:31:32 +0200 -Subject: [PATCH] merge "cleanup" and "pre-pivot-cleanup" hooks - ---- - README.modules | 2 +- - dracut-functions.sh | 4 ++-- - dracut.asc | 4 ++-- - dracut.cmdline.7.asc | 2 +- - modules.d/40network/module-setup.sh | 2 +- - modules.d/90crypt/module-setup.sh | 2 +- - modules.d/90multipath/module-setup.sh | 2 +- - modules.d/95iscsi/module-setup.sh | 2 +- - modules.d/95nfs/module-setup.sh | 2 +- - modules.d/99base/init.sh | 5 ++--- - 10 files changed, 13 insertions(+), 14 deletions(-) - -diff --git a/README.modules b/README.modules -index 188d011..64d533f 100644 ---- a/README.modules -+++ b/README.modules -@@ -105,7 +105,7 @@ init has the following hook points to inject scripts: - /lib/dracut/hooks/pre-pivot/*.sh - scripts to run before latter initramfs cleanups - --/lib/dracut/hooks/pre-pivot-cleanup/*.sh -+/lib/dracut/hooks/cleanup/*.sh - scripts to run before the real init is executed and the initramfs - disappears - All processes started before should be killed here. -diff --git a/dracut-functions.sh b/dracut-functions.sh -index ccf3ba6..ff4e16d 100755 ---- a/dracut-functions.sh -+++ b/dracut-functions.sh -@@ -36,8 +36,8 @@ fi - [[ $hookdirs ]] || { - hookdirs="cmdline pre-udev pre-trigger netroot " - hookdirs+="initqueue initqueue/settled initqueue/online initqueue/finished initqueue/timeout " -- hookdirs+="pre-mount pre-pivot pre-pivot-cleanup mount " -- hookdirs+="emergency shutdown-emergency shutdown cleanup " -+ hookdirs+="pre-mount pre-pivot cleanup mount " -+ hookdirs+="emergency shutdown-emergency shutdown " - export hookdirs - } - -diff --git a/dracut.asc b/dracut.asc -index 9621db2..a6e050d 100644 ---- a/dracut.asc -+++ b/dracut.asc -@@ -854,11 +854,11 @@ This hook is mainly to mount the real root device. - - === Hook: pre-pivot - --This hook is called before pre-pivot-cleanup hook, This is a good place for -+This hook is called before cleanup hook, This is a good place for - actions other than cleanups which need to be called before pivot. - - --=== Hook: pre-pivot-cleanup -+=== Hook: cleanup - - This hook is the last hook and is called before init finally switches root to - the real root device. This is a good place to clean up and kill processes not -diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc -index 76db651..61cd139 100644 ---- a/dracut.cmdline.7.asc -+++ b/dracut.cmdline.7.asc -@@ -105,7 +105,7 @@ Debug - **rd.break**:: - drop to a shell at the end - --**rd.break=**_{cmdline|pre-udev|pre-trigger|initqueue|pre-mount|mount|pre-pivot|pre-pivot-cleanup}_:: -+**rd.break=**_{cmdline|pre-udev|pre-trigger|initqueue|pre-mount|mount|pre-pivot|cleanup}_:: - drop to a shell on defined breakpoint - - **rd.udev.info**:: -diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh -index c2ad815..d49b594 100755 ---- a/modules.d/40network/module-setup.sh -+++ b/modules.d/40network/module-setup.sh -@@ -86,7 +86,7 @@ install() { - inst_hook cmdline 97 "$moddir/parse-bridge.sh" - inst_hook cmdline 98 "$moddir/parse-ip-opts.sh" - inst_hook cmdline 99 "$moddir/parse-ifname.sh" -- inst_hook pre-pivot-cleanup 10 "$moddir/kill-dhclient.sh" -+ inst_hook cleanup 10 "$moddir/kill-dhclient.sh" - - _arch=$(uname -m) - -diff --git a/modules.d/90crypt/module-setup.sh b/modules.d/90crypt/module-setup.sh -index 4a66516..5082434 100755 ---- a/modules.d/90crypt/module-setup.sh -+++ b/modules.d/90crypt/module-setup.sh -@@ -48,7 +48,7 @@ install() { - inst "$moddir"/probe-keydev.sh /sbin/probe-keydev - inst_hook cmdline 10 "$moddir/parse-keydev.sh" - inst_hook cmdline 30 "$moddir/parse-crypt.sh" -- inst_hook pre-pivot-cleanup 30 "$moddir/crypt-cleanup.sh" -+ inst_hook cleanup 30 "$moddir/crypt-cleanup.sh" - inst_simple /etc/crypttab - inst "$moddir/crypt-lib.sh" "/lib/dracut-crypt-lib.sh" - } -diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh -index f044f33..2bc1b41 100755 ---- a/modules.d/90multipath/module-setup.sh -+++ b/modules.d/90multipath/module-setup.sh -@@ -70,7 +70,7 @@ install() { - inst_libdir_file "multipath/*" - - inst_hook pre-trigger 02 "$moddir/multipathd.sh" -- inst_hook pre-pivot-cleanup 02 "$moddir/multipathd-stop.sh" -+ inst_hook cleanup 02 "$moddir/multipathd-stop.sh" - inst_rules 40-multipath.rules - } - -diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh -index a001a28..2f343ee 100755 ---- a/modules.d/95iscsi/module-setup.sh -+++ b/modules.d/95iscsi/module-setup.sh -@@ -63,7 +63,7 @@ install() { - inst hostname - inst iscsi-iname - inst_hook cmdline 90 "$moddir/parse-iscsiroot.sh" -- inst_hook pre-pivot-cleanup 90 "$moddir/cleanup-iscsi.sh" -+ inst_hook cleanup 90 "$moddir/cleanup-iscsi.sh" - inst "$moddir/iscsiroot.sh" "/sbin/iscsiroot" - inst "$moddir/mount-lun.sh" "/bin/mount-lun.sh" - } -diff --git a/modules.d/95nfs/module-setup.sh b/modules.d/95nfs/module-setup.sh -index 3587bdd..1d62e95 100755 ---- a/modules.d/95nfs/module-setup.sh -+++ b/modules.d/95nfs/module-setup.sh -@@ -58,7 +58,7 @@ install() { - - inst_hook cmdline 90 "$moddir/parse-nfsroot.sh" - inst_hook pre-udev 99 "$moddir/nfs-start-rpc.sh" -- inst_hook pre-pivot-cleanup 99 "$moddir/nfsroot-cleanup.sh" -+ inst_hook cleanup 99 "$moddir/nfsroot-cleanup.sh" - inst "$moddir/nfsroot.sh" "/sbin/nfsroot" - inst "$moddir/nfs-lib.sh" "/lib/nfs-lib.sh" - mkdir -m 0755 -p "$initdir/var/lib/nfs/rpc_pipefs" -diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh -index aea739f..cba2e1a 100755 ---- a/modules.d/99base/init.sh -+++ b/modules.d/99base/init.sh -@@ -230,8 +230,8 @@ getarg 'rd.break=pre-pivot' 'rdbreak=pre-pivot' && emergency_shell -n pre-pivot - source_hook pre-pivot - - # pre pivot cleanup scripts are sourced just before we switch over to the new root. --getarg 'rd.break=pre-pivot-cleanup' 'rdbreak=pre-pivot-cleanup' && emergency_shell -n pre-pivot-cleanup "Break pre-pivot-cleanup" --source_hook pre-pivot-cleanup -+getarg 'rd.break=cleanup' 'rdbreak=cleanup' && emergency_shell -n cleanup "Break cleanup" -+source_hook cleanup - - # By the time we get here, the root filesystem should be mounted. - # Try to find init. -@@ -332,7 +332,6 @@ wait_for_loginit - getarg rd.break rdbreak && emergency_shell -n switch_root "Break before switch_root" - info "Switching root" - --source_hook cleanup - - unset PS4 - diff --git a/0031-network-fix-ifup-and-netroot-calling.patch b/0031-network-fix-ifup-and-netroot-calling.patch deleted file mode 100644 index 1a8c83d..0000000 --- a/0031-network-fix-ifup-and-netroot-calling.patch +++ /dev/null @@ -1,270 +0,0 @@ -From c6c704fda61d791303ea71f49e914b260ff90dca Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 23 Apr 2012 11:31:59 +0200 -Subject: [PATCH] network: fix ifup and netroot calling - ---- - modules.d/40network/dhclient-script.sh | 32 ++++++++-------- - modules.d/40network/ifup.sh | 65 ++++++++++++++------------------ - modules.d/40network/net-genrules.sh | 6 --- - modules.d/40network/net-lib.sh | 4 -- - modules.d/40network/netroot.sh | 27 ++----------- - 5 files changed, 48 insertions(+), 86 deletions(-) - -diff --git a/modules.d/40network/dhclient-script.sh b/modules.d/40network/dhclient-script.sh -index 52e4900..dd893c1 100755 ---- a/modules.d/40network/dhclient-script.sh -+++ b/modules.d/40network/dhclient-script.sh -@@ -22,15 +22,15 @@ setup_interface() { - # disallow MTUs from 576 and below by default, so that broken - # MTUs are ignored, but higher stuff is allowed (1492, 1500, etc). - if [ -n "$mtu" ] && [ $mtu -gt 576 ] ; then -- echo "if ! ip link set $netif mtu $mtu ; then" -- echo "ip link set $netif down" -- echo "ip link set $netif mtu $mtu" -- echo "ip link set $netif up" -- echo wait_for_if_up $netif -- echo "fi" -- fi > /tmp/net.$netif.up -+ if ! ip link set $netif mtu $mtu ; then -+ ip link set $netif down -+ ip link set $netif mtu $mtu -+ ip link set $netif up -+ wait_for_if_up $netif -+ fi -+ fi - -- echo ip addr add $ip${mask:+/$mask} ${bcast:+broadcast $bcast} dev $netif >> /tmp/net.$netif.up -+ ip addr add $ip${mask:+/$mask} ${bcast:+broadcast $bcast} dev $netif - - [ -n "$gw" ] && echo ip route add default via $gw dev $netif > /tmp/net.$netif.gw - -@@ -75,14 +75,16 @@ case $reason in - [ "${line#new_}" = "$line" ] && continue - echo "$line" - done >/tmp/dhclient.$netif.dhcpopts -- echo online > /sys/class/net/$netif/uevent - -- if [ -e /tmp/net.$netif.manualup ]; then -- /sbin/netroot $netif -m -- rm -f /tmp/net.$netif.manualup -- else -- initqueue --onetime --name netroot-$netif netroot $netif -- fi -+ { -+ echo '. /lib/net-lib.sh' -+ echo "setup_net $netif" -+ echo "source_hook initqueue/online $netif" -+ [ -e /tmp/net.$netif.manualup ] || echo "/sbin/netroot $netif" -+ echo "rm -f $hookdir/initqueue/setup_net_$netif.sh" -+ } > $hookdir/initqueue/setup_net_$netif.sh -+ -+ >/tmp/net.$netif.up - ;; - *) echo "dhcp: $reason";; - esac -diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh -index 2111b41..71b869d 100755 ---- a/modules.d/40network/ifup.sh -+++ b/modules.d/40network/ifup.sh -@@ -40,10 +40,6 @@ if [ -e /tmp/bridge.info ]; then - fi - fi - --# bail immediately if the interface is already up --# or we don't need the network --[ -f "/tmp/net.$netif.up" ] && exit 0 -- - # disable manual ifup while netroot is set for simplifying our logic - # in netroot case we prefer netroot to bringup $netif automaticlly - [ -n "$2" -a "$2" = "-m" ] && [ -z "$netroot" ] && manualup="$2" -@@ -72,13 +68,11 @@ load_ipv6() { - - do_ipv6auto() { - load_ipv6 -- { -- echo 0 > /proc/sys/net/ipv6/conf/$netif/forwarding -- echo 1 > /proc/sys/net/ipv6/conf/$netif/accept_ra -- echo 1 > /proc/sys/net/ipv6/conf/$netif/accept_redirects -- echo ip link set $netif up -- echo wait_for_if_up $netif -- } > /tmp/net.$netif.up -+ echo 0 > /proc/sys/net/ipv6/conf/$netif/forwarding -+ echo 1 > /proc/sys/net/ipv6/conf/$netif/accept_ra -+ echo 1 > /proc/sys/net/ipv6/conf/$netif/accept_redirects -+ ip link set $netif up -+ wait_for_if_up $netif - - [ -n "$hostname" ] && echo "echo $hostname > /proc/sys/kernel/hostname" > /tmp/net.$netif.hostname - -@@ -88,30 +82,20 @@ do_ipv6auto() { - echo nameserver $s - done - fi >> /tmp/net.$netif.resolv.conf -- -- -- echo online > /sys/class/net/$netif/uevent -- if [ -n "$manualup" ]; then -- /sbin/netroot $netif -m -- else -- initqueue --onetime --name netroot-$netif netroot $netif -- fi - } - - # Handle static ip configuration - do_static() { - strstr $ip '*:*:*' && load_ipv6 - -- { -- echo ip link set $netif up -- echo wait_for_if_up $netif -- [ -n "$macaddr" ] && echo ip link set address $macaddr -- [ -n "$mtu" ] && echo ip link set mtu $mtu -- # do not flush addr for ipv6 -- strstr $ip '*:*:*' || \ -- echo ip addr flush dev $netif -- echo ip addr add $ip/$mask brd + dev $netif -- } > /tmp/net.$netif.up -+ ip link set $netif up -+ wait_for_if_up $netif -+ [ -n "$macaddr" ] && ip link set address $macaddr -+ [ -n "$mtu" ] && ip link set mtu $mtu -+ # do not flush addr for ipv6 -+ strstr $ip '*:*:*' || \ -+ ip addr flush dev $netif -+ ip addr add $ip/$mask brd + dev $netif - - [ -n "$gw" ] && echo ip route add default via $gw dev $netif > /tmp/net.$netif.gw - [ -n "$hostname" ] && echo "echo $hostname > /proc/sys/kernel/hostname" > /tmp/net.$netif.hostname -@@ -122,20 +106,12 @@ do_static() { - echo nameserver $s - done - fi >> /tmp/net.$netif.resolv.conf -- -- echo online > /sys/class/net/$netif/uevent -- if [ -n "$manualup" ]; then -- /sbin/netroot $netif -m -- else -- initqueue --onetime --name netroot-$netif netroot $netif -- fi - } - - # loopback is always handled the same way - if [ "$netif" = "lo" ] ; then - ip link set lo up - ip addr add 127.0.0.1/8 dev lo -- >/tmp/net.$netif.up - exit 0 - fi - -@@ -238,6 +214,21 @@ for p in $(getargs ip=); do - *) - do_static ;; - esac -+ -+ case $autoconf in -+ dhcp|on|any|dhcp6) -+ ;; -+ *) -+ if [ $? -eq 0 ]; then -+ setup_net $netif -+ source_hook initqueue/online $netif -+ if [ -z "$manualup" ]; then -+ /sbin/netroot $netif -+ fi -+ fi -+ ;; -+ esac -+ - break - done - exit 0 -diff --git a/modules.d/40network/net-genrules.sh b/modules.d/40network/net-genrules.sh -index b3d5584..7176681 100755 ---- a/modules.d/40network/net-genrules.sh -+++ b/modules.d/40network/net-genrules.sh -@@ -51,10 +51,4 @@ fix_bootif() { - printf 'SUBSYSTEM=="net", RUN+="%s"\n' "/sbin/initqueue --onetime $ifup" - fi - -- # Run the "online" hook -- printf 'SUBSYSTEM=="net", ACTION=="online", RUN+="/sbin/initqueue --onetime --env netif=$env{INTERFACE} source_hook initqueue/online"\n' -- # And make sure we run setup_net at the start of the hook -- echo '. /lib/net-lib.sh; setup_net $netif' > \ -- $hookdir/initqueue/online/05-setup_net.sh -- - } > /etc/udev/rules.d/60-net.rules -diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh -index c0f73da..d6adda9 100644 ---- a/modules.d/40network/net-lib.sh -+++ b/modules.d/40network/net-lib.sh -@@ -65,13 +65,9 @@ ifdown() { - - setup_net() { - local netif="$1" f="" gw_ip="" netroot_ip="" iface="" IFACES="" -- [ -e /tmp/net.$netif.up ] || return 1 - [ -e /tmp/net.$netif.did-setup ] && return - [ -e "/tmp/net.ifaces" ] && read IFACES < /tmp/net.ifaces - [ -z "$IFACES" ] && IFACES="$netif" -- for iface in $IFACES ; do -- . /tmp/net.$iface.up -- done - # run the scripts written by ifup - [ -e /tmp/net.$netif.gw ] && . /tmp/net.$netif.gw - [ -e /tmp/net.$netif.hostname ] && . /tmp/net.$netif.hostname -diff --git a/modules.d/40network/netroot.sh b/modules.d/40network/netroot.sh -index 1bb62bb..fa7e632 100755 ---- a/modules.d/40network/netroot.sh -+++ b/modules.d/40network/netroot.sh -@@ -13,24 +13,13 @@ command -v setup_net >/dev/null || . /lib/net-lib.sh - # instead of real netroot; If It's called without $2, then there's - # no sense in doing something if no (net)root info is available - # or root is already there --if [ -z "$2" ]; then -- [ -d $NEWROOT/proc ] && exit 0 -- [ -z "$netroot" ] && exit 1 --fi -- --# Let's see if we have to wait for other interfaces --# Note: exit works just fine, since the last interface to be --# online'd should see all files --all_ifaces_up || exit 1 -+[ -d $NEWROOT/proc ] && exit 0 -+[ -z "$netroot" ] && exit 1 - - # Set or override primary interface - netif=$1 - [ -e "/tmp/net.bootdev" ] && read netif < /tmp/net.bootdev - --if [ -e /tmp/net.$netif.manualup ]; then -- rm -f /tmp/net.$netif.manualup --fi -- - # Figure out the handler for root=dhcp by recalling all netroot cmdline - # handlers when this is not called from manually network bringing up. - if [ -z "$2" ]; then -@@ -72,23 +61,13 @@ if [ -z "$2" ]; then - fi - fi - --# We're here, so we can assume that upping interfaces is now ok --setup_net $netif -- --# exit in case manually bring up network --[ -n "$2" ] && exit 0 -- - # Source netroot hooks before we start the handler --source_hook netroot -+source_hook netroot $netif - - # Run the handler; don't store the root, it may change from device to device - # XXX other variables to export? - if $handler $netif $netroot $NEWROOT; then - # Network rootfs mount successful - save interface info for ifcfg etc. - save_netinfo $netif --else -- warn "Mounting root via '$netif' failed" -- # If we're trying with multiple interfaces, put that one down. -- [ -z "$BOOTDEV" ] && ifdown $netif - fi - exit 0 diff --git a/0032-ifcfg-write-DNS1-.-for-nameserver-args-RHBZ-815369.patch b/0032-ifcfg-write-DNS1-.-for-nameserver-args-RHBZ-815369.patch deleted file mode 100644 index 570eb60..0000000 --- a/0032-ifcfg-write-DNS1-.-for-nameserver-args-RHBZ-815369.patch +++ /dev/null @@ -1,31 +0,0 @@ -From eb6e141adb9ee06de1f0a960602526f0aa314817 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Tue, 24 Apr 2012 13:08:57 +0200 -Subject: [PATCH] ifcfg: write DNS1=... for nameserver= args (RHBZ#815369) - -If you're using a static network config, you'll want to keep your -nameservers around when NM starts. Write DNS1 (and DNS2, DNS3, etc..) -into the ifcfg file. - -Thanks to Mark Hamzy -and Will Woods for the patch. ---- - modules.d/45ifcfg/write-ifcfg.sh | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh -index c072a13..b81ac39 100755 ---- a/modules.d/45ifcfg/write-ifcfg.sh -+++ b/modules.d/45ifcfg/write-ifcfg.sh -@@ -138,6 +138,11 @@ for netif in $IFACES ; do - } >> /tmp/ifcfg/ifcfg-$ethname - fi - fi -+ i=1 -+ for ns in $(getargs nameserver); do -+ echo "DNS${i}=${ns}" >> /tmp/ifcfg/ifcfg-$netif -+ i=$((i+1)) -+ done - done - - # Pass network opts diff --git a/0033-iscsi-module-setup.sh-fix-host-only-mount-checks.patch b/0033-iscsi-module-setup.sh-fix-host-only-mount-checks.patch deleted file mode 100644 index 4f6deeb..0000000 --- a/0033-iscsi-module-setup.sh-fix-host-only-mount-checks.patch +++ /dev/null @@ -1,43 +0,0 @@ -From cb08b0132f6e6631b04576959549c0a0d8218afd Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 25 Apr 2012 11:23:10 +0200 -Subject: [PATCH] iscsi/module-setup.sh: fix host-only/mount checks - ---- - modules.d/95iscsi/module-setup.sh | 16 ++++++---------- - 1 file changed, 6 insertions(+), 10 deletions(-) - -diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh -index 2f343ee..bfd9d73 100755 ---- a/modules.d/95iscsi/module-setup.sh -+++ b/modules.d/95iscsi/module-setup.sh -@@ -15,8 +15,11 @@ check() { - [[ $debug ]] && set -x - - is_iscsi() ( -- [[ -L /sys/dev/block/$1 ]] || return -- cd "$(readlink -f /sys/dev/block/$1)" -+ local _dev -+ _dev=$(get_maj_min $1) -+ -+ [[ -L /sys/dev/block/$_dev ]] || return -+ cd "$(readlink -f /sys/dev/block/$_dev)" - until [[ -d sys || -d iscsi_session ]]; do - cd .. - done -@@ -24,14 +27,7 @@ check() { - ) - - [[ $hostonly ]] || [[ $mount_needs ]] && { -- _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_iscsi "$_rootdev" || return 1 -- else -- return 1 -- fi -+ for_each_host_dev_fs is_iscsi || return 1 - } - return 0 - } diff --git a/0034-multipath-module-setup.sh-fix-host-only-mount-checks.patch b/0034-multipath-module-setup.sh-fix-host-only-mount-checks.patch deleted file mode 100644 index 669cc3e..0000000 --- a/0034-multipath-module-setup.sh-fix-host-only-mount-checks.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 5dc1be1df8c235040a47ab1bd212102c5bb450cb Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 25 Apr 2012 11:23:49 +0200 -Subject: [PATCH] multipath/module-setup.sh: fix host-only/mount checks - ---- - modules.d/90multipath/module-setup.sh | 16 +++++++--------- - 1 file changed, 7 insertions(+), 9 deletions(-) - -diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh -index 2bc1b41..2af112a 100755 ---- a/modules.d/90multipath/module-setup.sh -+++ b/modules.d/90multipath/module-setup.sh -@@ -11,18 +11,16 @@ check() { - [[ $debug ]] && set -x - - is_mpath() { -- [ -e /sys/dev/block/$1/dm/uuid ] || return 1 -- [[ $(cat /sys/dev/block/$1/dm/uuid) =~ ^mpath- ]] && return 0 -+ local _dev -+ _dev=$(get_maj_min $1) -+ [ -e /sys/dev/block/$_dev/dm/uuid ] || return 1 -+ [[ $(cat /sys/dev/block/$_dev/dm/uuid) =~ ^mpath- ]] && return 0 - return 1 - } - -- if [[ $hostonly ]]; then -- _rootdev=$(find_root_block_device) -- if [[ $_rootdev ]]; then -- check_block_and_slaves is_mpath "$_rootdev" && return 0 -- fi -- return 1 -- fi -+ [[ $hostonly ]] || [[ $mount_needs ]] && { -+ for_each_host_dev_fs is_mpath || return 1 -+ } - - return 0 - } diff --git a/0035-udev-rules-module-setup.sh-fixed-udevd-location.patch b/0035-udev-rules-module-setup.sh-fixed-udevd-location.patch deleted file mode 100644 index daed80f..0000000 --- a/0035-udev-rules-module-setup.sh-fixed-udevd-location.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 168952cea6130476a68c90aecab709cf24da5e52 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 25 Apr 2012 12:22:15 +0200 -Subject: [PATCH] udev-rules/module-setup.sh: fixed udevd location - ---- - modules.d/95udev-rules/module-setup.sh | 24 ++++++++---------------- - 1 file changed, 8 insertions(+), 16 deletions(-) - -diff --git a/modules.d/95udev-rules/module-setup.sh b/modules.d/95udev-rules/module-setup.sh -index cc42eb7..b4acce3 100755 ---- a/modules.d/95udev-rules/module-setup.sh -+++ b/modules.d/95udev-rules/module-setup.sh -@@ -8,13 +8,14 @@ install() { - # ultimately, /lib/initramfs/rules.d or somesuch which includes links/copies - # of the rules we want so that we just copy those in would be best - dracut_install udevadm -- if [ -x /sbin/udevd ]; then -- dracut_install udevd -- mkdir -p ${initdir}/lib/systemd -- ln -s /sbin/udevd ${initdir}/lib/systemd/systemd-udevd -- elif [ -x /lib/systemd/systemd-udevd ]; then -- inst /lib/systemd/systemd-udevd -- fi -+ [ -d ${initdir}/lib/systemd ] || mkdir -p ${initdir}/lib/systemd -+ for _i in /lib/systemd/systemd-udevd /lib/udev/udevd /sbin/udevd; do -+ [ -x "$_i" ] || continue -+ inst "$_i" -+ [[ $_i != "/lib/systemd/systemd-udevd" ]] \ -+ && ln -s "$_i" ${initdir}/lib/systemd/systemd-udevd -+ break -+ done - - for i in /etc/udev/udev.conf /etc/group; do - inst_simple $i -@@ -62,20 +63,11 @@ install() { - vol_id \ - pcmcia-socket-startup \ - pcmcia-check-broken-cis \ -- udevd \ - ; do - [ -e /lib/udev/$_i ] && dracut_install /lib/udev/$_i - [ -e /usr/lib/udev/$_i ] && dracut_install /usr/lib/udev/$_i - done - -- if ! [ -e "$initdir/sbin/udevd" ]; then -- if [ -x /usr/lib/udev/udevd ]; then -- ln -s /usr/lib/udev/udevd "$initdir/sbin/udevd" -- elif [ -x /lib/udev/udevd ]; then -- ln -s /lib/udev/udevd "$initdir/sbin/udevd" -- fi -- fi -- - [ -f /etc/arch-release ] && \ - inst "$moddir/load-modules.sh" /lib/udev/load-modules.sh - diff --git a/0036-TEST-15-BTRFSRAID-add-one-more-partition-to-the-btrf.patch b/0036-TEST-15-BTRFSRAID-add-one-more-partition-to-the-btrf.patch deleted file mode 100644 index 6f53376..0000000 --- a/0036-TEST-15-BTRFSRAID-add-one-more-partition-to-the-btrf.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 5a81678219a2cbf6f39e47f85d2fcb525ac2143c Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 25 Apr 2012 14:23:12 +0200 -Subject: [PATCH] TEST-15-BTRFSRAID: add one more partition to the btrfs - raid10 - ---- - test/TEST-15-BTRFSRAID/create-root.sh | 12 +++++++++--- - test/TEST-15-BTRFSRAID/test.sh | 2 +- - 2 files changed, 10 insertions(+), 4 deletions(-) - -diff --git a/test/TEST-15-BTRFSRAID/create-root.sh b/test/TEST-15-BTRFSRAID/create-root.sh -index 60dd319..3debf33 100755 ---- a/test/TEST-15-BTRFSRAID/create-root.sh -+++ b/test/TEST-15-BTRFSRAID/create-root.sh -@@ -5,17 +5,23 @@ for x in 64-lvm.rules 70-mdadm.rules 99-mount-rules; do - done - udevadm control --reload-rules - # save a partition at the beginning for future flagging purposes --sfdisk -C 524288 -H 2 -S 32 -L /dev/sda </dev/sda1 -diff --git a/test/TEST-15-BTRFSRAID/test.sh b/test/TEST-15-BTRFSRAID/test.sh -index f64b2b2..b65e77a 100755 ---- a/test/TEST-15-BTRFSRAID/test.sh -+++ b/test/TEST-15-BTRFSRAID/test.sh -@@ -20,7 +20,7 @@ test_setup() { - # Create the blank file to use as a root filesystem - DISKIMAGE=$TESTDIR/TEST-15-BTRFSRAID-root.img - rm -f $DISKIMAGE -- dd if=/dev/null of=$DISKIMAGE bs=1M seek=1024 -+ dd if=/dev/null of=$DISKIMAGE bs=2M seek=1024 - - kernel=$KVERSION - # Create what will eventually be our root filesystem onto an overlay diff --git a/0037-fix-_getcmdline-arg-duplicating-bug-with-etc-cmdline.patch b/0037-fix-_getcmdline-arg-duplicating-bug-with-etc-cmdline.patch deleted file mode 100644 index e5a028d..0000000 --- a/0037-fix-_getcmdline-arg-duplicating-bug-with-etc-cmdline.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 982161e062e1696067cc19a990a31924b29c0df1 Mon Sep 17 00:00:00 2001 -From: Will Woods -Date: Tue, 1 May 2012 14:08:33 -0400 -Subject: [PATCH] fix _getcmdline arg-duplicating bug with /etc/cmdline* - -If you unset CMDLINE to make _getcmdline re-read /etc/cmdline and -/etc/cmdline.d/*, CMDLINE_ETC and CMDLINE_ETC_D would keep their -contents. - -This is a serious problem if you have (e.g.) "ip=eth0:dhcp" in -/etc/cmdline.d/net.conf, because getargs ip= will return -"ip=eth0:dhcp ip=eth0:dhcp" and then parse-ip-opts.sh will die() because -you have two configurations for eth0. ---- - modules.d/99base/dracut-lib.sh | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh -index a6b8d1a..ddb6954 100755 ---- a/modules.d/99base/dracut-lib.sh -+++ b/modules.d/99base/dracut-lib.sh -@@ -48,6 +48,7 @@ _getcmdline() { - local _i - unset _line - if [ -z "$CMDLINE" ]; then -+ unset CMDLINE_ETC CMDLINE_ETC_D - if [ -e /etc/cmdline ]; then - while read -r _line; do - CMDLINE_ETC="$CMDLINE_ETC $_line"; diff --git a/0038-ifcfg-fix-resolv.conf.patch b/0038-ifcfg-fix-resolv.conf.patch deleted file mode 100644 index 8b12374..0000000 --- a/0038-ifcfg-fix-resolv.conf.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 335bb5a35b35d1bc81dc880fee67e247222c1f58 Mon Sep 17 00:00:00 2001 -From: Will Woods -Date: Tue, 1 May 2012 14:08:34 -0400 -Subject: [PATCH] ifcfg: fix resolv.conf - -/etc/net.*.resolv.conf is not a useful filename; copy it to resolv.conf ---- - modules.d/45ifcfg/write-ifcfg.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh -index b81ac39..f612762 100755 ---- a/modules.d/45ifcfg/write-ifcfg.sh -+++ b/modules.d/45ifcfg/write-ifcfg.sh -@@ -152,7 +152,7 @@ echo "files /etc/sysconfig/network-scripts" >> /run/initramfs/rwtab - echo "files /var/lib/dhclient" >> /run/initramfs/rwtab - { - cp /tmp/net.* /run/initramfs/ -- cp /tmp/net.$netif.resolv.conf /run/initramfs/state/etc/ -+ cp /tmp/net.$netif.resolv.conf /run/initramfs/state/etc/resolv.conf - cp -a -t /run/initramfs/state/etc/sysconfig/network-scripts/ /tmp/ifcfg/* - cp /tmp/ifcfg-leases/* /run/initramfs/state/var/lib/dhclient - } > /dev/null 2>&1 diff --git a/0039-TODO-update.patch b/0039-TODO-update.patch deleted file mode 100644 index 086b9ab..0000000 --- a/0039-TODO-update.patch +++ /dev/null @@ -1,22 +0,0 @@ -From a54658c1580e8e80251b6f9d30475495710e146a Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Fri, 4 May 2012 11:32:48 +0200 -Subject: [PATCH] TODO: update - ---- - TODO | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/TODO b/TODO -index 6c27268..81121de 100644 ---- a/TODO -+++ b/TODO -@@ -6,6 +6,8 @@ Items are ordered in priority. - - INITRAMFS TODO - -+- fix btrfs subvolume mounting for /usr (fsck) -+- generate systemd unit dracut-initramfs-restore in /run/systemd dynamically - - put "root=" parsing hooks in separate hook dir - - call "root=" parsing hooks after getting new rootpath from dhcp - - put mount hook in main initqueue loop diff --git a/0040-removed-old-udev-vol_id.patch b/0040-removed-old-udev-vol_id.patch deleted file mode 100644 index 19b0da4..0000000 --- a/0040-removed-old-udev-vol_id.patch +++ /dev/null @@ -1,131 +0,0 @@ -From cce69be6681e288a8354a39380be8a4493edde5d Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 7 May 2012 16:27:48 +0200 -Subject: [PATCH] removed old udev "vol_id" - ---- - dracut-functions.sh | 11 ----------- - dracut.asc | 3 +-- - modules.d/90dmraid/module-setup.sh | 4 +--- - modules.d/90mdraid/module-setup.sh | 14 ++++++-------- - modules.d/95udev-rules/59-persistent-storage-volid.rules | 7 ------- - modules.d/95udev-rules/module-setup.sh | 9 ++------- - 6 files changed, 10 insertions(+), 38 deletions(-) - delete mode 100644 modules.d/95udev-rules/59-persistent-storage-volid.rules - -diff --git a/dracut-functions.sh b/dracut-functions.sh -index ff4e16d..8256e02 100755 ---- a/dracut-functions.sh -+++ b/dracut-functions.sh -@@ -183,17 +183,6 @@ get_fs_env() { - return 1 - fi - -- # Fallback, for the old vol_id -- if [[ -x /lib/udev/vol_id ]]; then -- if evalstr=$(/lib/udev/vol_id --export $1 \ -- | while read line; do -- strstr "$line" "ID_FS_TYPE=" && { echo $line; exit 0;} -- done;) ; then -- eval $evalstr -- [[ $ID_FS_TYPE ]] && return 0 -- fi -- fi -- - # Fallback, if we don't have udev information - if find_binary blkid >/dev/null; then - eval $(blkid -o udev $1 \ -diff --git a/dracut.asc b/dracut.asc -index a6e050d..6d93379 100644 ---- a/dracut.asc -+++ b/dracut.asc -@@ -478,8 +478,7 @@ command - # dmsetup ls --tree - ---- - + --* A list of block device attributes including vol_id compatible mode. This can --be obtained by running the commands: -+* A list of block device attributes. This can be obtained by running the commands: - + - ---- - # blkid -p -diff --git a/modules.d/90dmraid/module-setup.sh b/modules.d/90dmraid/module-setup.sh -index 0a8ed7f..5ce7051 100755 ---- a/modules.d/90dmraid/module-setup.sh -+++ b/modules.d/90dmraid/module-setup.sh -@@ -58,9 +58,7 @@ install() { - - inst "$moddir/dmraid.sh" /sbin/dmraid_scan - -- if [ ! -x /lib/udev/vol_id ]; then -- inst_rules 64-md-raid.rules -- fi -+ inst_rules 64-md-raid.rules - - inst_libdir_file "libdmraid-events*.so*" - -diff --git a/modules.d/90mdraid/module-setup.sh b/modules.d/90mdraid/module-setup.sh -index 90092a7..7c9fcc4 100755 ---- a/modules.d/90mdraid/module-setup.sh -+++ b/modules.d/90mdraid/module-setup.sh -@@ -57,14 +57,12 @@ install() { - # inst /etc/passwd - # inst /etc/group - -- if [ ! -x /lib/udev/vol_id ]; then -- inst_rules 64-md-raid.rules -- # remove incremental assembly from stock rules, so they don't shadow -- # 65-md-inc*.rules and its fine-grained controls, or cause other problems -- # when we explicitly don't want certain components to be incrementally -- # assembled -- sed -i -r -e '/RUN\+?="[[:alpha:]/]*mdadm[[:blank:]]+(--incremental|-I)[[:blank:]]+(\$env\{DEVNAME\}|\$tempnode)"/d' "${initdir}/lib/udev/rules.d/64-md-raid.rules" -- fi -+ inst_rules 64-md-raid.rules -+ # remove incremental assembly from stock rules, so they don't shadow -+ # 65-md-inc*.rules and its fine-grained controls, or cause other problems -+ # when we explicitly don't want certain components to be incrementally -+ # assembled -+ sed -i -r -e '/RUN\+?="[[:alpha:]/]*mdadm[[:blank:]]+(--incremental|-I)[[:blank:]]+(\$env\{DEVNAME\}|\$tempnode)"/d' "${initdir}/lib/udev/rules.d/64-md-raid.rules" - - inst_rules "$moddir/65-md-incremental-imsm.rules" - -diff --git a/modules.d/95udev-rules/59-persistent-storage-volid.rules b/modules.d/95udev-rules/59-persistent-storage-volid.rules -deleted file mode 100644 -index 0b798e6..0000000 ---- a/modules.d/95udev-rules/59-persistent-storage-volid.rules -+++ /dev/null -@@ -1,7 +0,0 @@ --SUBSYSTEM!="block", GOTO="psv_end" --ACTION!="add|change", GOTO="psv_end" --ACTION=="change", KERNEL=="dm-[0-9]*", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}!="1", IMPORT{program}="vol_id --export $tempnode" --KERNEL=="cciss[0-9]*", IMPORT{program}="vol_id --export $tempnode" --KERNEL=="nbd[0-9]*", IMPORT{program}="vol_id --export $tempnode" --KERNEL=="md[0-9]*|md_d[0-9]*|md/*", IMPORT{program}="vol_id --export $tempnode" --LABEL="psv_end" -diff --git a/modules.d/95udev-rules/module-setup.sh b/modules.d/95udev-rules/module-setup.sh -index b4acce3..f7f9f2e 100755 ---- a/modules.d/95udev-rules/module-setup.sh -+++ b/modules.d/95udev-rules/module-setup.sh -@@ -37,12 +37,8 @@ install() { - inst_dir /run/udev - inst_dir /run/udev/rules.d - -- if [ ! -x /lib/udev/vol_id ]; then -- dracut_install blkid -- inst_rules "$moddir/59-persistent-storage.rules" -- else -- inst_rules "$moddir/59-persistent-storage-volid.rules" -- fi -+ dracut_install blkid -+ inst_rules "$moddir/59-persistent-storage.rules" - inst_rules "$moddir/61-persistent-storage.rules" - - for _i in \ -@@ -60,7 +56,6 @@ install() { - input_id \ - scsi_id \ - usb_id \ -- vol_id \ - pcmcia-socket-startup \ - pcmcia-check-broken-cis \ - ; do diff --git a/0041-plymouth-plymouth-pretrigger.sh-check-for-tty-dev-ex.patch b/0041-plymouth-plymouth-pretrigger.sh-check-for-tty-dev-ex.patch deleted file mode 100644 index 5c3f183..0000000 --- a/0041-plymouth-plymouth-pretrigger.sh-check-for-tty-dev-ex.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 65ceb56dd593f319fb15e12efe404e66ed641909 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 7 May 2012 16:28:16 +0200 -Subject: [PATCH] plymouth/plymouth-pretrigger.sh: check for tty dev existence - ---- - modules.d/50plymouth/plymouth-pretrigger.sh | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/modules.d/50plymouth/plymouth-pretrigger.sh b/modules.d/50plymouth/plymouth-pretrigger.sh -index 50828af..8fa0aec 100755 ---- a/modules.d/50plymouth/plymouth-pretrigger.sh -+++ b/modules.d/50plymouth/plymouth-pretrigger.sh -@@ -21,10 +21,10 @@ if [ -x /bin/plymouthd ]; then - mkdir -m 0755 /run/plymouth - consoledev=$(getarg console= | sed -e 's/,.*//') - consoledev=${consoledev:-tty0} -- [ -x /lib/udev/console_init ] && /lib/udev/console_init "/dev/$consoledev" -+ [ -x /lib/udev/console_init -a -e "/dev/$consoledev" ] && /lib/udev/console_init "/dev/$consoledev" - [ -x /bin/plymouthd ] && /bin/plymouthd --attach-to-session --pid-file /run/plymouth/pid - /bin/plymouth --show-splash 2>&1 | vinfo - # reset tty after plymouth messed with it -- [ -x /lib/udev/console_init ] && /lib/udev/console_init /dev/tty0 -+ [ -x /lib/udev/console_init -a -e "/dev/$consoledev" ] && /lib/udev/console_init "/dev/$consoledev" - fi - fi diff --git a/0042-dracut.spec-require-file.patch b/0042-dracut.spec-require-file.patch deleted file mode 100644 index a34e65b..0000000 --- a/0042-dracut.spec-require-file.patch +++ /dev/null @@ -1,21 +0,0 @@ -From f6a58604a0f47b353f2ac1790fd37b1b312418b2 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 7 May 2012 16:28:44 +0200 -Subject: [PATCH] dracut.spec: require "file" - ---- - dracut.spec | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/dracut.spec b/dracut.spec -index 9f64213..77b197e 100644 ---- a/dracut.spec -+++ b/dracut.spec -@@ -76,6 +76,7 @@ Requires: hardlink - Requires: gzip xz - Requires: module-init-tools >= 3.7-9 - Requires: sed -+Requires: file - Requires: udev > 166 - %if 0%{?fedora} || 0%{?rhel} > 6 - Requires: util-linux >= 2.21 diff --git a/0043-test-TEST-01-BASIC-test.sh-fix-cleanup-of-overlay-di.patch b/0043-test-TEST-01-BASIC-test.sh-fix-cleanup-of-overlay-di.patch deleted file mode 100644 index ebb0030..0000000 --- a/0043-test-TEST-01-BASIC-test.sh-fix-cleanup-of-overlay-di.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 4b13b2e2bf6254912d5be82911b637941c700725 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 7 May 2012 16:32:28 +0200 -Subject: [PATCH] test/TEST-01-BASIC/test.sh: fix cleanup of overlay dir - ---- - test/TEST-01-BASIC/test.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/test/TEST-01-BASIC/test.sh b/test/TEST-01-BASIC/test.sh -index 6187144..36d2693 100755 ---- a/test/TEST-01-BASIC/test.sh -+++ b/test/TEST-01-BASIC/test.sh -@@ -61,7 +61,7 @@ test_setup() { - -d "piix ide-gd_mod ata_piix ext3 sd_mod" \ - --nomdadmconf \ - -f $TESTDIR/initramfs.makeroot $KVERSION || return 1 -- rm -rf overlay -+ rm -rf $TESTDIR/overlay - # Invoke KVM and/or QEMU to actually create the target filesystem. - - $testdir/run-qemu \ diff --git a/0044-plymouth-plymouth-pretrigger.sh-get-consoledev-from-.patch b/0044-plymouth-plymouth-pretrigger.sh-get-consoledev-from-.patch deleted file mode 100644 index 1c0bb9b..0000000 --- a/0044-plymouth-plymouth-pretrigger.sh-get-consoledev-from-.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 3734f4ae4816c372427f99ab5f0dfd7f386c8222 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 9 May 2012 11:05:12 +0200 -Subject: [PATCH] plymouth/plymouth-pretrigger.sh: get consoledev from - /sys/class/tty/console/active - ---- - modules.d/50plymouth/plymouth-pretrigger.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/50plymouth/plymouth-pretrigger.sh b/modules.d/50plymouth/plymouth-pretrigger.sh -index 8fa0aec..483cc70 100755 ---- a/modules.d/50plymouth/plymouth-pretrigger.sh -+++ b/modules.d/50plymouth/plymouth-pretrigger.sh -@@ -19,7 +19,7 @@ if [ -x /bin/plymouthd ]; then - - info "Starting plymouth daemon" - mkdir -m 0755 /run/plymouth -- consoledev=$(getarg console= | sed -e 's/,.*//') -+ read consoledev rest < /sys/class/tty/console/active - consoledev=${consoledev:-tty0} - [ -x /lib/udev/console_init -a -e "/dev/$consoledev" ] && /lib/udev/console_init "/dev/$consoledev" - [ -x /bin/plymouthd ] && /bin/plymouthd --attach-to-session --pid-file /run/plymouth/pid diff --git a/0045-base-init.sh-set-DRACUT_QUIET-only-in-dracut-lib.sh.patch b/0045-base-init.sh-set-DRACUT_QUIET-only-in-dracut-lib.sh.patch deleted file mode 100644 index bcb0942..0000000 --- a/0045-base-init.sh-set-DRACUT_QUIET-only-in-dracut-lib.sh.patch +++ /dev/null @@ -1,41 +0,0 @@ -From cad10a7f8043752bb0c8d411ee7a30c641d6622c Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 9 May 2012 11:42:39 +0200 -Subject: [PATCH] base/init.sh: set DRACUT_QUIET only in dracut-lib.sh - ---- - modules.d/99base/dracut-lib.sh | 3 +++ - modules.d/99base/init.sh | 6 ------ - 2 files changed, 3 insertions(+), 6 deletions(-) - -diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh -index ddb6954..e46e456 100755 ---- a/modules.d/99base/dracut-lib.sh -+++ b/modules.d/99base/dracut-lib.sh -@@ -316,6 +316,9 @@ check_quiet() { - getargbool 0 rd.info -y rdinfo && DRACUT_QUIET="no" - getargbool 0 rd.debug -y rdinitdebug && DRACUT_QUIET="no" - getarg quiet || DRACUT_QUIET="yes" -+ a=$(getarg loglevel=) -+ [ -n "$a" ] && [ $a -ge 28 ] && DRACUT_QUIET="yes" -+ export DRACUT_QUIET - fi - } - -diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh -index cba2e1a..5807b12 100755 ---- a/modules.d/99base/init.sh -+++ b/modules.d/99base/init.sh -@@ -39,12 +39,6 @@ fi - - setdebug - --if [ "$RD_DEBUG" = "yes" ]; then -- getarg quiet && DRACUT_QUIET="yes" -- a=$(getarg loglevel=) -- [ -n "$a" ] && [ $a -ge 8 ] && unset DRACUT_QUIET --fi -- - if ! ismounted /dev; then - mount -t devtmpfs -o mode=0755,nosuid,strictatime devtmpfs /dev >/dev/null - fi diff --git a/0046-base-dracut-lib.sh-export-UDEVVERSION.patch b/0046-base-dracut-lib.sh-export-UDEVVERSION.patch deleted file mode 100644 index ad91872..0000000 --- a/0046-base-dracut-lib.sh-export-UDEVVERSION.patch +++ /dev/null @@ -1,31 +0,0 @@ -From fe98cfee37224420ee133c1b10e7befab24dce05 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 9 May 2012 11:44:23 +0200 -Subject: [PATCH] base/dracut-lib.sh: export UDEVVERSION - ---- - modules.d/99base/dracut-lib.sh | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh -index e46e456..2fe8a5e 100755 ---- a/modules.d/99base/dracut-lib.sh -+++ b/modules.d/99base/dracut-lib.sh -@@ -383,7 +383,7 @@ incol2() { - } - - udevsettle() { -- [ -z "$UDEVVERSION" ] && UDEVVERSION=$(udevadm --version) -+ [ -z "$UDEVVERSION" ] && export UDEVVERSION=$(udevadm --version) - - if [ $UDEVVERSION -ge 143 ]; then - udevadm settle --exit-if-exists=$hookdir/initqueue/work $settle_exit_if_exists -@@ -393,7 +393,7 @@ udevsettle() { - } - - udevproperty() { -- [ -z "$UDEVVERSION" ] && UDEVVERSION=$(udevadm --version) -+ [ -z "$UDEVVERSION" ] && export UDEVVERSION=$(udevadm --version) - - if [ $UDEVVERSION -ge 143 ]; then - for i in "$@"; do udevadm control --property=$i; done diff --git a/0047-dracut.sh-install-var-run-and-var-lock.patch b/0047-dracut.sh-install-var-run-and-var-lock.patch deleted file mode 100644 index 29b3fac..0000000 --- a/0047-dracut.sh-install-var-run-and-var-lock.patch +++ /dev/null @@ -1,22 +0,0 @@ -From f2d887d7d5ccb315d840192af825eba92764d9f9 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 9 May 2012 13:13:19 +0200 -Subject: [PATCH] dracut.sh: install var/run and var/lock - ---- - dracut.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/dracut.sh b/dracut.sh -index 1048e75..2a7a812 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -655,7 +655,7 @@ if [[ $prefix ]]; then - fi - - if [[ $kernel_only != yes ]]; then -- for d in usr/bin usr/sbin bin etc lib "$libdir" sbin tmp usr var var/log; do -+ for d in usr/bin usr/sbin bin etc lib "$libdir" sbin tmp usr var var/log var/run var/lock; do - [[ -e "${initdir}${prefix}/$d" ]] && continue - if [ -L "/$d" ]; then - inst_symlink "/$d" "${prefix}/$d" diff --git a/0048-rootfs-block-block-genrules.sh-install-systemd-mount.patch b/0048-rootfs-block-block-genrules.sh-install-systemd-mount.patch deleted file mode 100644 index 30ba56d..0000000 --- a/0048-rootfs-block-block-genrules.sh-install-systemd-mount.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 8aeec251e350be27090ffddf4d2ef063ad428219 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 9 May 2012 11:07:46 +0200 -Subject: [PATCH] rootfs-block/block-genrules.sh: install systemd mount unit - ---- - modules.d/95rootfs-block/block-genrules.sh | 17 +++++++++++++++++ - 1 file changed, 17 insertions(+) - -diff --git a/modules.d/95rootfs-block/block-genrules.sh b/modules.d/95rootfs-block/block-genrules.sh -index 1e6827a..fe6e331 100755 ---- a/modules.d/95rootfs-block/block-genrules.sh -+++ b/modules.d/95rootfs-block/block-genrules.sh -@@ -13,5 +13,22 @@ if [ "${root%%:*}" = "block" ]; then - printf '[ -e "%s" ] && { ln -s "%s" /dev/root 2>/dev/null; rm "$job"; }\n' \ - "${root#block:}" "${root#block:}" > $hookdir/initqueue/settled/blocksymlink.sh - -+ if [ -d /lib/systemd/system/ ]; then -+ echo "${root#block:} $NEWROOT ${fstype:-auto} ${rflags:-defaults} 1 1" >> /etc/fstab -+ { -+ echo '[Unit]' -+ echo 'Description=New Root File System' -+ echo 'DefaultDependencies=no' -+ echo 'Before=switch-root.service' -+ echo '[Mount]' -+ echo "What=${root#block:}" -+ echo "Where=$NEWROOT" -+ -+ } >/lib/systemd/system/${NEWROOT#/}.mount -+ -+ mkdir -p /lib/systemd/system/switch-root.target.wants -+ ln -s ../${NEWROOT#/}.mount /lib/systemd/system/switch-root.target.wants/${NEWROOT#/}.mount -+ fi -+ - wait_for_dev "${root#block:}" - fi diff --git a/0049-add-systemd-module.patch b/0049-add-systemd-module.patch deleted file mode 100644 index e89959d..0000000 --- a/0049-add-systemd-module.patch +++ /dev/null @@ -1,923 +0,0 @@ -From 2c431e8ec4c9cb538c633e46888912ad83315ce0 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 9 May 2012 11:47:30 +0200 -Subject: [PATCH] add systemd module - ---- - modules.d/98systemd/dracut-cmdline.sh | 27 +++++ - modules.d/98systemd/dracut-initqueue.service | 27 +++++ - modules.d/98systemd/dracut-initqueue.sh | 111 ++++++++++++++++++ - modules.d/98systemd/dracut-pre-pivot.service | 27 +++++ - modules.d/98systemd/dracut-pre-pivot.sh | 54 +++++++++ - modules.d/98systemd/dracut-pre-trigger.service | 28 +++++ - modules.d/98systemd/dracut-pre-trigger.sh | 20 ++++ - modules.d/98systemd/dracut-pre-udev.service | 27 +++++ - modules.d/98systemd/dracut-pre-udev.sh | 17 +++ - modules.d/98systemd/emergency.service | 30 +++++ - modules.d/98systemd/module-setup.sh | 150 ++++++++++++++++++++++++ - modules.d/98systemd/rescue.service | 31 +++++ - modules.d/98systemd/switch-root.service | 17 +++ - modules.d/98systemd/switch-root.target | 16 +++ - test/TEST-02-SYSTEMD/99-idesymlinks.rules | 8 ++ - test/TEST-02-SYSTEMD/Makefile | 10 ++ - test/TEST-02-SYSTEMD/create-root.sh | 23 ++++ - test/TEST-02-SYSTEMD/cryptroot-ask.sh | 6 + - test/TEST-02-SYSTEMD/hard-off.sh | 3 + - test/TEST-02-SYSTEMD/test-init.sh | 20 ++++ - test/TEST-02-SYSTEMD/test.sh | 95 +++++++++++++++ - 21 files changed, 747 insertions(+) - create mode 100755 modules.d/98systemd/dracut-cmdline.sh - create mode 100644 modules.d/98systemd/dracut-initqueue.service - create mode 100755 modules.d/98systemd/dracut-initqueue.sh - create mode 100644 modules.d/98systemd/dracut-pre-pivot.service - create mode 100755 modules.d/98systemd/dracut-pre-pivot.sh - create mode 100644 modules.d/98systemd/dracut-pre-trigger.service - create mode 100755 modules.d/98systemd/dracut-pre-trigger.sh - create mode 100644 modules.d/98systemd/dracut-pre-udev.service - create mode 100755 modules.d/98systemd/dracut-pre-udev.sh - create mode 100644 modules.d/98systemd/emergency.service - create mode 100755 modules.d/98systemd/module-setup.sh - create mode 100644 modules.d/98systemd/rescue.service - create mode 100644 modules.d/98systemd/switch-root.service - create mode 100644 modules.d/98systemd/switch-root.target - create mode 100644 test/TEST-02-SYSTEMD/99-idesymlinks.rules - create mode 100644 test/TEST-02-SYSTEMD/Makefile - create mode 100755 test/TEST-02-SYSTEMD/create-root.sh - create mode 100755 test/TEST-02-SYSTEMD/cryptroot-ask.sh - create mode 100755 test/TEST-02-SYSTEMD/hard-off.sh - create mode 100755 test/TEST-02-SYSTEMD/test-init.sh - create mode 100755 test/TEST-02-SYSTEMD/test.sh - -diff --git a/modules.d/98systemd/dracut-cmdline.sh b/modules.d/98systemd/dracut-cmdline.sh -new file mode 100755 -index 0000000..26ca9c2 ---- /dev/null -+++ b/modules.d/98systemd/dracut-cmdline.sh -@@ -0,0 +1,27 @@ -+#!/bin/sh -+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- -+# ex: ts=8 sw=4 sts=4 et filetype=sh -+ -+NEWROOT="/sysroot" -+[ -d $NEWROOT ] || mkdir -p -m 0755 $NEWROOT -+[ -d /run/initramfs ] || mkdir -p -m 0755 /run/initramfs -+[ -d /run/lock ] || mkdir -p -m 0755 /run/lock -+ -+exec /dev/console 2>&1 -+ -+if [ -f /dracut-state.sh ]; then -+ . /dracut-state.sh || : -+fi -+. /lib/dracut-lib.sh -+source_conf /etc/conf.d -+ -+# run scriptlets to parse the command line -+getarg 'rd.break=cmdline' 'rdbreak=cmdline' && emergency_shell -n cmdline "Break before cmdline" -+source_hook cmdline -+ -+[ -z "$root" ] && die "No or empty root= argument" -+[ -z "$rootok" ] && die "Don't know how to handle 'root=$root'" -+ -+export root rflags fstype netroot NEWROOT -+ -+export -p > /dracut-state.sh -diff --git a/modules.d/98systemd/dracut-initqueue.service b/modules.d/98systemd/dracut-initqueue.service -new file mode 100644 -index 0000000..b0c8509 ---- /dev/null -+++ b/modules.d/98systemd/dracut-initqueue.service -@@ -0,0 +1,27 @@ -+# This file is part of systemd. -+# -+# systemd is free software; you can redistribute it and/or modify it -+# under the terms of the GNU Lesser General Public License as published by -+# the Free Software Foundation; either version 2.1 of the License, or -+# (at your option) any later version. -+ -+# See systemd.special(7) for details -+ -+[Unit] -+Description=Dracut initqueue hook -+DefaultDependencies=no -+After=systemd-udev-trigger.service -+ -+[Service] -+Environment=HOME=/ -+WorkingDirectory=/ -+ExecStart=-/bin/dracut-initqueue -+Type=simple -+StandardInput=tty-force -+StandardOutput=inherit -+StandardError=inherit -+KillMode=process -+ -+# Bash ignores SIGTERM, so we send SIGHUP instead, to ensure that bash -+# terminates cleanly. -+KillSignal=SIGHUP -diff --git a/modules.d/98systemd/dracut-initqueue.sh b/modules.d/98systemd/dracut-initqueue.sh -new file mode 100755 -index 0000000..402f536 ---- /dev/null -+++ b/modules.d/98systemd/dracut-initqueue.sh -@@ -0,0 +1,111 @@ -+#!/bin/sh -+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- -+# ex: ts=8 sw=4 sts=4 et filetype=sh -+exec /dev/console 2>&1 -+ -+if [ -f /dracut-state.sh ]; then -+ . /dracut-state.sh || : -+fi -+. /lib/dracut-lib.sh -+source_conf /etc/conf.d -+source_hook pre-trigger -+ -+getarg 'rd.break=initqueue' 'rdbreak=initqueue' && emergency_shell -n initqueue "Break before initqueue" -+ -+RDRETRY=$(getarg rd.retry 'rd_retry=') -+RDRETRY=${RDRETRY:-20} -+RDRETRY=$(($RDRETRY*2)) -+export RDRETRY -+ -+main_loop=0 -+export main_loop -+ -+while :; do -+ -+ check_finished && break -+ -+ udevsettle -+ -+ check_finished && break -+ -+ if [ -f $hookdir/initqueue/work ]; then -+ rm $hookdir/initqueue/work -+ fi -+ -+ for job in $hookdir/initqueue/*.sh; do -+ [ -e "$job" ] || break -+ job=$job . $job -+ check_finished && break 2 -+ done -+ -+ $UDEV_QUEUE_EMPTY >/dev/null 2>&1 || continue -+ -+ for job in $hookdir/initqueue/settled/*.sh; do -+ [ -e "$job" ] || break -+ job=$job . $job -+ check_finished && break 2 -+ done -+ -+ $UDEV_QUEUE_EMPTY >/dev/null 2>&1 || continue -+ -+ # no more udev jobs and queues empty. -+ sleep 0.5 -+ -+ -+ if [ $main_loop -gt $(($RDRETRY/2)) ]; then -+ for job in $hookdir/initqueue/timeout/*.sh; do -+ [ -e "$job" ] || break -+ job=$job . $job -+ main_loop=0 -+ done -+ fi -+ -+ main_loop=$(($main_loop+1)) -+ [ $main_loop -gt $RDRETRY ] \ -+ && { flock -s 9 ; emergency_shell "Unable to process initqueue"; } 9>/.console_lock -+done -+ -+unset job -+unset queuetriggered -+unset main_loop -+unset RDRETRY -+ -+ -+# pre-mount happens before we try to mount the root filesystem, -+# and happens once. -+getarg 'rd.break=pre-mount' 'rdbreak=pre-mount' && emergency_shell -n pre-mount "Break pre-mount" -+source_hook pre-mount -+ -+ -+getarg 'rd.break=mount' 'rdbreak=mount' && emergency_shell -n mount "Break mount" -+# mount scripts actually try to mount the root filesystem, and may -+# be sourced any number of times. As soon as one suceeds, no more are sourced. -+i=0 -+while :; do -+ if ismounted "$NEWROOT"; then -+ usable_root "$NEWROOT" && break; -+ umount "$NEWROOT" -+ fi -+ for f in $hookdir/mount/*.sh; do -+ [ -f "$f" ] && . "$f" -+ if ismounted "$NEWROOT"; then -+ usable_root "$NEWROOT" && break; -+ warn "$NEWROOT has no proper rootfs layout, ignoring and removing offending mount hook" -+ umount "$NEWROOT" -+ rm -f "$f" -+ fi -+ done -+ -+ i=$(($i+1)) -+ [ $i -gt 20 ] \ -+ && { flock -s 9 ; emergency_shell "Can't mount root filesystem"; } 9>/.console_lock -+done -+ -+{ -+ echo -n "Mounted root filesystem " -+ while read dev mp rest; do [ "$mp" = "$NEWROOT" ] && echo $dev; done < /proc/mounts -+} | vinfo -+ -+systemctl switch-root -+ -+export -p > /dracut-state.sh -diff --git a/modules.d/98systemd/dracut-pre-pivot.service b/modules.d/98systemd/dracut-pre-pivot.service -new file mode 100644 -index 0000000..112834a ---- /dev/null -+++ b/modules.d/98systemd/dracut-pre-pivot.service -@@ -0,0 +1,27 @@ -+# This file is part of systemd. -+# -+# systemd is free software; you can redistribute it and/or modify it -+# under the terms of the GNU Lesser General Public License as published by -+# the Free Software Foundation; either version 2.1 of the License, or -+# (at your option) any later version. -+ -+# See systemd.special(7) for details -+ -+[Unit] -+Description=Dracut pre-pivot and cleanup hook -+DefaultDependencies=no -+Before=switch-root.service -+ -+[Service] -+Environment=HOME=/ -+WorkingDirectory=/ -+ExecStart=-/bin/dracut-pre-pivot -+Type=oneshot -+StandardInput=tty-force -+StandardOutput=inherit -+StandardError=inherit -+KillMode=process -+ -+# Bash ignores SIGTERM, so we send SIGHUP instead, to ensure that bash -+# terminates cleanly. -+KillSignal=SIGHUP -diff --git a/modules.d/98systemd/dracut-pre-pivot.sh b/modules.d/98systemd/dracut-pre-pivot.sh -new file mode 100755 -index 0000000..5ee1dd0 ---- /dev/null -+++ b/modules.d/98systemd/dracut-pre-pivot.sh -@@ -0,0 +1,54 @@ -+#!/bin/sh -+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- -+# ex: ts=8 sw=4 sts=4 et filetype=sh -+ -+exec /dev/console 2>&1 -+if [ -f /dracut-state.sh ]; then -+ . /dracut-state.sh || : -+fi -+. /lib/dracut-lib.sh -+source_conf /etc/conf.d -+ -+# pre pivot scripts are sourced just before we doing cleanup and switch over -+# to the new root. -+getarg 'rd.break=pre-pivot' 'rdbreak=pre-pivot' && emergency_shell -n pre-pivot "Break pre-pivot" -+source_hook pre-pivot -+ -+# pre pivot cleanup scripts are sourced just before we switch over to the new root. -+getarg 'rd.break=cleanup' 'rdbreak=cleanup' && emergency_shell -n cleanup "Break cleanup" -+source_hook cleanup -+ -+# By the time we get here, the root filesystem should be mounted. -+# Try to find init. -+for i in "$(getarg real_init=)" "$(getarg init=)" $(getargs rd.distroinit=) /sbin/init; do -+ [ -n "$i" ] || continue -+ -+ __p=$(readlink -f "${NEWROOT}/${i}") -+ if [ -x "$__p" ]; then -+ INIT="$i" -+ break -+ fi -+done -+ -+if [ -n "$INIT" ]; then -+ { -+ echo "NEWROOT=\"$NEWROOT\"" -+ echo "NEWINIT=\"$INIT\"" -+ } > /etc/switch-root.conf -+else -+ echo "Cannot find init!" -+ echo "Please check to make sure you passed a valid root filesystem!" -+ emergency_shell -+fi -+ -+udevadm control --stop-exec-queue -+systemctl stop udevd.service -+udevadm info --cleanup-db -+ -+# remove helper symlink -+[ -h /dev/root ] && rm -f /dev/root -+ -+getarg rd.break rdbreak && emergency_shell -n switch_root "Break before switch_root" -+info "Switching root" -+ -+export -p > /dracut-state.sh -diff --git a/modules.d/98systemd/dracut-pre-trigger.service b/modules.d/98systemd/dracut-pre-trigger.service -new file mode 100644 -index 0000000..080b1f5 ---- /dev/null -+++ b/modules.d/98systemd/dracut-pre-trigger.service -@@ -0,0 +1,28 @@ -+# This file is part of systemd. -+# -+# systemd is free software; you can redistribute it and/or modify it -+# under the terms of the GNU Lesser General Public License as published by -+# the Free Software Foundation; either version 2.1 of the License, or -+# (at your option) any later version. -+ -+# See systemd.special(7) for details -+ -+[Unit] -+Description=Dracut pre-trigger hook -+DefaultDependencies=no -+After=systemd-udev.service -+Before=systemd-udev-trigger.service -+ -+[Service] -+Environment=HOME=/ -+WorkingDirectory=/ -+ExecStart=-/bin/dracut-pre-trigger -+Type=oneshot -+StandardInput=tty-force -+StandardOutput=inherit -+StandardError=inherit -+KillMode=process -+ -+# Bash ignores SIGTERM, so we send SIGHUP instead, to ensure that bash -+# terminates cleanly. -+KillSignal=SIGHUP -diff --git a/modules.d/98systemd/dracut-pre-trigger.sh b/modules.d/98systemd/dracut-pre-trigger.sh -new file mode 100755 -index 0000000..a6c66e4 ---- /dev/null -+++ b/modules.d/98systemd/dracut-pre-trigger.sh -@@ -0,0 +1,20 @@ -+#!/bin/sh -+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- -+# ex: ts=8 sw=4 sts=4 et filetype=sh -+exec /dev/console 2>&1 -+ -+if [ -f /dracut-state.sh ]; then -+ . /dracut-state.sh || : -+fi -+. /lib/dracut-lib.sh -+source_conf /etc/conf.d -+ -+getargbool 0 rd.udev.info -y rdudevinfo && udevadm control "$UDEV_LOG_PRIO_ARG=info" -+getargbool 0 rd.udev.debug -y rdudevdebug && udevadm control "$UDEV_LOG_PRIO_ARG=debug" -+udevproperty "hookdir=$hookdir" -+ -+source_hook pre-trigger -+ -+udevadm control --reload >/dev/null 2>&1 || : -+ -+export -p > /dracut-state.sh -diff --git a/modules.d/98systemd/dracut-pre-udev.service b/modules.d/98systemd/dracut-pre-udev.service -new file mode 100644 -index 0000000..09a349d ---- /dev/null -+++ b/modules.d/98systemd/dracut-pre-udev.service -@@ -0,0 +1,27 @@ -+# This file is part of systemd. -+# -+# systemd is free software; you can redistribute it and/or modify it -+# under the terms of the GNU Lesser General Public License as published by -+# the Free Software Foundation; either version 2.1 of the License, or -+# (at your option) any later version. -+ -+# See systemd.special(7) for details -+ -+[Unit] -+Description=Dracut pre-trigger hook -+DefaultDependencies=no -+Before=systemd-udev.service -+ -+[Service] -+Environment=HOME=/ -+WorkingDirectory=/ -+ExecStart=-/bin/dracut-pre-udev -+Type=oneshot -+StandardInput=tty-force -+StandardOutput=inherit -+StandardError=inherit -+KillMode=process -+ -+# Bash ignores SIGTERM, so we send SIGHUP instead, to ensure that bash -+# terminates cleanly. -+KillSignal=SIGHUP -diff --git a/modules.d/98systemd/dracut-pre-udev.sh b/modules.d/98systemd/dracut-pre-udev.sh -new file mode 100755 -index 0000000..5740174 ---- /dev/null -+++ b/modules.d/98systemd/dracut-pre-udev.sh -@@ -0,0 +1,17 @@ -+#!/bin/sh -+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- -+# ex: ts=8 sw=4 sts=4 et filetype=sh -+ -+exec /dev/console 2>&1 -+if [ -f /dracut-state.sh ]; then -+ . /dracut-state.sh || : -+fi -+. /lib/dracut-lib.sh -+source_conf /etc/conf.d -+ -+# pre pivot scripts are sourced just before we doing cleanup and switch over -+# to the new root. -+getarg 'rd.break=pre-udev' 'rdbreak=pre-udev' && emergency_shell -n pre-udev "Break pre-udev" -+source_hook pre-udev -+ -+export -p > /dracut-state.sh -diff --git a/modules.d/98systemd/emergency.service b/modules.d/98systemd/emergency.service -new file mode 100644 -index 0000000..ecebf96 ---- /dev/null -+++ b/modules.d/98systemd/emergency.service -@@ -0,0 +1,30 @@ -+# This file is part of systemd. -+# -+# systemd is free software; you can redistribute it and/or modify it -+# under the terms of the GNU Lesser General Public License as published by -+# the Free Software Foundation; either version 2.1 of the License, or -+# (at your option) any later version. -+ -+# See systemd.special(7) for details -+ -+[Unit] -+Description=Emergency Shell -+DefaultDependencies=no -+Conflicts=shutdown.target -+Before=shutdown.target -+ -+[Service] -+Environment=HOME=/ -+WorkingDirectory=/ -+ExecStart=-/bin/sh -i -l -+ExecStopPost=-/usr/bin/systemctl --fail --no-block switch-root -+Type=idle -+StandardInput=tty-force -+StandardOutput=inherit -+StandardError=inherit -+KillMode=process -+IgnoreSIGPIPE=no -+ -+# Bash ignores SIGTERM, so we send SIGHUP instead, to ensure that bash -+# terminates cleanly. -+KillSignal=SIGHUP -diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh -new file mode 100755 -index 0000000..22e570f ---- /dev/null -+++ b/modules.d/98systemd/module-setup.sh -@@ -0,0 +1,150 @@ -+#!/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 -+ [ -x /lib/systemd/systemd ] && return 255 -+ return 1 -+} -+ -+depends() { -+ return 0 -+} -+ -+install() { -+ -+ for i in \ -+ systemd \ -+ systemd-cgroups-agent \ -+ systemd-initctl \ -+ systemd-shutdownd \ -+ systemd-shutdown \ -+ systemd-modules-load \ -+ systemd-remount-fs \ -+ systemd-reply-password \ -+ systemd-fsck \ -+ systemd-timestamp \ -+ systemd-ac-power \ -+ systemd-sysctl \ -+ systemd-udevd \ -+ systemd-journald \ -+ systemd-coredump \ -+ systemd-vconsole-setup \ -+ systemd-cryptsetup \ -+ systemd-localed \ -+ system/emergency.target \ -+ system/sysinit.target \ -+ system/basic.target \ -+ system/halt.target \ -+ system/kexec.target \ -+ system/local-fs.target \ -+ system/local-fs-pre.target \ -+ system/remote-fs.target \ -+ system/remote-fs-pre.target \ -+ system/network.target \ -+ system/nss-lookup.target \ -+ system/nss-user-lookup.target \ -+ system/poweroff.target \ -+ system/reboot.target \ -+ system/rescue.target \ -+ system/rpcbind.target \ -+ system/shutdown.target \ -+ system/final.target \ -+ system/sigpwr.target \ -+ system/sockets.target \ -+ system/swap.target \ -+ system/systemd-initctl.socket \ -+ system/systemd-shutdownd.socket \ -+ system/bluetooth.target \ -+ system/systemd-ask-password-console.path \ -+ system/systemd-udev-control.socket \ -+ system/systemd-udev-kernel.socket \ -+ system/systemd-ask-password-plymouth.path \ -+ system/systemd-journald.socket \ -+ system/cryptsetup.target \ -+ system/console-shell.service \ -+ system/console-getty.service \ -+ system/systemd-initctl.service \ -+ system/systemd-shutdownd.service \ -+ system/systemd-modules-load.service \ -+ system/systemd-remount-fs.service \ -+ system/systemd-ask-password-console.service \ -+ system/halt.service \ -+ system/poweroff.service \ -+ system/reboot.service \ -+ system/kexec.service \ -+ system/fsck@.service \ -+ system/systemd-udev.service \ -+ system/systemd-udev-trigger.service \ -+ system/systemd-udev-settle.service \ -+ system/systemd-ask-password-plymouth.service \ -+ system/systemd-journald.service \ -+ system/systemd-vconsole-setup.service \ -+ system/systemd-localed.service \ -+ system/sysinit.target.wants/systemd-modules-load.service \ -+ system/sysinit.target.wants/systemd-ask-password-console.path \ -+ system/sysinit.target.wants/systemd-journald.service \ -+ system/sysinit.target.wants/systemd-vconsole-setup.service \ -+ system/sysinit.target.wants/cryptsetup.target \ -+ system/sockets.target.wants/systemd-initctl.socket \ -+ system/sockets.target.wants/systemd-shutdownd.socket \ -+ system/sockets.target.wants/systemd-udev-control.socket \ -+ system/sockets.target.wants/systemd-udev-kernel.socket \ -+ system/sockets.target.wants/systemd-journald.socket \ -+ system/basic.target.wants/systemd-udev.service \ -+ system/basic.target.wants/systemd-udev-trigger.service \ -+ system/local-fs.target.wants/systemd-remount-fs.service \ -+ system/local-fs.target.wants/fsck-root.service \ -+ system/local-fs.target.wants/tmp.mount \ -+ system/ctrl-alt-del.target \ -+ system/autovt@.service \ -+ system/single.service \ -+ system/syslog.socket \ -+ system/syslog.target \ -+ system/switch-root.target \ -+ system/switch-root.service \ -+ system/umount.target \ -+ ;do -+ [ -e "/lib/systemd/$i" ] && dracut_install "/lib/systemd/$i" -+ done -+ for i in /etc/systemd/*.conf; do -+ dracut_install "$i" -+ done -+ -+ ln -fs /lib/systemd/systemd "$initdir/init" -+ -+ { -+ echo "LogLevel=debug" -+ echo "LogTarget=console" -+ } >> "$initdir/etc/systemd/system.conf" -+ -+ rm -f "$initdir/lib/systemd/system/emergency.service" -+ inst "$moddir/emergency.service" /lib/systemd/system/emergency.service -+ rm -f "$initdir/lib/systemd/system/rescue.service" -+ inst "$moddir/rescue.service" /lib/systemd/system/rescue.service -+ inst "$moddir/switch-root.target" /lib/systemd/system/switch-root.target -+ inst "$moddir/switch-root.service" /lib/systemd/system/switch-root.service -+ ln -s basic.target "$initdir/lib/systemd/system/default.target" -+ -+ inst "$moddir/dracut-cmdline.sh" /lib/systemd/system-generators/dracut-cmdline.sh -+ -+ inst "$moddir/dracut-pre-udev.sh" /bin/dracut-pre-udev -+ inst "$moddir/dracut-pre-udev.service" /lib/systemd/system/dracut-pre-udev.service -+ ln -s ../dracut-pre-udev.service "$initdir/lib/systemd/system/basic.target.wants/dracut-pre-udev.service" -+ -+ inst "$moddir/dracut-pre-trigger.sh" /bin/dracut-pre-trigger -+ inst "$moddir/dracut-pre-trigger.service" /lib/systemd/system/dracut-pre-trigger.service -+ ln -s ../dracut-pre-trigger.service "$initdir/lib/systemd/system/basic.target.wants/dracut-pre-trigger.service" -+ -+ inst "$moddir/dracut-initqueue.sh" /bin/dracut-initqueue -+ inst "$moddir/dracut-initqueue.service" /lib/systemd/system/dracut-initqueue.service -+ ln -s ../dracut-initqueue.service "$initdir/lib/systemd/system/basic.target.wants/dracut-initqueue.service" -+ -+ inst "$moddir/dracut-pre-pivot.sh" /bin/dracut-pre-pivot -+ inst "$moddir/dracut-pre-pivot.service" /lib/systemd/system/dracut-pre-pivot.service -+ mkdir -p "$initdir/lib/systemd/system/switch-root.target.wants" -+ ln -s ../dracut-pre-pivot.service "$initdir/lib/systemd/system/switch-root.target.wants/dracut-pre-pivot.service" -+ -+} -+ -diff --git a/modules.d/98systemd/rescue.service b/modules.d/98systemd/rescue.service -new file mode 100644 -index 0000000..057f8b4 ---- /dev/null -+++ b/modules.d/98systemd/rescue.service -@@ -0,0 +1,31 @@ -+# This file is part of systemd. -+# -+# systemd is free software; you can redistribute it and/or modify it -+# under the terms of the GNU Lesser General Public License as published by -+# the Free Software Foundation; either version 2.1 of the License, or -+# (at your option) any later version. -+ -+# See systemd.special(7) for details -+ -+[Unit] -+Description=Rescue Shell -+DefaultDependencies=no -+Conflicts=shutdown.target -+After=basic.target plymouth-start.service -+Before=shutdown.target -+ -+[Service] -+Environment=HOME=/ -+WorkingDirectory=/ -+ExecStart=-/bin/sh -i -l -+#ExecStopPost=-/usr/bin/systemctl --fail --no-block switch-root /sysroot /sbin/init -+ExecStopPost=-/usr/bin/systemctl --fail --no-block switch-root -+Type=idle -+StandardInput=tty-force -+StandardOutput=inherit -+StandardError=inherit -+KillMode=process -+ -+# Bash ignores SIGTERM, so we send SIGHUP instead, to ensure that bash -+# terminates cleanly. -+KillSignal=SIGHUP -diff --git a/modules.d/98systemd/switch-root.service b/modules.d/98systemd/switch-root.service -new file mode 100644 -index 0000000..f72739e ---- /dev/null -+++ b/modules.d/98systemd/switch-root.service -@@ -0,0 +1,17 @@ -+# This file is part of systemd. -+# -+# systemd is free software; you can redistribute it and/or modify it -+# under the terms of the GNU Lesser General Public License as published by -+# the Free Software Foundation; either version 2.1 of the License, or -+# (at your option) any later version. -+ -+[Unit] -+Description=Switch Root -+DefaultDependencies=no -+Requires=shutdown.target final.target -+After=shutdown.target final.target -+ -+[Service] -+Type=oneshot -+EnvironmentFile=/etc/switch-root.conf -+ExecStart=/usr/bin/systemctl --force switch-root ${NEWROOT} ${NEWINIT} -diff --git a/modules.d/98systemd/switch-root.target b/modules.d/98systemd/switch-root.target -new file mode 100644 -index 0000000..d0d60e1 ---- /dev/null -+++ b/modules.d/98systemd/switch-root.target -@@ -0,0 +1,16 @@ -+# This file is part of systemd. -+# -+# systemd is free software; you can redistribute it and/or modify it -+# under the terms of the GNU Lesser General Public License as published by -+# the Free Software Foundation; either version 2.1 of the License, or -+# (at your option) any later version. -+ -+# See systemd.special(7) for details -+ -+[Unit] -+Description=Switch Root -+DefaultDependencies=no -+Requires=switch-root.service -+After=switch-root.service -+AllowIsolate=yes -+ -diff --git a/test/TEST-02-SYSTEMD/99-idesymlinks.rules b/test/TEST-02-SYSTEMD/99-idesymlinks.rules -new file mode 100644 -index 0000000..d557790 ---- /dev/null -+++ b/test/TEST-02-SYSTEMD/99-idesymlinks.rules -@@ -0,0 +1,8 @@ -+ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="hda", SYMLINK+="sda" -+ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="partition", KERNEL=="hda*", SYMLINK+="sda$env{MINOR}" -+ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="hdb", SYMLINK+="sdb" -+ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="partition", KERNEL=="hdb*", SYMLINK+="sdb$env{MINOR}" -+ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="hdc", SYMLINK+="sdc" -+ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="partition", KERNEL=="hdc*", SYMLINK+="sdc$env{MINOR}" -+ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="hdd", SYMLINK+="sdd" -+ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="partition", KERNEL=="hdd*", SYMLINK+="sdd$env{MINOR}" -diff --git a/test/TEST-02-SYSTEMD/Makefile b/test/TEST-02-SYSTEMD/Makefile -new file mode 100644 -index 0000000..bc0ddb6 ---- /dev/null -+++ b/test/TEST-02-SYSTEMD/Makefile -@@ -0,0 +1,10 @@ -+all: -+ @make -s --no-print-directory -C ../.. all -+ @basedir=../.. testdir=../ ./test.sh --all -+setup: -+ @make --no-print-directory -C ../.. all -+ @basedir=../.. testdir=../ ./test.sh --setup -+clean: -+ @basedir=../.. testdir=../ ./test.sh --clean -+run: -+ @basedir=../.. testdir=../ ./test.sh --run -diff --git a/test/TEST-02-SYSTEMD/create-root.sh b/test/TEST-02-SYSTEMD/create-root.sh -new file mode 100755 -index 0000000..0e91ab5 ---- /dev/null -+++ b/test/TEST-02-SYSTEMD/create-root.sh -@@ -0,0 +1,23 @@ -+#!/bin/sh -+# don't let udev and this script step on eachother's toes -+for x in 64-lvm.rules 70-mdadm.rules 99-mount-rules; do -+ > "/etc/udev/rules.d/$x" -+done -+rm /etc/lvm/lvm.conf -+udevadm control --reload-rules -+set -e -+# save a partition at the beginning for future flagging purposes -+sfdisk -C 1280 -H 2 -S 32 -L /dev/sda </dev/sda1 -+poweroff -f -+ -diff --git a/test/TEST-02-SYSTEMD/cryptroot-ask.sh b/test/TEST-02-SYSTEMD/cryptroot-ask.sh -new file mode 100755 -index 0000000..db27c5b ---- /dev/null -+++ b/test/TEST-02-SYSTEMD/cryptroot-ask.sh -@@ -0,0 +1,6 @@ -+#!/bin/sh -+ -+[ -b /dev/mapper/$2 ] && exit 0 -+echo -n test >/keyfile -+/sbin/cryptsetup luksOpen $1 $2 /dev/console 2>&1 -+echo "dracut-root-block-success" >/dev/sda1 -+export TERM=linux -+export PS1='initramfs-test:\w\$ ' -+[ -f /etc/mtab ] || ln -sfn /proc/mounts /etc/mtab -+[ -f /etc/fstab ] || ln -sfn /proc/mounts /etc/fstab -+stty sane -+echo "made it to the rootfs!" -+if strstr "$CMDLINE" "rd.shell"; then -+ strstr "$(setsid --help)" "control" && CTTY="-c" -+ setsid $CTTY sh -i -+fi -+echo "Powering down." -+mount -n -o remount,ro / -+poweroff -f -diff --git a/test/TEST-02-SYSTEMD/test.sh b/test/TEST-02-SYSTEMD/test.sh -new file mode 100755 -index 0000000..fe3bfd1 ---- /dev/null -+++ b/test/TEST-02-SYSTEMD/test.sh -@@ -0,0 +1,95 @@ -+#!/bin/bash -+TEST_DESCRIPTION="root filesystem on a ext3 filesystem" -+ -+KVERSION=${KVERSION-$(uname -r)} -+ -+# Uncomment this to debug failures -+#DEBUGFAIL="rd.shell" -+test_run() { -+ $testdir/run-qemu \ -+ -hda $TESTDIR/root.ext3 \ -+ -m 256M -nographic \ -+ -net none -kernel /boot/vmlinuz-$KVERSION \ -+ -append "root=LABEL=dracut rw loglevel=77 systemd.log_level=debug systemd.log_target=console rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL" \ -+ -initrd $TESTDIR/initramfs.testing -+ grep -m 1 -q dracut-root-block-success $TESTDIR/root.ext3 || return 1 -+} -+ -+test_setup() { -+ rm -f $TESTDIR/root.ext3 -+ # Create the blank file to use as a root filesystem -+ dd if=/dev/null of=$TESTDIR/root.ext3 bs=1M seek=40 -+ -+ kernel=$KVERSION -+ # Create what will eventually be our root filesystem onto an overlay -+ ( -+ initdir=$TESTDIR/overlay/source -+ mkdir -p $initdir -+ . $basedir/dracut-functions.sh -+ dracut_install sh df free ls shutdown poweroff stty cat ps ln ip route \ -+ mount dmesg ifconfig dhclient mkdir cp ping dhclient \ -+ umount strace less setsid -+ for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do -+ [ -f ${_terminfodir}/l/linux ] && break -+ done -+ dracut_install -o ${_terminfodir}/l/linux -+ inst "$basedir/modules.d/40network/dhclient-script" "/sbin/dhclient-script" -+ inst "$basedir/modules.d/40network/ifup" "/sbin/ifup" -+ dracut_install grep -+ inst ./test-init.sh /sbin/init -+ find_binary plymouth >/dev/null && dracut_install plymouth -+ (cd "$initdir"; mkdir -p dev sys proc etc var/run tmp ) -+ cp -a /etc/ld.so.conf* $initdir/etc -+ sudo ldconfig -r "$initdir" -+ ) -+ -+ # second, install the files needed to make the root filesystem -+ ( -+ initdir=$TESTDIR/overlay -+ . $basedir/dracut-functions.sh -+ dracut_install sfdisk mkfs.ext3 poweroff cp umount -+ inst_hook initqueue 01 ./create-root.sh -+ inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules -+ ) -+ -+ # create an initramfs that will create the target root filesystem. -+ # We do it this way so that we do not risk trashing the host mdraid -+ # devices, volume groups, encrypted partitions, etc. -+ $basedir/dracut.sh -l -i $TESTDIR/overlay / \ -+ -m "dash udev-rules base rootfs-block kernel-modules" \ -+ -d "piix ide-gd_mod ata_piix ext3 sd_mod" \ -+ --nomdadmconf \ -+ -f $TESTDIR/initramfs.makeroot $KVERSION || return 1 -+ rm -rf $TESTDIR/overlay -+ # Invoke KVM and/or QEMU to actually create the target filesystem. -+ -+ $testdir/run-qemu \ -+ -hda $TESTDIR/root.ext3 \ -+ -m 256M -nographic -net none \ -+ -kernel "/boot/vmlinuz-$kernel" \ -+ -append "root=/dev/dracut/root rw rootfstype=ext3 quiet console=ttyS0,115200n81 selinux=0" \ -+ -initrd $TESTDIR/initramfs.makeroot || return 1 -+ grep -m 1 -q dracut-root-block-created $TESTDIR/root.ext3 || return 1 -+ -+ -+ ( -+ initdir=$TESTDIR/overlay -+ . $basedir/dracut-functions.sh -+ dracut_install poweroff shutdown -+ inst_hook emergency 000 ./hard-off.sh -+ inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules -+ ) -+ sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ -+ -a "debug systemd" \ -+ -o "network" \ -+ -d "piix ide-gd_mod ata_piix ext3 sd_mod" \ -+ -f $TESTDIR/initramfs.testing $KVERSION || return 1 -+ -+# -o "plymouth network md dmraid multipath fips caps crypt btrfs resume dmsquash-live dm" -+} -+ -+test_cleanup() { -+ return 0 -+} -+ -+. $testdir/test-functions diff --git a/0050-ifcfg-write-ifcfg.sh-use-PREFIX-for-prefix-netmask-f.patch b/0050-ifcfg-write-ifcfg.sh-use-PREFIX-for-prefix-netmask-f.patch deleted file mode 100644 index 0c41df7..0000000 --- a/0050-ifcfg-write-ifcfg.sh-use-PREFIX-for-prefix-netmask-f.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 5bfbfbfc22b8b9e1d2c79342656dd4ce56a03b57 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 9 May 2012 14:58:52 +0200 -Subject: [PATCH] ifcfg/write-ifcfg.sh: use PREFIX for prefix netmask form - -https://bugzilla.redhat.com/show_bug.cgi?id=820185 ---- - modules.d/45ifcfg/write-ifcfg.sh | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh -index f612762..580fbd4 100755 ---- a/modules.d/45ifcfg/write-ifcfg.sh -+++ b/modules.d/45ifcfg/write-ifcfg.sh -@@ -50,7 +50,11 @@ for netif in $IFACES ; do - # If we've booted with static ip= lines, the override file is there - [ -e /tmp/net.$netif.override ] && . /tmp/net.$netif.override - echo "IPADDR=$ip" -- echo "NETMASK=$mask" -+ if strstr "$mask" "."; then -+ echo "NETMASK=$mask" -+ else -+ echo "PREFIX=$mask" -+ fi - [ -n "$gw" ] && echo "GATEWAY=$gw" - fi - } > /tmp/ifcfg/ifcfg-$netif diff --git a/0051-dracut.spec-add-98systemd-module.patch b/0051-dracut.spec-add-98systemd-module.patch deleted file mode 100644 index 92c85ee..0000000 --- a/0051-dracut.spec-add-98systemd-module.patch +++ /dev/null @@ -1,21 +0,0 @@ -From 6e26f9b447e93d1dc9aa8d77f534970599d3aaf2 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 9 May 2012 15:13:28 +0200 -Subject: [PATCH] dracut.spec: add 98systemd module - ---- - dracut.spec | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/dracut.spec b/dracut.spec -index 77b197e..73c66b5 100644 ---- a/dracut.spec -+++ b/dracut.spec -@@ -290,6 +290,7 @@ rm -rf $RPM_BUILD_ROOT - %{dracutlibdir}/modules.d/98ecryptfs - %{dracutlibdir}/modules.d/98pollcdrom - %{dracutlibdir}/modules.d/98syslog -+%{dracutlibdir}/modules.d/98systemd - %{dracutlibdir}/modules.d/98usrmount - %{dracutlibdir}/modules.d/99base - %{dracutlibdir}/modules.d/99fs-lib diff --git a/0052-Fail-to-boot-if-mediacheck-fails-817419.patch b/0052-Fail-to-boot-if-mediacheck-fails-817419.patch deleted file mode 100644 index f2f6fee..0000000 --- a/0052-Fail-to-boot-if-mediacheck-fails-817419.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 37427748d1846a68b8655b9cc8394f22b7d34975 Mon Sep 17 00:00:00 2001 -From: "Brian C. Lane" -Date: Wed, 9 May 2012 11:15:03 -0700 -Subject: [PATCH] Fail to boot if mediacheck fails (#817419) - -The return value of checkisomd5 was being ignored. ---- - modules.d/90dmsquash-live/dmsquash-live-root.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/90dmsquash-live/dmsquash-live-root.sh b/modules.d/90dmsquash-live/dmsquash-live-root.sh -index 2aaec28..fdbd6f5 100755 ---- a/modules.d/90dmsquash-live/dmsquash-live-root.sh -+++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh -@@ -33,7 +33,7 @@ fi - getarg rd.live.check check || check="" - if [ -n "$check" ]; then - [ -x /bin/plymouth ] && /bin/plymouth --hide-splash -- checkisomd5 --verbose $livedev || : -+ checkisomd5 --verbose $livedev - if [ $? -ne 0 ]; then - die "CD check failed!" - exit 1 diff --git a/0053-Makefile-call-git2spec.pl-with-LANG-C.patch b/0053-Makefile-call-git2spec.pl-with-LANG-C.patch deleted file mode 100644 index 4ce678d..0000000 --- a/0053-Makefile-call-git2spec.pl-with-LANG-C.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 53e3244dbafdd583a2487a56e02a2a0108245383 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 10 May 2012 14:30:31 +0200 -Subject: [PATCH] Makefile: call git2spec.pl with LANG=C - ---- - Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile b/Makefile -index 5ce1778..bf51b51 100644 ---- a/Makefile -+++ b/Makefile -@@ -87,7 +87,7 @@ dracut-$(VERSION).tar.bz2: doc - rpm: dracut-$(VERSION).tar.bz2 - rpmbuild=$$(mktemp -d -t rpmbuild-dracut.XXXXXX); src=$$(pwd); \ - cp dracut-$(VERSION).tar.bz2 "$$rpmbuild"; \ -- $$src/git2spec.pl $(VERSION) "$$rpmbuild" < dracut.spec > $$rpmbuild/dracut.spec; \ -+ LANG=C $$src/git2spec.pl $(VERSION) "$$rpmbuild" < dracut.spec > $$rpmbuild/dracut.spec; \ - (cd "$$rpmbuild"; rpmbuild --define "_topdir $$PWD" --define "_sourcedir $$PWD" \ - --define "_specdir $$PWD" --define "_srcrpmdir $$PWD" \ - --define "_rpmdir $$PWD" -ba dracut.spec; ) && \ diff --git a/0054-ifcfg-write-ifcfg.sh-add-s390-specific-configuration.patch b/0054-ifcfg-write-ifcfg.sh-add-s390-specific-configuration.patch deleted file mode 100644 index 5caea20..0000000 --- a/0054-ifcfg-write-ifcfg.sh-add-s390-specific-configuration.patch +++ /dev/null @@ -1,106 +0,0 @@ -From a82d207b8d0c067ab6f70acb0dc9e47a6f09d3f8 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 10 May 2012 14:31:05 +0200 -Subject: [PATCH] ifcfg/write-ifcfg.sh: add s390 specific configuration - options - -https://bugzilla.redhat.com/show_bug.cgi?id=811521 ---- - modules.d/45ifcfg/write-ifcfg.sh | 70 ++++++++++++++++++++++++++++++++++++-- - 1 file changed, 68 insertions(+), 2 deletions(-) - -diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh -index 580fbd4..d1f6fe6 100755 ---- a/modules.d/45ifcfg/write-ifcfg.sh -+++ b/modules.d/45ifcfg/write-ifcfg.sh -@@ -20,6 +20,68 @@ fi - mkdir -m 0755 -p /tmp/ifcfg/ - mkdir -m 0755 -p /tmp/ifcfg-leases/ - -+get_config_line_by_subchannel() -+{ -+ local CHANNEL -+ local line -+ -+ CHANNELS="$1" -+ while read line; do -+ if strstr "$line" "$CHANNELS"; then -+ echo $line -+ return 0 -+ fi -+ done < /etc/ccw.conf -+ return 1 -+} -+ -+print_s390() { -+ local _netif -+ local SUBCHANNELS -+ local OPTIONS -+ local NETTYPE -+ local CONFIG_LINE -+ local i -+ local channel -+ -+ _netif="$1" -+ # if we find ccw channel, then use those, instead of -+ # of the MAC -+ SUBCHANNELS=$({ -+ for i in /sys/class/net/$_netif/device/cdev[0-9]*; do -+ [ -e $i ] || continue -+ channel=$(readlink -f $i) -+ echo -n "${channel##*/}," -+ done -+ }) -+ [ -n "$SUBCHANNELS" ] || return 1 -+ -+ SUBCHANNELS=${SUBCHANNELS%,} -+ echo "SUBCHANNELS=\"${SUBCHANNELS}\"" -+ CONFIG_LINE=$(get_config_line_by_subchannel $SUBCHANNELS) -+ -+ [ $? -ne 0 -o -z "$CONFIG_LINE" ] && return -+ -+ IFS="," -+ set $CONFIG_LINE -+ IFS="$OLD_IFS" -+ NETTYPE=$1 -+ shift -+ SUBCHANNELS="$1" -+ OPTIONS="" -+ shift -+ while [ $# -gt 0 ]; do -+ case $1 in -+ *=*) OPTIONS="$OPTIONS $1";; -+ esac -+ shift -+ done -+ OPTIONS=${OPTIONS## } -+ echo "NETTYPE=\"${NETTYPE}\"" -+ echo "OPTIONS=\"${OPTIONS}\"" -+} -+ -+ - for netif in $IFACES ; do - # bridge? - unset bridge -@@ -38,7 +100,6 @@ for netif in $IFACES ; do - echo "ONBOOT=yes" - echo "NETBOOT=yes" - echo "UUID=$uuid" -- [ -n "$macaddr" ] && echo "MACADDR=$macaddr" - [ -n "$mtu" ] && echo "MTU=$mtu" - if [ -f /tmp/net.$netif.lease ]; then - strstr "$ip" '*:*:*' && -@@ -63,7 +124,12 @@ for netif in $IFACES ; do - if [ -z "$bridge" ] && [ -z "$bond" ]; then - # standard interface - { -- echo "HWADDR=$(cat /sys/class/net/$netif/address)" -+ if [ -n "$macaddr" ]; then -+ echo "MACADDR=$macaddr" -+ else -+ echo "HWADDR=\"$(cat /sys/class/net/$netif/address)\"" -+ fi -+ print_s390 $netif - echo "TYPE=Ethernet" - echo "NAME=\"Boot Disk\"" - [ -n "$mtu" ] && echo "MTU=$mtu" diff --git a/0055-systemd-adapt-to-new-switch-root-mechanism.patch b/0055-systemd-adapt-to-new-switch-root-mechanism.patch deleted file mode 100644 index 9684255..0000000 --- a/0055-systemd-adapt-to-new-switch-root-mechanism.patch +++ /dev/null @@ -1,128 +0,0 @@ -From f72318243c7e5145393b2c9830779426a124cf83 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Tue, 15 May 2012 18:57:29 +0200 -Subject: [PATCH] systemd: adapt to new switch-root mechanism - ---- - modules.d/98systemd/dracut-initqueue.sh | 3 ++- - modules.d/98systemd/dracut-pre-pivot.sh | 15 ++++----------- - modules.d/98systemd/emergency.service | 2 +- - modules.d/98systemd/module-setup.sh | 10 +++++----- - modules.d/98systemd/rescue.service | 2 +- - test/TEST-02-SYSTEMD/test.sh | 2 +- - 6 files changed, 14 insertions(+), 20 deletions(-) - -diff --git a/modules.d/98systemd/dracut-initqueue.sh b/modules.d/98systemd/dracut-initqueue.sh -index 402f536..5b6994d 100755 ---- a/modules.d/98systemd/dracut-initqueue.sh -+++ b/modules.d/98systemd/dracut-initqueue.sh -@@ -106,6 +106,7 @@ done - while read dev mp rest; do [ "$mp" = "$NEWROOT" ] && echo $dev; done < /proc/mounts - } | vinfo - --systemctl switch-root - - export -p > /dracut-state.sh -+ -+systemctl isolate switch-root.target -diff --git a/modules.d/98systemd/dracut-pre-pivot.sh b/modules.d/98systemd/dracut-pre-pivot.sh -index 5ee1dd0..0d717a6 100755 ---- a/modules.d/98systemd/dracut-pre-pivot.sh -+++ b/modules.d/98systemd/dracut-pre-pivot.sh -@@ -20,26 +20,19 @@ source_hook cleanup - - # By the time we get here, the root filesystem should be mounted. - # Try to find init. --for i in "$(getarg real_init=)" "$(getarg init=)" $(getargs rd.distroinit=) /sbin/init; do -+ -+for i in "$(getarg real_init=)" "$(getarg init=)"; do - [ -n "$i" ] || continue - - __p=$(readlink -f "${NEWROOT}/${i}") - if [ -x "$__p" ]; then - INIT="$i" -+ echo "NEWINIT=\"$INIT\"" > /etc/switch-root.conf - break - fi - done - --if [ -n "$INIT" ]; then -- { -- echo "NEWROOT=\"$NEWROOT\"" -- echo "NEWINIT=\"$INIT\"" -- } > /etc/switch-root.conf --else -- echo "Cannot find init!" -- echo "Please check to make sure you passed a valid root filesystem!" -- emergency_shell --fi -+echo "NEWROOT=\"$NEWROOT\"" >> /etc/switch-root.conf - - udevadm control --stop-exec-queue - systemctl stop udevd.service -diff --git a/modules.d/98systemd/emergency.service b/modules.d/98systemd/emergency.service -index ecebf96..7c705c4 100644 ---- a/modules.d/98systemd/emergency.service -+++ b/modules.d/98systemd/emergency.service -@@ -17,7 +17,7 @@ Before=shutdown.target - Environment=HOME=/ - WorkingDirectory=/ - ExecStart=-/bin/sh -i -l --ExecStopPost=-/usr/bin/systemctl --fail --no-block switch-root -+ExecStopPost=-/usr/bin/systemctl --fail --no-block default - Type=idle - StandardInput=tty-force - StandardOutput=inherit -diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh -index 22e570f..c045af5 100755 ---- a/modules.d/98systemd/module-setup.sh -+++ b/modules.d/98systemd/module-setup.sh -@@ -114,10 +114,10 @@ install() { - - ln -fs /lib/systemd/systemd "$initdir/init" - -- { -- echo "LogLevel=debug" -- echo "LogTarget=console" -- } >> "$initdir/etc/systemd/system.conf" -+# { -+# echo "LogLevel=debug" -+# echo "LogTarget=console" -+# } >> "$initdir/etc/systemd/system.conf" - - rm -f "$initdir/lib/systemd/system/emergency.service" - inst "$moddir/emergency.service" /lib/systemd/system/emergency.service -@@ -145,6 +145,6 @@ install() { - inst "$moddir/dracut-pre-pivot.service" /lib/systemd/system/dracut-pre-pivot.service - mkdir -p "$initdir/lib/systemd/system/switch-root.target.wants" - ln -s ../dracut-pre-pivot.service "$initdir/lib/systemd/system/switch-root.target.wants/dracut-pre-pivot.service" -- -+ > "$initdir/etc/machine-id" - } - -diff --git a/modules.d/98systemd/rescue.service b/modules.d/98systemd/rescue.service -index 057f8b4..652308c 100644 ---- a/modules.d/98systemd/rescue.service -+++ b/modules.d/98systemd/rescue.service -@@ -19,7 +19,7 @@ Environment=HOME=/ - WorkingDirectory=/ - ExecStart=-/bin/sh -i -l - #ExecStopPost=-/usr/bin/systemctl --fail --no-block switch-root /sysroot /sbin/init --ExecStopPost=-/usr/bin/systemctl --fail --no-block switch-root -+ExecStopPost=-/usr/bin/systemctl --fail --no-block default - Type=idle - StandardInput=tty-force - StandardOutput=inherit -diff --git a/test/TEST-02-SYSTEMD/test.sh b/test/TEST-02-SYSTEMD/test.sh -index fe3bfd1..334b636 100755 ---- a/test/TEST-02-SYSTEMD/test.sh -+++ b/test/TEST-02-SYSTEMD/test.sh -@@ -10,7 +10,7 @@ test_run() { - -hda $TESTDIR/root.ext3 \ - -m 256M -nographic \ - -net none -kernel /boot/vmlinuz-$KVERSION \ -- -append "root=LABEL=dracut rw loglevel=77 systemd.log_level=debug systemd.log_target=console rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL" \ -+ -append "root=LABEL=dracut rw loglevel=77 systemd.log_level=debug systemd.log_target=console rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug init=/sbin/init $DEBUGFAIL" \ - -initrd $TESTDIR/initramfs.testing - grep -m 1 -q dracut-root-block-success $TESTDIR/root.ext3 || return 1 - } diff --git a/0056-base-module-setup.sh-link-proc-self-mounts-to-initdi.patch b/0056-base-module-setup.sh-link-proc-self-mounts-to-initdi.patch deleted file mode 100644 index 9a3be9a..0000000 --- a/0056-base-module-setup.sh-link-proc-self-mounts-to-initdi.patch +++ /dev/null @@ -1,21 +0,0 @@ -From 832d85cbbc70bf3a6029faac45e7398d4b6ff179 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Tue, 15 May 2012 19:03:50 +0200 -Subject: [PATCH] base/module-setup.sh: link /proc/self/mounts to - $initdir/etc/mtab - ---- - modules.d/99base/module-setup.sh | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/modules.d/99base/module-setup.sh b/modules.d/99base/module-setup.sh -index 581ba93..8bf3d4d 100755 ---- a/modules.d/99base/module-setup.sh -+++ b/modules.d/99base/module-setup.sh -@@ -48,5 +48,6 @@ install() { - done > "${initdir}/etc/cmdline.d/distroinit.conf" - fi - -+ ln -s /proc/self/mounts "$initdir/etc/mtab" - } - diff --git a/0057-systemd-dracut-pre-pivot.sh-s-udevd.service-systemd-.patch b/0057-systemd-dracut-pre-pivot.sh-s-udevd.service-systemd-.patch deleted file mode 100644 index 793c6ca..0000000 --- a/0057-systemd-dracut-pre-pivot.sh-s-udevd.service-systemd-.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 022c5a802f2cbba9fd11903ed616cee7648b2f63 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 16 May 2012 11:20:59 +0200 -Subject: [PATCH] systemd/dracut-pre-pivot.sh: - s/udevd.service/systemd-udev.service/ - ---- - modules.d/98systemd/dracut-pre-pivot.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/98systemd/dracut-pre-pivot.sh b/modules.d/98systemd/dracut-pre-pivot.sh -index 0d717a6..272b293 100755 ---- a/modules.d/98systemd/dracut-pre-pivot.sh -+++ b/modules.d/98systemd/dracut-pre-pivot.sh -@@ -35,7 +35,7 @@ done - echo "NEWROOT=\"$NEWROOT\"" >> /etc/switch-root.conf - - udevadm control --stop-exec-queue --systemctl stop udevd.service -+systemctl stop systemd-udev.service - udevadm info --cleanup-db - - # remove helper symlink diff --git a/0058-systemd-switch-root.target-run-target-before-switch-.patch b/0058-systemd-switch-root.target-run-target-before-switch-.patch deleted file mode 100644 index 809a614..0000000 --- a/0058-systemd-switch-root.target-run-target-before-switch-.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 3df23069817586aa3143e6e9c33bec24785caea3 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 16 May 2012 11:21:33 +0200 -Subject: [PATCH] systemd/switch-root.target: run target before - switch-root.service - ---- - modules.d/98systemd/switch-root.target | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/98systemd/switch-root.target b/modules.d/98systemd/switch-root.target -index d0d60e1..adfb32c 100644 ---- a/modules.d/98systemd/switch-root.target -+++ b/modules.d/98systemd/switch-root.target -@@ -11,6 +11,6 @@ - Description=Switch Root - DefaultDependencies=no - Requires=switch-root.service --After=switch-root.service -+Before=switch-root.service - AllowIsolate=yes - diff --git a/0059-systemd-switch-root.service-do-not-require-shutdown-.patch b/0059-systemd-switch-root.service-do-not-require-shutdown-.patch deleted file mode 100644 index 666ea14..0000000 --- a/0059-systemd-switch-root.service-do-not-require-shutdown-.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 41153ca4f2163d2ede2d269e2a5388d7a4b73621 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 16 May 2012 11:22:28 +0200 -Subject: [PATCH] systemd/switch-root.service: do not require shutdown and - isolate to default - -do not require shutdown.target and final.target - -After switch-root isolate to the default target. This will load the -default target in the real root after systemd deserializes. ---- - modules.d/98systemd/switch-root.service | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/modules.d/98systemd/switch-root.service b/modules.d/98systemd/switch-root.service -index f72739e..0c41eb0 100644 ---- a/modules.d/98systemd/switch-root.service -+++ b/modules.d/98systemd/switch-root.service -@@ -8,10 +8,9 @@ - [Unit] - Description=Switch Root - DefaultDependencies=no --Requires=shutdown.target final.target --After=shutdown.target final.target - - [Service] - Type=oneshot - EnvironmentFile=/etc/switch-root.conf - ExecStart=/usr/bin/systemctl --force switch-root ${NEWROOT} ${NEWINIT} -+ExecStopPost=-/usr/bin/systemctl isolate default.target diff --git a/0060-systemd-store-switch-root.conf-in-run-initramfs.patch b/0060-systemd-store-switch-root.conf-in-run-initramfs.patch deleted file mode 100644 index de87499..0000000 --- a/0060-systemd-store-switch-root.conf-in-run-initramfs.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 38111b96223816bdc48930830f59d0fc674db895 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 16 May 2012 11:24:42 +0200 -Subject: [PATCH] systemd: store switch-root.conf in /run/initramfs - -Store switch-root.conf in /run/initramfs/switch-root.conf, so that the -service does not fail in ExecPost after switching to the real root. ---- - modules.d/98systemd/dracut-pre-pivot.sh | 4 ++-- - modules.d/98systemd/switch-root.service | 2 +- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/modules.d/98systemd/dracut-pre-pivot.sh b/modules.d/98systemd/dracut-pre-pivot.sh -index 272b293..a8e9fc1 100755 ---- a/modules.d/98systemd/dracut-pre-pivot.sh -+++ b/modules.d/98systemd/dracut-pre-pivot.sh -@@ -27,12 +27,12 @@ for i in "$(getarg real_init=)" "$(getarg init=)"; do - __p=$(readlink -f "${NEWROOT}/${i}") - if [ -x "$__p" ]; then - INIT="$i" -- echo "NEWINIT=\"$INIT\"" > /etc/switch-root.conf -+ echo "NEWINIT=\"$INIT\"" > /run/initramfs/switch-root.conf - break - fi - done - --echo "NEWROOT=\"$NEWROOT\"" >> /etc/switch-root.conf -+echo "NEWROOT=\"$NEWROOT\"" >> /run/initramfs/switch-root.conf - - udevadm control --stop-exec-queue - systemctl stop systemd-udev.service -diff --git a/modules.d/98systemd/switch-root.service b/modules.d/98systemd/switch-root.service -index 0c41eb0..2abfc90 100644 ---- a/modules.d/98systemd/switch-root.service -+++ b/modules.d/98systemd/switch-root.service -@@ -11,6 +11,6 @@ DefaultDependencies=no - - [Service] - Type=oneshot --EnvironmentFile=/etc/switch-root.conf -+EnvironmentFile=/run/initramfs/switch-root.conf - ExecStart=/usr/bin/systemctl --force switch-root ${NEWROOT} ${NEWINIT} - ExecStopPost=-/usr/bin/systemctl isolate default.target diff --git a/0061-Makefile-install-dracut-service-files-from-systemd-d.patch b/0061-Makefile-install-dracut-service-files-from-systemd-d.patch deleted file mode 100644 index 6d0d874..0000000 --- a/0061-Makefile-install-dracut-service-files-from-systemd-d.patch +++ /dev/null @@ -1,45 +0,0 @@ -From afd1fd8d412aa6f99ef9afa30ab15ae5d3314e1e Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 16 May 2012 11:28:42 +0200 -Subject: [PATCH] Makefile: install dracut service files from systemd dracut - module - ---- - Makefile | 11 ++++++++++- - dracut.spec | 1 + - 2 files changed, 11 insertions(+), 1 deletion(-) - -diff --git a/Makefile b/Makefile -index bf51b51..d9068c5 100644 ---- a/Makefile -+++ b/Makefile -@@ -56,7 +56,16 @@ install: doc - ln -s dracut.cmdline.7 $(DESTDIR)$(mandir)/man7/dracut.kernel.7 - if [ -n "$(systemdsystemunitdir)" ]; then \ - mkdir -p $(DESTDIR)$(systemdsystemunitdir); \ -- install -m 0644 dracut-shutdown.service $(DESTDIR)$(systemdsystemunitdir); \ -+ for i in \ -+ modules.d/98systemd/dracut-initqueue.service \ -+ modules.d/98systemd/dracut-pre-pivot.service \ -+ modules.d/98systemd/dracut-pre-trigger.service \ -+ modules.d/98systemd/dracut-pre-udev.service \ -+ modules.d/98systemd/switch-root.service \ -+ modules.d/98systemd/switch-root.target \ -+ dracut-shutdown.service; do \ -+ install -m 0644 $$i $(DESTDIR)$(systemdsystemunitdir); \ -+ done; \ - mkdir -p $(DESTDIR)$(systemdsystemunitdir)/shutdown.target.wants; \ - ln -s ../dracut-shutdown.service \ - $(DESTDIR)$(systemdsystemunitdir)/shutdown.target.wants/dracut-shutdown.service; \ -diff --git a/dracut.spec b/dracut.spec -index 73c66b5..201da0d 100644 ---- a/dracut.spec -+++ b/dracut.spec -@@ -301,6 +301,7 @@ rm -rf $RPM_BUILD_ROOT - %dir %{_sharedstatedir}/initramfs - %if %{defined _unitdir} - %{_unitdir}/*.service -+%{_unitdir}/*.target - %{_unitdir}/*/*.service - %endif - diff --git a/0062-90kernel-modules-module-setup.sh-install-xhci-hcd.patch b/0062-90kernel-modules-module-setup.sh-install-xhci-hcd.patch deleted file mode 100644 index 80026fa..0000000 --- a/0062-90kernel-modules-module-setup.sh-install-xhci-hcd.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 40913ad2199913eda4c61509348cb3f2a66d903c Mon Sep 17 00:00:00 2001 -From: Olivier Blin -Date: Thu, 10 May 2012 22:58:22 +0200 -Subject: [PATCH] 90kernel-modules/module-setup.sh: install xhci-hcd - -to allow booting and using kbd devices from USB 3.0 ---- - modules.d/90kernel-modules/module-setup.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh -index 26f4784..97e1de8 100755 ---- a/modules.d/90kernel-modules/module-setup.sh -+++ b/modules.d/90kernel-modules/module-setup.sh -@@ -36,7 +36,7 @@ installkernel() { - hostonly='' instmods usb_storage sdhci sdhci-pci - - # install keyboard support -- hostonly='' instmods atkbd i8042 usbhid hid-apple hid-sunplus hid-cherry hid-logitech hid-logitech-dj hid-microsoft ehci-hcd ohci-hcd uhci-hcd -+ hostonly='' instmods atkbd i8042 usbhid hid-apple hid-sunplus hid-cherry hid-logitech hid-logitech-dj hid-microsoft ehci-hcd ohci-hcd uhci-hcd xhci-hcd - # install unix socket support - hostonly='' instmods unix - instmods "=drivers/pcmcia" =ide "=drivers/usb/storage" diff --git a/0062-ARM-make-sure-that-we-get-the-storage-modules-into-t.patch b/0062-ARM-make-sure-that-we-get-the-storage-modules-into-t.patch deleted file mode 100644 index 3ab3e43..0000000 --- a/0062-ARM-make-sure-that-we-get-the-storage-modules-into-t.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 5e00cf513bdd46de5492145ebee6fb35fa3e6173 Mon Sep 17 00:00:00 2001 -From: Dennis Gilmore -Date: Thu, 17 May 2012 01:30:38 -0500 -Subject: [PATCH 62/62] ARM: make sure that we get the storage modules into - the initramfs - ---- - modules.d/90kernel-modules/module-setup.sh | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh -index 26f4784..fd8b92c 100755 ---- a/modules.d/90kernel-modules/module-setup.sh -+++ b/modules.d/90kernel-modules/module-setup.sh -@@ -35,6 +35,9 @@ installkernel() { - hostonly='' instmods pcmcia firewire-ohci - hostonly='' instmods usb_storage sdhci sdhci-pci - -+ # arm specific modules -+ hostonly='' instmods sdhci_esdhc_imx mmci sdhci_tegra mvsdio omap sdhci_dove ahci_platform pata_imx sata_mv -+ - # install keyboard support - hostonly='' instmods atkbd i8042 usbhid hid-apple hid-sunplus hid-cherry hid-logitech hid-logitech-dj hid-microsoft ehci-hcd ohci-hcd uhci-hcd - # install unix socket support --- -1.7.10.1 - diff --git a/0063-check-kernel-module-existance.patch b/0063-check-kernel-module-existance.patch deleted file mode 100644 index 1d8ef28..0000000 --- a/0063-check-kernel-module-existance.patch +++ /dev/null @@ -1,141 +0,0 @@ -From a6d3be9dd5e105c926b753fc3a26f0a91119c2a4 Mon Sep 17 00:00:00 2001 -From: Cong Wang -Date: Tue, 15 May 2012 14:19:56 +0800 -Subject: [PATCH] check kernel module existance - -This patch adds check of kernel module existance and -propagate errors to upper callers. - -In case of break other callers of instmods(), this patch -adds an option '-c' to it, only when "-c" is specified -we fail, otherwise, errors are ignored. - -Reported-by: Dave Young -Signed-off-by: Cong Wang -Cc: Harald Hoyer ---- - dracut-functions.sh | 37 +++++++++++++++++++++------- - dracut.sh | 10 ++++++-- - modules.d/90kernel-modules/module-setup.sh | 8 ++++-- - 3 files changed, 42 insertions(+), 13 deletions(-) - -diff --git a/dracut-functions.sh b/dracut-functions.sh -index 8256e02..4fe428e 100755 ---- a/dracut-functions.sh -+++ b/dracut-functions.sh -@@ -1108,17 +1108,22 @@ find_kernel_modules () { - find_kernel_modules_by_path drivers - } - --# instmods [ ... ] --# instmods -+# instmods [-c] [ ... ] -+# instmods [-c] - # install kernel modules along with all their dependencies. - # can be e.g. "=block" or "=drivers/usb/storage" - instmods() { - [[ $no_kernel = yes ]] && return - # called [sub]functions inherit _fderr - local _fderr=9 -+ local _check=no -+ if [[ $1 = '-c' ]]; then -+ _check=yes -+ shift -+ fi - - function inst1mod() { -- local _mod="$1" -+ local _ret=0 _mod="$1" - case $_mod in - =*) - if [ -f $srcmods/modules.${_mod#=} ]; then -@@ -1162,26 +1167,40 @@ instmods() { - ((_ret+=$?)) - ;; - esac -+ return $_ret - } - - function instmods_1() { -- local _ret=0 _mod _mpargs -+ local _mod _mpargs - if (($# == 0)); then # filenames from stdin - while read _mod; do -- inst1mod "${_mod%.ko*}" -+ inst1mod "${_mod%.ko*}" || { -+ if [ "$_check" = "yes" ]; then -+ dfatal "Failed to install $_mod" -+ return 1 -+ fi -+ } - done - fi - while (($# > 0)); do # filenames as arguments -- inst1mod ${1%.ko*} -+ inst1mod ${1%.ko*} || { -+ if [ "$_check" = "yes" ]; then -+ dfatal "Failed to install $1" -+ return 1 -+ fi -+ } - shift - done -- return $_ret -+ return 0 - } - -- local _filter_not_found='FATAL: Module .* not found.' -+ local _ret _filter_not_found='FATAL: Module .* not found.' -+ set -o pipefail - # Capture all stderr from modprobe to _fderr. We could use {var}>... - # redirections, but that would make dracut require bash4 at least. - eval "( instmods_1 \"\$@\" ) ${_fderr}>&1" \ - | while read line; do [[ "$line" =~ $_filter_not_found ]] || echo $line;done | derror -- return $? -+ _ret=$? -+ set +o pipefail -+ return $_ret - } -diff --git a/dracut.sh b/dracut.sh -index 2a7a812..315b965 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -708,11 +708,17 @@ for moddir in "$dracutbasedir/modules.d"/[0-9][0-9]*; do - [[ $show_modules = yes ]] && echo "$_d_mod" || \ - dinfo "*** Including module: $_d_mod ***" - if [[ $kernel_only = yes ]]; then -- module_installkernel $_d_mod -+ module_installkernel $_d_mod || { -+ dfatal "installkernel failed in module $_d_mod" -+ exit 1 -+ } - else - module_install $_d_mod - if [[ $no_kernel != yes ]]; then -- module_installkernel $_d_mod -+ module_installkernel $_d_mod || { -+ dfatal "installkernel failed in module $_d_mod" -+ exit 1 -+ } - fi - fi - mods_to_load=${mods_to_load// $_d_mod /} -diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh -index 97e1de8..b91785e 100755 ---- a/modules.d/90kernel-modules/module-setup.sh -+++ b/modules.d/90kernel-modules/module-setup.sh -@@ -58,8 +58,12 @@ installkernel() { - hostonly='' instmods $drivers - fi - -- [[ $add_drivers ]] && hostonly='' instmods $add_drivers -- [[ $filesystems ]] && hostonly='' instmods $filesystems -+ if [[ $add_drivers ]]; then -+ hostonly='' instmods -c $add_drivers || return 1 -+ fi -+ if [[ $filesystems ]]; then -+ hostonly='' instmods -c $filesystems || return 1 -+ fi - - # force install of scsi_wait_scan - hostonly='' instmods scsi_wait_scan diff --git a/0064-check-install-files-passed-by-cmdline.patch b/0064-check-install-files-passed-by-cmdline.patch deleted file mode 100644 index 686896c..0000000 --- a/0064-check-install-files-passed-by-cmdline.patch +++ /dev/null @@ -1,35 +0,0 @@ -From bd4be59fb2574b8cbcdf22a86a6cafb7b71db503 Mon Sep 17 00:00:00 2001 -From: Cong Wang -Date: Tue, 15 May 2012 14:19:57 +0800 -Subject: [PATCH] check install files passed by cmdline - -We should not trust cmdline passed by users, always -check the install files passed from cmdline. This restores -the old behaviour which was changed by: - - commit c6c6a08850c7e4ee211696895f7ca3864be85052 - Author: Harald Hoyer - Date: Tue Feb 7 18:26:30 2012 +0100 - - add "install_items" to dracut.conf - -Reported-by: Dave Young -Signed-off-by: Cong Wang -Cc: Harald Hoyer ---- - dracut.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/dracut.sh b/dracut.sh -index 315b965..bf9e79f 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -770,7 +770,7 @@ done - - if [[ $kernel_only != yes ]]; then - for item in $install_items; do -- dracut_install -o "$item" -+ dracut_install "$item" - done - unset item - diff --git a/0065-dracut-fstab-sys-Wait-for-devices-specified-using-mo.patch b/0065-dracut-fstab-sys-Wait-for-devices-specified-using-mo.patch deleted file mode 100644 index 65a663c..0000000 --- a/0065-dracut-fstab-sys-Wait-for-devices-specified-using-mo.patch +++ /dev/null @@ -1,70 +0,0 @@ -From 8be5a0fa945d130ef8ebb464ebbe1a865949353d Mon Sep 17 00:00:00 2001 -From: Vivek Goyal -Date: Tue, 15 May 2012 13:36:11 -0400 -Subject: [PATCH] dracut:fstab-sys: Wait for devices specified using --mount - option - -dracut allows passing --mount option which mounts the specified devices. -But it does not wait for these devices to show up and mounting will fail -if devices do not show up by the time "mount" was called. - -I am writing some patches to support kdump on iscsi target and I noticed -that one of the initqueue script was not called as we found the root -device and broke out of main loop. - -There are two possible enancements to this patch. - -- Introduce a time limited wait (rd.timeout something along the lines of - rd.retry). That will allow kdump to try to dump to a backup target if - primary targets fails to come up. - -- Wait for UUID= and LABEL= to show up too. Right now kdump converts - UUID= and LABEL= to respective devices and passes /dev/* to dracut - --mount option. So I am not introducing the wait for UUID= or LABEL= - in this patch. - -Signed-off-by: Vivek Goyal ---- - modules.d/95fstab-sys/module-setup.sh | 1 + - modules.d/95fstab-sys/wait-mount-dev.sh | 22 ++++++++++++++++++++++ - 2 files changed, 23 insertions(+) - create mode 100644 modules.d/95fstab-sys/wait-mount-dev.sh - -diff --git a/modules.d/95fstab-sys/module-setup.sh b/modules.d/95fstab-sys/module-setup.sh -index 7589d74..56dd8fc 100755 ---- a/modules.d/95fstab-sys/module-setup.sh -+++ b/modules.d/95fstab-sys/module-setup.sh -@@ -13,4 +13,5 @@ depends() { - install() { - [ -f /etc/fstab.sys ] && inst /etc/fstab.sys - inst_hook pre-pivot 00 "$moddir/mount-sys.sh" -+ inst_hook cmdline 00 "$moddir/wait-mount-dev.sh" - } -diff --git a/modules.d/95fstab-sys/wait-mount-dev.sh b/modules.d/95fstab-sys/wait-mount-dev.sh -new file mode 100644 -index 0000000..99fc16c ---- /dev/null -+++ b/modules.d/95fstab-sys/wait-mount-dev.sh -@@ -0,0 +1,22 @@ -+#!/bin/sh -+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- -+# ex: ts=8 sw=4 sts=4 et filetype=sh -+ -+type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh -+type det_fs >/dev/null 2>&1 || . /lib/fs-lib.sh -+ -+fstab_wait_dev() { -+ local _dev _mp _fs _opts _dump _pass _rest -+ test -e "$1" || return 1 -+ while read _dev _mp _fs _opts _dump _pass _rest; do -+ [ -z "${_dev%%#*}" ] && continue # Skip comment lines -+ case "$_dev" in -+ /dev/?*) -+ wait_for_dev $_dev;; -+ *) ;; -+ esac -+ done < $1 -+ return 0 -+} -+ -+[ -f /etc/fstab ] && fstab_wait_dev /etc/fstab diff --git a/0066-TEST-01-BASIC-sync-after-creating-the-root-disk.patch b/0066-TEST-01-BASIC-sync-after-creating-the-root-disk.patch deleted file mode 100644 index 710c34d..0000000 --- a/0066-TEST-01-BASIC-sync-after-creating-the-root-disk.patch +++ /dev/null @@ -1,34 +0,0 @@ -From cfe32ef5ba0be76fecd024b702997d1f46d45e2d Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 16 May 2012 11:51:26 +0200 -Subject: [PATCH] TEST-01-BASIC: sync after creating the root disk - ---- - test/TEST-01-BASIC/create-root.sh | 1 + - test/TEST-01-BASIC/test.sh | 2 +- - 2 files changed, 2 insertions(+), 1 deletion(-) - -diff --git a/test/TEST-01-BASIC/create-root.sh b/test/TEST-01-BASIC/create-root.sh -index 0e91ab5..046bfb9 100755 ---- a/test/TEST-01-BASIC/create-root.sh -+++ b/test/TEST-01-BASIC/create-root.sh -@@ -19,5 +19,6 @@ cp -a -t /root /source/* - mkdir -p /root/run - umount /root - echo "dracut-root-block-created" >/dev/sda1 -+sync - poweroff -f - -diff --git a/test/TEST-01-BASIC/test.sh b/test/TEST-01-BASIC/test.sh -index 36d2693..46e75c7 100755 ---- a/test/TEST-01-BASIC/test.sh -+++ b/test/TEST-01-BASIC/test.sh -@@ -48,7 +48,7 @@ test_setup() { - ( - initdir=$TESTDIR/overlay - . $basedir/dracut-functions.sh -- dracut_install sfdisk mkfs.ext3 poweroff cp umount -+ dracut_install sfdisk mkfs.ext3 poweroff cp umount sync - inst_hook initqueue 01 ./create-root.sh - inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules - ) diff --git a/0067-add-option-printsize.patch b/0067-add-option-printsize.patch deleted file mode 100644 index 59b058d..0000000 --- a/0067-add-option-printsize.patch +++ /dev/null @@ -1,55 +0,0 @@ -From ec3c59518d9341b6aa2f59ca2eabbe78274efd23 Mon Sep 17 00:00:00 2001 -From: Dave Young -Date: Mon, 21 May 2012 16:37:06 +0800 -Subject: [PATCH] add option --printsize - -Add --printsize for measuring module installed size to initramfs - -Signed-off-by: Dave Young ---- - dracut.sh | 11 +++++++++++ - 1 file changed, 11 insertions(+) - -diff --git a/dracut.sh b/dracut.sh -index bf9e79f..c5151d7 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -123,6 +123,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 -+ --printsize Print out the module install size - --sshkey [SSHKEY] Add ssh key to initramfs (use with ssh-client module) - - If [LIST] has multiple arguments, then you have to put these in quotes. -@@ -268,6 +269,7 @@ while (($# > 0)); do - show_modules_l="yes" - ;; - --keep) keep="yes";; -+ --printsize) printsize="yes";; - -*) printf "\nUnknown option: %s\n\n" "$1" >&2; usage; exit 1;; - *) - if ! [[ ${outfile+x} ]]; then -@@ -700,6 +702,7 @@ mods_to_load="" - for_each_module_dir check_module - for_each_module_dir check_mount - -+_isize=0 #initramfs size - modules_loaded=" " - # source our modules. - for moddir in "$dracutbasedir/modules.d"/[0-9][0-9]*; do -@@ -723,6 +726,14 @@ for moddir in "$dracutbasedir/modules.d"/[0-9][0-9]*; do - fi - mods_to_load=${mods_to_load// $_d_mod /} - modules_loaded+="$_d_mod " -+ -+ #print the module install size -+ if [ -n "$printsize" ]; then -+ _isize_new=$(du -sk ${initdir}|cut -f1) -+ _isize_delta=$(($_isize_new - $_isize)) -+ echo "$_d_mod install size: ${_isize_delta}k" -+ _isize=$_isize_new -+ fi - fi - done - unset moddir diff --git a/0068-check-ifenslave-instead-of-brctl-in-parse-bond.sh.patch b/0068-check-ifenslave-instead-of-brctl-in-parse-bond.sh.patch deleted file mode 100644 index 2b51508..0000000 --- a/0068-check-ifenslave-instead-of-brctl-in-parse-bond.sh.patch +++ /dev/null @@ -1,26 +0,0 @@ -From ffc5bf686da7db9d26dd19b43fc8a17d83bcc4d7 Mon Sep 17 00:00:00 2001 -From: WANG Cong -Date: Fri, 18 May 2012 13:38:17 +0800 -Subject: [PATCH] check ifenslave instead of brctl in parse-bond.sh - -This is obviously wrong, ifenslave instead of brctl is needed for bonding. - -Cc: Harald Hoyer -Signed-off-by: WANG Cong ---- - modules.d/40network/parse-bond.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/40network/parse-bond.sh b/modules.d/40network/parse-bond.sh -index 0a4c006..ae0ae97 100755 ---- a/modules.d/40network/parse-bond.sh -+++ b/modules.d/40network/parse-bond.sh -@@ -18,7 +18,7 @@ if getarg bond= >/dev/null ; then - if [ -z "$netroot" ] ; then - die "No netboot configured, bond is invalid" - fi -- command -v brctl >/dev/null 2>&1 || die "No 'brctl' installed" -+ command -v ifenslave >/dev/null 2>&1 || die "No 'ifenslave' installed" - fi - - # We translate list of slaves to space-separated here to mwke it easier to loop over them in ifup diff --git a/0069-ARM-make-sure-that-we-get-the-storage-modules-into-t.patch b/0069-ARM-make-sure-that-we-get-the-storage-modules-into-t.patch deleted file mode 100644 index 9026e5c..0000000 --- a/0069-ARM-make-sure-that-we-get-the-storage-modules-into-t.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 59aa65c9b26ad5cd8839a52a886723324227e5bc Mon Sep 17 00:00:00 2001 -From: Dennis Gilmore -Date: Thu, 17 May 2012 01:33:17 -0500 -Subject: [PATCH] ARM: make sure that we get the storage modules into the - initramfs - ---- - modules.d/90kernel-modules/module-setup.sh | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh -index b91785e..f4832c4 100755 ---- a/modules.d/90kernel-modules/module-setup.sh -+++ b/modules.d/90kernel-modules/module-setup.sh -@@ -35,6 +35,9 @@ installkernel() { - hostonly='' instmods pcmcia firewire-ohci - hostonly='' instmods usb_storage sdhci sdhci-pci - -+ # arm specific modules -+ hostonly='' instmods sdhci_esdhc_imx mmci sdhci_tegra mvsdio omap sdhci_dove ahci_platform pata_imx sata_mv -+ - # install keyboard support - hostonly='' instmods atkbd i8042 usbhid hid-apple hid-sunplus hid-cherry hid-logitech hid-logitech-dj hid-microsoft ehci-hcd ohci-hcd uhci-hcd xhci-hcd - # install unix socket support diff --git a/0070-Use-the-right-argument-for-dasd-module-options.patch b/0070-Use-the-right-argument-for-dasd-module-options.patch deleted file mode 100644 index 96f5747..0000000 --- a/0070-Use-the-right-argument-for-dasd-module-options.patch +++ /dev/null @@ -1,42 +0,0 @@ -From d69514332910847f57c63c636103bb6f757a44a6 Mon Sep 17 00:00:00 2001 -From: Jesse Keating -Date: Tue, 15 May 2012 13:42:47 -0700 -Subject: [PATCH] Use the right argument for dasd module options - -The legacy argument is DASD=, and the new arguments should be the same -as the arguments for populating dasd.conf. If multiple arguments are -passed we can stack them by inserting a ',' between them. ---- - modules.d/95dasd_mod/parse-dasd-mod.sh | 18 +++++++++++++----- - 1 file changed, 13 insertions(+), 5 deletions(-) - -diff --git a/modules.d/95dasd_mod/parse-dasd-mod.sh b/modules.d/95dasd_mod/parse-dasd-mod.sh -index b550156..d7e8664 100755 ---- a/modules.d/95dasd_mod/parse-dasd-mod.sh -+++ b/modules.d/95dasd_mod/parse-dasd-mod.sh -@@ -1,12 +1,20 @@ - #!/bin/sh - # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- - # ex: ts=8 sw=4 sts=4 et filetype=sh --[ -d /etc/modprobe.d ] || mkdir -m 0755 -p /etc/modprobe.d -+mod_args="" -+for dasd_arg in $(getargs rd.dasd= rd_DASD= DASD=); do -+ if [ -z $mod_args ]; then -+ mod_args="$dasd_arg" -+ else -+ # We've already got some thing in mod_args, add to it -+ mod_args="$mod_args,$dasd_arg" -+ fi -+done - --dasd_arg=$(getarg rd.dasd_mod.dasd rd_DASD_MOD=) --if [ -n "$dasd_arg" ]; then -- echo "options dasd_mod dasd=$dasd_arg" >> /etc/modprobe.d/dasd_mod.conf -+if [ ! -z $mod_args ]; then -+ [ -d /etc/modprobe.d ] || mkdir -m 0755 -p /etc/modprobe.d -+ echo "options dasd_mod dasd=$mod_args" >> /etc/modprobe.d/dasd_mod.conf - fi --unset dasd_arg - -+unset dasd_arg - dasd_cio_free diff --git a/0071-Translate-dasd-arg-contents-into-proper-dasd.conf.patch b/0071-Translate-dasd-arg-contents-into-proper-dasd.conf.patch deleted file mode 100644 index c676f3b..0000000 --- a/0071-Translate-dasd-arg-contents-into-proper-dasd.conf.patch +++ /dev/null @@ -1,43 +0,0 @@ -From b0772db56a532e19379ddd4369f3668d3192908c Mon Sep 17 00:00:00 2001 -From: Jesse Keating -Date: Fri, 18 May 2012 14:06:54 -0700 -Subject: [PATCH] Translate dasd arg contents into proper dasd.conf - -This uses a (new) s390utils utility to normalize the range we might get -in a dasd argument and generates a properly formatted output for -dasd.conf. ---- - modules.d/95dasd/module-setup.sh | 2 +- - modules.d/95dasd/parse-dasd.sh | 4 ++-- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/modules.d/95dasd/module-setup.sh b/modules.d/95dasd/module-setup.sh -index 88dfc6d..74efc7b 100755 ---- a/modules.d/95dasd/module-setup.sh -+++ b/modules.d/95dasd/module-setup.sh -@@ -18,7 +18,7 @@ installkernel() { - - install() { - inst_hook cmdline 30 "$moddir/parse-dasd.sh" -- dracut_install tr dasdinfo dasdconf.sh -+ dracut_install tr dasdinfo dasdconf.sh normalize_dasd_arg - if [[ $hostonly ]]; then - inst /etc/dasd.conf - fi -diff --git a/modules.d/95dasd/parse-dasd.sh b/modules.d/95dasd/parse-dasd.sh -index 4aeecd5..b3d18fa 100755 ---- a/modules.d/95dasd/parse-dasd.sh -+++ b/modules.d/95dasd/parse-dasd.sh -@@ -1,10 +1,10 @@ - #!/bin/sh - # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- - # ex: ts=8 sw=4 sts=4 et filetype=sh --for dasd_arg in $(getargs rd.dasd 'rd_DASD='); do -+for dasd_arg in $(getargs rd.dasd= rd_DASD= DASD=); do - ( - IFS="," - set $dasd_arg -- echo "$@" >> /etc/dasd.conf -+ echo "$@" | normalize_dasd_arg >> /etc/dasd.conf - ) - done diff --git a/0072-Normalize-dasd-argument-content-for-dasd.conf.patch b/0072-Normalize-dasd-argument-content-for-dasd.conf.patch deleted file mode 100644 index cc45d5f..0000000 --- a/0072-Normalize-dasd-argument-content-for-dasd.conf.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 965d14726abc7506e046f86dbf53a8644439e25b Mon Sep 17 00:00:00 2001 -From: Jesse Keating -Date: Fri, 18 May 2012 14:50:20 -0700 -Subject: [PATCH] Normalize dasd argument content for dasd.conf - -Also overwrite any existing files, contents from CMSCONFFILE override -any boot arguments. ---- - modules.d/80cms/cmssetup.sh | 4 ++-- - modules.d/80cms/module-setup.sh | 2 +- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/modules.d/80cms/cmssetup.sh b/modules.d/80cms/cmssetup.sh -index 6aa456c..995bfa7 100755 ---- a/modules.d/80cms/cmssetup.sh -+++ b/modules.d/80cms/cmssetup.sh -@@ -169,8 +169,8 @@ processcmsfile() - fi - - if [[ $DASD ]]; then -- echo $DASD >> /etc/dasd.conf -- echo "options dasd_mod dasd=$DASD" >> /etc/modprobe.d/dasd_mod.conf -+ echo $DASD | normalize_dasd_arg > /etc/dasd.conf -+ echo "options dasd_mod dasd=$DASD" > /etc/modprobe.d/dasd_mod.conf - dasd_cio_free - fi - -diff --git a/modules.d/80cms/module-setup.sh b/modules.d/80cms/module-setup.sh -index 5cce1b4..15dce89 100755 ---- a/modules.d/80cms/module-setup.sh -+++ b/modules.d/80cms/module-setup.sh -@@ -34,5 +34,5 @@ install() { - inst_libdir_file "gconv/*" - #inst /usr/lib/locale/locale-archive - -- dracut_install cmsfs-fuse fusermount ulockmgr_server bash tr insmod rmmod cat -+ dracut_install cmsfs-fuse fusermount ulockmgr_server bash tr insmod rmmod cat normalize_dasd_arg - } diff --git a/0073-ifcfg-write-ifcfg.sh-fixed-IFS-resetting.patch b/0073-ifcfg-write-ifcfg.sh-fixed-IFS-resetting.patch deleted file mode 100644 index 7a2adad..0000000 --- a/0073-ifcfg-write-ifcfg.sh-fixed-IFS-resetting.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 02805bd1fc74648e38fccecdfdc5896db47179c4 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Tue, 22 May 2012 11:36:41 +0200 -Subject: [PATCH] ifcfg/write-ifcfg.sh: fixed IFS resetting - ---- - modules.d/45ifcfg/write-ifcfg.sh | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh -index d1f6fe6..2b7cb5c 100755 ---- a/modules.d/45ifcfg/write-ifcfg.sh -+++ b/modules.d/45ifcfg/write-ifcfg.sh -@@ -43,6 +43,7 @@ print_s390() { - local CONFIG_LINE - local i - local channel -+ local OLD_IFS - - _netif="$1" - # if we find ccw channel, then use those, instead of -@@ -62,9 +63,10 @@ print_s390() { - - [ $? -ne 0 -o -z "$CONFIG_LINE" ] && return - -+ OLD_IFS=$IFS - IFS="," -- set $CONFIG_LINE -- IFS="$OLD_IFS" -+ set -- $CONFIG_LINE -+ IFS=$OLD_IFS - NETTYPE=$1 - shift - SUBCHANNELS="$1" diff --git a/dracut.spec b/dracut.spec index ca1e7e7..8b60a1f 100644 --- a/dracut.spec +++ b/dracut.spec @@ -9,8 +9,8 @@ %endif Name: dracut -Version: 018 -Release: 74.git20120522%{?dist} +Version: 019 +Release: 1%{?dist} Summary: Initramfs generator using udev %if 0%{?fedora} || 0%{?rhel} @@ -24,79 +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-lib-add-str_ends-to-go-along-with-str_starts.patch -Patch2: 0002-run-setup_net-at-start-of-initqueue-online-hook.patch -Patch3: 0003-network-add-save_netinfo-fix-problems-with-nfs-NM-ta.patch -Patch4: 0004-Make-splitsep-work-as-documented-with-less-vars-than.patch -Patch5: 0005-shutdown-use-emergency_shell-from-dracut-lib.patch -Patch6: 0006-rootfs-block-avoid-remount-when-options-don-t-change.patch -Patch7: 0007-Debian-multiarch-support.patch -Patch8: 0008-dracut.sh-log-installed-modules-to-initdir-lib-dracu.patch -Patch9: 0009-lvm-disable-lvmetad.patch -Patch10: 0010-udev-rules-remove-01-ignore.rules.patch -Patch11: 0011-lsinitrd-support-symlinks.patch -Patch12: 0012-dracut.cmdline.7.asc-document-resume-option.patch -Patch13: 0013-virtfs-root-filesystem-support.patch -Patch14: 0014-dracut.spec-do-not-include-IMA-and-selinux-modules-w.patch -Patch15: 0015-Do-not-run-plymouth-hook-if-the-binary-is-missing.patch -Patch16: 0016-man-Fix-add-fstab-option-in-man-page.patch -Patch17: 0017-udevd-moved-to-lib-systemd-systemd-udevd.patch -Patch18: 0018-base-init.sh-mount-tmpfs-with-strictatime.patch -Patch19: 0019-99shutdown-shutdown.sh-export-PATH.patch -Patch20: 0020-Makefile-do-not-install-systemd-service-in-reboot.patch -Patch21: 0021-network-module-setup.sh-include-all-kernel-drivers-n.patch -Patch22: 0022-add-pre-pivot-cleanup-hook.patch -Patch23: 0023-move-cleanup-scripts-to-pre-pivot-cleanup-hook.patch -Patch24: 0024-network-parse-ip-opts.sh-remove-check-for-netroot.patch -Patch25: 0025-url-lib-don-t-add-existing-handlers-multiple-times.patch -Patch26: 0026-url-lib-don-t-use-progress-bar-if-TERM-dumb-RHBZ-814.patch -Patch27: 0027-base-add-debug_on-and-debug_off-functions.patch -Patch28: 0028-base-add-export_n-function.patch -Patch29: 0029-base-dracut-lib.sh-add-arguments-for-source_hook-and.patch -Patch30: 0030-merge-cleanup-and-pre-pivot-cleanup-hooks.patch -Patch31: 0031-network-fix-ifup-and-netroot-calling.patch -Patch32: 0032-ifcfg-write-DNS1-.-for-nameserver-args-RHBZ-815369.patch -Patch33: 0033-iscsi-module-setup.sh-fix-host-only-mount-checks.patch -Patch34: 0034-multipath-module-setup.sh-fix-host-only-mount-checks.patch -Patch35: 0035-udev-rules-module-setup.sh-fixed-udevd-location.patch -Patch36: 0036-TEST-15-BTRFSRAID-add-one-more-partition-to-the-btrf.patch -Patch37: 0037-fix-_getcmdline-arg-duplicating-bug-with-etc-cmdline.patch -Patch38: 0038-ifcfg-fix-resolv.conf.patch -Patch39: 0039-TODO-update.patch -Patch40: 0040-removed-old-udev-vol_id.patch -Patch41: 0041-plymouth-plymouth-pretrigger.sh-check-for-tty-dev-ex.patch -Patch42: 0042-dracut.spec-require-file.patch -Patch43: 0043-test-TEST-01-BASIC-test.sh-fix-cleanup-of-overlay-di.patch -Patch44: 0044-plymouth-plymouth-pretrigger.sh-get-consoledev-from-.patch -Patch45: 0045-base-init.sh-set-DRACUT_QUIET-only-in-dracut-lib.sh.patch -Patch46: 0046-base-dracut-lib.sh-export-UDEVVERSION.patch -Patch47: 0047-dracut.sh-install-var-run-and-var-lock.patch -Patch48: 0048-rootfs-block-block-genrules.sh-install-systemd-mount.patch -Patch49: 0049-add-systemd-module.patch -Patch50: 0050-ifcfg-write-ifcfg.sh-use-PREFIX-for-prefix-netmask-f.patch -Patch51: 0051-dracut.spec-add-98systemd-module.patch -Patch52: 0052-Fail-to-boot-if-mediacheck-fails-817419.patch -Patch53: 0053-Makefile-call-git2spec.pl-with-LANG-C.patch -Patch54: 0054-ifcfg-write-ifcfg.sh-add-s390-specific-configuration.patch -Patch55: 0055-systemd-adapt-to-new-switch-root-mechanism.patch -Patch56: 0056-base-module-setup.sh-link-proc-self-mounts-to-initdi.patch -Patch57: 0057-systemd-dracut-pre-pivot.sh-s-udevd.service-systemd-.patch -Patch58: 0058-systemd-switch-root.target-run-target-before-switch-.patch -Patch59: 0059-systemd-switch-root.service-do-not-require-shutdown-.patch -Patch60: 0060-systemd-store-switch-root.conf-in-run-initramfs.patch -Patch61: 0061-Makefile-install-dracut-service-files-from-systemd-d.patch -Patch62: 0062-90kernel-modules-module-setup.sh-install-xhci-hcd.patch -Patch63: 0063-check-kernel-module-existance.patch -Patch64: 0064-check-install-files-passed-by-cmdline.patch -Patch65: 0065-dracut-fstab-sys-Wait-for-devices-specified-using-mo.patch -Patch66: 0066-TEST-01-BASIC-sync-after-creating-the-root-disk.patch -Patch67: 0067-add-option-printsize.patch -Patch68: 0068-check-ifenslave-instead-of-brctl-in-parse-bond.sh.patch -Patch69: 0069-ARM-make-sure-that-we-get-the-storage-modules-into-t.patch -Patch70: 0070-Use-the-right-argument-for-dasd-module-options.patch -Patch71: 0071-Translate-dasd-arg-contents-into-proper-dasd.conf.patch -Patch72: 0072-Normalize-dasd-argument-content-for-dasd.conf.patch -Patch73: 0073-ifcfg-write-ifcfg.sh-fixed-IFS-resetting.patch BuildArch: noarch @@ -252,7 +179,7 @@ make install DESTDIR=$RPM_BUILD_ROOT \ %endif sysconfdir=/etc mandir=%{_mandir} -echo %{name}-%{version}-%{release} > $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/10rpmversion/dracut-version +echo "DRACUT_VERSION=%{version}-%{release}" > $RPM_BUILD_ROOT/%{dracutlibdir}/dracut-version.sh %if 0%{?fedora} == 0 && 0%{?rhel} == 0 rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/01fips @@ -314,6 +241,7 @@ rm -rf $RPM_BUILD_ROOT %dir %{dracutlibdir}/modules.d %{dracutlibdir}/dracut-functions.sh %{dracutlibdir}/dracut-functions +%{dracutlibdir}/dracut-version.sh %{dracutlibdir}/dracut-logger.sh %{dracutlibdir}/dracut-initramfs-restore %config(noreplace) /etc/dracut.conf @@ -329,7 +257,6 @@ rm -rf $RPM_BUILD_ROOT %{dracutlibdir}/modules.d/00dash %{dracutlibdir}/modules.d/05busybox %{dracutlibdir}/modules.d/10i18n -%{dracutlibdir}/modules.d/10rpmversion %{dracutlibdir}/modules.d/30convertfs %{dracutlibdir}/modules.d/45url-lib %{dracutlibdir}/modules.d/50plymouth @@ -416,6 +343,9 @@ rm -rf $RPM_BUILD_ROOT %dir /var/lib/dracut/overlay %changelog +* Mon Jun 04 2012 Harald Hoyer 019-1 +- version 019-1 + * Tue May 22 2012 Harald Hoyer 018-74.git20120522 - new upstream version diff --git a/sources b/sources index c2cf51b..0675e17 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -cbd88a03bb423be06a0b10ece10a7e1c dracut-018.tar.bz2 +826f6a475e36faec875db3bfe2e446c3 dracut-019.tar.bz2