-diff -urpa dracut-048.orig/dracut-logger.sh dracut-048/dracut-logger.sh
---- dracut-048.orig/dracut-logger.sh 2018-07-06 08:37:51.000000000 +0000
-+++ dracut-048/dracut-logger.sh 2018-07-21 21:00:11.629092688 +0000
-@@ -144,16 +144,7 @@ dlog_init() {
+diff -urpa dracut-056.orig/dracut-init.sh dracut-056/dracut-init.sh
+--- dracut-056.orig/dracut-init.sh 2022-02-18 12:32:53.000000000 +0100
++++ dracut-056/dracut-init.sh 2022-08-30 01:20:04.811493149 +0200
+@@ -1089,16 +1089,6 @@ fi
+ is_qemu_virtualized() {
+ # 0 if a virt environment was detected
+ # 1 if a virt environment could not be detected
+- # 255 if any error was encountered
+- if type -P systemd-detect-virt > /dev/null 2>&1; then
+- if ! vm=$(systemd-detect-virt --vm > /dev/null 2>&1); then
+- return 255
+- fi
+- [[ $vm == "qemu" ]] && return 0
+- [[ $vm == "kvm" ]] && return 0
+- [[ $vm == "bochs" ]] && return 0
+- fi
+-
+ for i in /sys/class/dmi/id/*_vendor; do
+ [[ -f $i ]] || continue
+ read -r vendor < "$i"
+diff -urpa dracut-056.orig/dracut-logger.sh dracut-056/dracut-logger.sh
+--- dracut-056.orig/dracut-logger.sh 2022-02-18 12:32:53.000000000 +0100
++++ dracut-056/dracut-logger.sh 2022-08-30 01:41:07.943471592 +0200
+@@ -142,16 +142,7 @@ dlog_init() {
fi
- if (( $sysloglvl > 0 )); then
+ if ((sysloglvl > 0)); then
- if [[ -d /run/systemd/journal ]] \
-- && type -P systemd-cat &>/dev/null \
-- && systemctl --quiet is-active systemd-journald.socket &>/dev/null \
-- && { echo "dracut-$DRACUT_VERSION" | systemd-cat -t 'dracut' &>/dev/null; } ; then
+- && type -P systemd-cat &> /dev/null \
+- && systemctl --quiet is-active systemd-journald.socket &> /dev/null \
+- && { echo "dracut-$DRACUT_VERSION" | systemd-cat -t 'dracut' &> /dev/null; }; then
- readonly _systemdcatfile="$DRACUT_TMPDIR/systemd-cat"
- mkfifo "$_systemdcatfile"
- readonly _dlogfd=15
-- systemd-cat -t 'dracut' --level-prefix=true <"$_systemdcatfile" &
-- exec 15>"$_systemdcatfile"
-- elif ! [ -S /dev/log -a -w /dev/log ] || ! command -v logger >/dev/null; then
-+ if ! [ -S /dev/log -a -w /dev/log ] || ! command -v logger >/dev/null; then
+- systemd-cat -t 'dracut' --level-prefix=true < "$_systemdcatfile" &
+- exec 15> "$_systemdcatfile"
+- elif ! [[ -S /dev/log ]] && [[ -w /dev/log ]] || ! command -v logger > /dev/null; then
++ if ! [[ -S /dev/log ]] && [[ -w /dev/log ]] || ! command -v logger > /dev/null; then
# We cannot log to syslog, so turn this facility off.
kmsgloglvl=$sysloglvl
sysloglvl=0
-diff -urpa dracut-048.orig/dracut.sh dracut-048/dracut.sh
---- dracut-048.orig/dracut.sh 2018-07-21 20:59:45.490094246 +0000
-+++ dracut-048/dracut.sh 2018-07-21 21:00:11.630092687 +0000
-@@ -1077,8 +1077,7 @@ if [[ ! $print_cmdline ]]; then
-
- if ! [[ -s $uefi_stub ]]; then
- for uefi_stub in \
-- "${systemdutildir}/boot/efi/linux${EFI_MACHINE_TYPE_NAME}.efi.stub" \
-- "/usr/lib/gummiboot/linux${EFI_MACHINE_TYPE_NAME}.efi.stub"; do
-+ "/usr/lib/gummiboot/linux${EFI_MACHINE_TYPE_NAME}.efi.stub"; do
- [[ -s $uefi_stub ]] || continue
- break
- done
-@@ -1319,32 +1318,6 @@ if ! [[ -d "$udevdir" ]]; then
- [[ -e /usr/lib/udev/collect ]] && udevdir=/usr/lib/udev
+diff -urpa dracut-056.orig/dracut.sh dracut-056/dracut.sh
+--- dracut-056.orig/dracut.sh 2022-08-28 17:26:54.017178064 +0200
++++ dracut-056/dracut.sh 2022-08-30 01:40:33.614418115 +0200
+@@ -1186,13 +1186,6 @@ if [[ -f $dracutbasedir/dracut-version.s
+ . "$dracutbasedir"/dracut-version.sh
fi
--[[ -d $systemdutildir ]] \
-- || systemdutildir=$(pkg-config systemd --variable=systemdutildir 2>/dev/null)
+-if systemd-detect-virt -c &> /dev/null; then
+- export DRACUT_NO_MKNOD=1 DRACUT_NO_XATTR=1
+- if [[ $hostonly ]]; then
+- printf "%s\n" "dracut: WARNING: running in hostonly mode in a container!!"
+- fi
+-fi
+-
+ if [[ -f $dracutbasedir/dracut-init.sh ]]; then
+ # shellcheck source=./dracut-init.sh
+ . "$dracutbasedir"/dracut-init.sh
+@@ -1284,19 +1277,6 @@ esac
+
+ abs_outfile=$(readlink -f "$outfile") && outfile="$abs_outfile"
+
+-[[ -d $dracutsysrootdir$systemdutildir ]] \
+- || systemdutildir=$(pkg-config systemd --variable=systemdutildir 2> /dev/null)
-
--if ! [[ -d "$systemdutildir" ]]; then
-- [[ -e /lib/systemd/systemd-udevd ]] && systemdutildir=/lib/systemd
-- [[ -e /usr/lib/systemd/systemd-udevd ]] && systemdutildir=/usr/lib/systemd
+-if ! [[ -d $dracutsysrootdir$systemdutildir ]]; then
+- [[ -e $dracutsysrootdir/lib/systemd/systemd-udevd ]] && systemdutildir=/lib/systemd
+- [[ -e $dracutsysrootdir/usr/lib/systemd/systemd-udevd ]] && systemdutildir=/usr/lib/systemd
-fi
-
--[[ -d $systemdsystemunitdir ]] \
-- || systemdsystemunitdir=$(pkg-config systemd --variable=systemdsystemunitdir 2>/dev/null)
+-[[ -d $dracutsysrootdir$systemdutilconfdir ]] \
+- || systemdutilconfdir=$(pkg-config systemd --variable=systemdutilconfdir 2> /dev/null)
+-
+-[[ -d $dracutsysrootdir$systemdutilconfdir ]] || systemdutilconfdir=/etc/systemd
+-
+ if [[ $no_kernel != yes ]] && [[ -d $srcmods ]]; then
+ if ! [[ -f $srcmods/modules.dep ]]; then
+ if [[ -n "$(find "$srcmods" -name '*.ko*')" ]]; then
+@@ -1356,10 +1336,6 @@ if [[ ! $print_cmdline ]]; then
+ esac
+
+ if ! [[ -s $uefi_stub ]]; then
+- uefi_stub="$dracutsysrootdir${systemdutildir}/boot/efi/linux${EFI_MACHINE_TYPE_NAME}.efi.stub"
+- fi
+-
+- if ! [[ -s $uefi_stub ]]; then
+ dfatal "Can't find a uefi stub '$uefi_stub' to create a UEFI executable"
+ exit 1
+ fi
+@@ -1597,66 +1573,6 @@ for dev in "${!host_fs_types[@]}"; do
+ fi
+ done
+
+-[[ -d $dracutsysrootdir$dbus ]] \
+- || dbus=$(pkg-config dbus --variable=dbus 2> /dev/null)
+-
+-[[ -d $dracutsysrootdir$dbus ]] || dbus=/usr/share/dbus-1
+-
+-[[ -d $dracutsysrootdir$dbusconfdir ]] \
+- || dbusconfdir=$(pkg-config dbus --variable=dbusconfdir 2> /dev/null)
+-
+-[[ -d $dracutsysrootdir$dbusconfdir ]] || dbusconfdir=/etc/dbus-1
+-
+-[[ -d $dracutsysrootdir$dbusinterfaces ]] \
+- || dbusinterfaces=$(pkg-config dbus --variable=dbusinterfaces 2> /dev/null)
-
--[[ -d "$systemdsystemunitdir" ]] || systemdsystemunitdir=${systemdutildir}/system
+-[[ -d $dracutsysrootdir$dbusinterfaces ]] || dbusinterfaces=${dbus}/interfaces
-
--[[ -d $systemdsystemconfdir ]] \
-- || systemdsystemconfdir=$(pkg-config systemd --variable=systemdsystemconfdir 2>/dev/null)
+-[[ -d $dracutsysrootdir$dbusinterfacesconfdir ]] \
+- || dbusinterfacesconfdir=$(pkg-config dbus --variable=dbusinterfacesconfdir 2> /dev/null)
-
--[[ -d "$systemdsystemconfdir" ]] || systemdsystemconfdir=/etc/systemd/system
+-[[ -d $dracutsysrootdir$dbusinterfacesconfdir ]] || dbusinterfacesconfdir=${dbusconfdir}/interfaces
-
--[[ -d $tmpfilesdir ]] \
-- || tmpfilesdir=$(pkg-config systemd --variable=tmpfilesdir 2>/dev/null)
+-[[ -d $dracutsysrootdir$dbusservices ]] \
+- || dbusservices=$(pkg-config dbus --variable=dbusservices 2> /dev/null)
+-
+-[[ -d $dracutsysrootdir$dbusservices ]] || dbusservices=${dbus}/services
+-
+-[[ -d $dracutsysrootdir$dbusservicesconfdir ]] \
+- || dbusservicesconfdir=$(pkg-config dbus --variable=dbusservicesconfdir 2> /dev/null)
+-
+-[[ -d $dracutsysrootdir$dbusservicesconfdir ]] || dbusservicesconfdir=${dbusconfdir}/services
+-
+-[[ -d $dracutsysrootdir$dbussession ]] \
+- || dbussession=$(pkg-config dbus --variable=dbussession 2> /dev/null)
+-
+-[[ -d $dracutsysrootdir$dbussession ]] || dbussession=${dbus}/session.d
+-
+-[[ -d $dracutsysrootdir$dbussessionconfdir ]] \
+- || dbussessionconfdir=$(pkg-config dbus --variable=dbussessionconfdir 2> /dev/null)
+-
+-[[ -d $dracutsysrootdir$dbussessionconfdir ]] || dbussessionconfdir=${dbusconfdir}/session.d
+-
+-[[ -d $dracutsysrootdir$dbussystem ]] \
+- || dbussystem=$(pkg-config dbus --variable=dbussystem 2> /dev/null)
+-
+-[[ -d $dracutsysrootdir$dbussystem ]] || dbussystem=${dbus}/system.d
+-
+-[[ -d $dracutsysrootdir$dbussystemconfdir ]] \
+- || dbussystemconfdir=$(pkg-config dbus --variable=dbussystemconfdir 2> /dev/null)
+-
+-[[ -d $dracutsysrootdir$dbussystemconfdir ]] || dbussystemconfdir=${dbusconfdir}/system.d
+-
+-[[ -d $dracutsysrootdir$dbussystemservices ]] \
+- || dbussystemservices=$(pkg-config dbus --variable=dbussystemservices 2> /dev/null)
+-
+-[[ -d $dracutsysrootdir$dbussystemservices ]] || dbussystemservices=${dbus}/system-services
+-
+-[[ -d $dracutsysrootdir$dbussystemservicesconfdir ]] \
+- || dbussystemservicesconfdir=$(pkg-config dbus --variable=dbussystemservicesconfdir 2> /dev/null)
+-
+-[[ -d $dracutsysrootdir$dbussystemservicesconfdir ]] || dbussystemservicesconfdir=${dbusconfdir}/system-services
+-
+ [[ -d $dracutsysrootdir$udevdir ]] \
+ || udevdir="$(pkg-config udev --variable=udevdir 2> /dev/null)"
+ if ! [[ -d $dracutsysrootdir$udevdir ]]; then
+@@ -1679,114 +1595,22 @@ fi
+
+ [[ -d $dracutsysrootdir$udevrulesconfdir ]] || udevrulesconfdir=${udevconfdir}/rules.d
+
+-[[ -d $dracutsysrootdir$sysctld ]] \
+- || sysctld=$(pkg-config systemd --variable=sysctld 2> /dev/null)
+-
+ [[ -d $dracutsysrootdir$sysctld ]] || sysctld=/usr/lib/sysctl.d
+
+-[[ -d $dracutsysrootdir$sysctlconfdir ]] \
+- || sysctlconfdir=$(pkg-config systemd --variable=sysctlconfdir 2> /dev/null)
+-
+ [[ -d $dracutsysrootdir$sysctlconfdir ]] || sysctlconfdir=/etc/sysctl.d
+
+-[[ -d $dracutsysrootdir$environment ]] \
+- || environment=$(pkg-config systemd --variable=environment 2> /dev/null)
+-
+ [[ -d $dracutsysrootdir$environment ]] || environment=/usr/lib/environment.d
+
+-[[ -d $dracutsysrootdir$environmentconfdir ]] \
+- || environmentconfdir=$(pkg-config systemd --variable=environmentconfdir 2> /dev/null)
+-
+ [[ -d $dracutsysrootdir$environmentconfdir ]] || environmentconfdir=/etc/environment.d
+
+-[[ -d $dracutsysrootdir$systemdcatalog ]] \
+- || systemdcatalog=$(pkg-config systemd --variable=systemdcatalog 2> /dev/null)
-
--if ! [[ -d "$tmpfilesdir" ]]; then
-- [[ -d /lib/tmpfiles.d ]] && tmpfilesdir=/lib/tmpfiles.d
-- [[ -d /usr/lib/tmpfiles.d ]] && tmpfilesdir=/usr/lib/tmpfiles.d
+-[[ -d $dracutsysrootdir$systemdcatalog ]] || systemdcatalog=${systemdutildir}/catalog
+-
+-[[ -d $dracutsysrootdir$modulesload ]] \
+- || modulesload=$(pkg-config systemd --variable=modulesload 2> /dev/null)
+-
+ [[ -d $dracutsysrootdir$modulesload ]] || modulesload=/usr/lib/modules-load.d
+
+-[[ -d $dracutsysrootdir$modulesloadconfdir ]] \
+- || modulesloadconfdir=$(pkg-config systemd --variable=modulesloadconfdir 2> /dev/null)
+-
+ [[ -d $dracutsysrootdir$modulesloadconfdir ]] || modulesloadconfdir=/etc/modules-load.d
+
+-[[ -d $dracutsysrootdir$systemdnetwork ]] \
+- || systemdnetwork=$(pkg-config systemd --variable=systemdnetwork 2> /dev/null)
+-
+-[[ -d $dracutsysrootdir$systemdnetwork ]] || systemdnetwork=${systemdutildir}/network
+-
+-[[ -d $dracutsysrootdir$systemdnetworkconfdir ]] \
+- || systemdnetworkconfdir=$(pkg-config systemd --variable=systemdnetworkconfdir 2> /dev/null)
+-
+-[[ -d $dracutsysrootdir$systemdnetworkconfdir ]] || systemdnetworkconfdir=${systemdsystemconfdir}/network
+-
+-[[ -d $dracutsysrootdir$systemdntpunits ]] \
+- || systemdntpunits=$(pkg-config systemd --variable=systemdntpunits 2> /dev/null)
+-
+-[[ -d $dracutsysrootdir$systemdntpunits ]] || systemdntpunits=${systemdutildir}/ntp-units.d
+-
+-[[ -d $dracutsysrootdir$systemdntpunitsconfdir ]] \
+- || systemdntpunitsconfdir=$(pkg-config systemd --variable=systemdntpunitsconfdir 2> /dev/null)
+-
+-[[ -d $dracutsysrootdir$systemdntpunitsconfdir ]] || systemdntpunitsconfdir=${systemdsystemconfdir}/ntp-units.d
+-
+-[[ -d $dracutsysrootdir$systemdportable ]] \
+- || systemdportable=$(pkg-config systemd --variable=systemdportable 2> /dev/null)
+-
+-[[ -d $dracutsysrootdir$systemdportable ]] || systemdportable=${systemdutildir}/portable
+-
+-[[ -d $dracutsysrootdir$systemdportableconfdir ]] \
+- || systemdportableconfdir=$(pkg-config systemd --variable=systemdportableconfdir 2> /dev/null)
+-
+-[[ -d "$dracutsysrootdir$systemdportableconfdir" ]] || systemdportableconfdir=${systemdsystemconfdir}/portable
+-
+-[[ -d $dracutsysrootdir$systemdsystemunitdir ]] \
+- || systemdsystemunitdir=$(pkg-config systemd --variable=systemdsystemunitdir 2> /dev/null)
+-
+-[[ -d "$dracutsysrootdir$systemdsystemunitdir" ]] || systemdsystemunitdir=${systemdutildir}/system
+-
+-[[ -d $dracutsysrootdir$systemduser ]] \
+- || systemduser=$(pkg-config systemd --variable=systemduser 2> /dev/null)
+-
+-[[ -d $dracutsysrootdir$systemduser ]] || systemduser=${systemdutildir}/user
+-
+-[[ -d $dracutsysrootdir$systemduserconfdir ]] \
+- || systemduserconfdir=$(pkg-config systemd --variable=systemduserconfdir 2> /dev/null)
+-
+-[[ -d $dracutsysrootdir$systemduserconfdir ]] || systemduserconfdir=${systemdsystemconfdir}/user
+-
+-[[ -d $dracutsysrootdir$systemdsystemconfdir ]] \
+- || systemdsystemconfdir=$(pkg-config systemd --variable=systemdsystemconfdir 2> /dev/null)
+-
+-[[ -d $dracutsysrootdir$systemdsystemconfdir ]] || systemdsystemconfdir=/etc/systemd/system
+-
+-[[ -d $dracutsysrootdir$sysusers ]] \
+- || sysusers=$(pkg-config systemd --variable=sysusers 2> /dev/null)
+-
+ [[ -d $dracutsysrootdir$sysusers ]] || sysusers=/usr/lib/sysusers.d
+
+-[[ -d $dracutsysrootdir$sysusersconfdir ]] \
+- || sysusersconfdir=$(pkg-config systemd --variable=sysusersconfdir 2> /dev/null)
+-
+ [[ -d $dracutsysrootdir$sysusersconfdir ]] || sysusersconfdir=/etc/sysusers.d
+
+-[[ -d $dracutsysrootdir$tmpfilesdir ]] \
+- || tmpfilesdir=$(pkg-config systemd --variable=tmpfilesdir 2> /dev/null)
+-
+-if ! [[ -d $dracutsysrootdir$tmpfilesdir ]]; then
+- [[ -d $dracutsysrootdir/lib/tmpfiles.d ]] && tmpfilesdir=/lib/tmpfiles.d
+- [[ -d $dracutsysrootdir/usr/lib/tmpfiles.d ]] && tmpfilesdir=/usr/lib/tmpfiles.d
-fi
-
- export initdir dracutbasedir \
- dracutmodules force_add_dracutmodules add_dracutmodules omit_dracutmodules \
- mods_to_load \
-@@ -1354,9 +1327,7 @@ export initdir dracutbasedir \
+-[[ -d $dracutsysrootdir$tmpfilesconfdir ]] \
+- || tmpfilesconfdir=$(pkg-config systemd --variable=tmpfilesconfdir 2> /dev/null)
+-
+-[[ -d $dracutsysrootdir$tmpfilesconfdir ]] || tmpfilesconfdir=/etc/tmpfiles.d
+-
+ [[ -d $dracutsysrootdir$depmodd ]] \
+ || sysctld=$(pkg-config libkmod --variable=depmodd 2> /dev/null)
+
+@@ -1806,15 +1630,9 @@ export initdir dracutbasedir \
stdloglvl sysloglvl fileloglvl kmsgloglvl logfile \
debug host_fs_types host_devs swap_devs sshkey add_fstab \
- DRACUT_VERSION udevdir prefix filesystems drivers \
-- systemdutildir systemdsystemunitdir systemdsystemconfdir \
-- hostonly_cmdline loginstall \
-- tmpfilesdir
-+ hostonly_cmdline loginstall
+ DRACUT_VERSION udevdir udevconfdir udevrulesdir udevrulesconfdir \
+- prefix filesystems drivers dbus dbusconfdir dbusinterfaces \
+- dbusinterfacesconfdir dbusservices dbusservicesconfdir dbussession \
+- dbussessionconfdir dbussystem dbussystemconfdir dbussystemservices \
+- dbussystemservicesconfdir environment environmentconfdir modulesload \
++ prefix filesystems drivers environment environmentconfdir modulesload \
+ modulesloadconfdir sysctl sysctlconfdir sysusers sysusersconfdir \
+- systemdutildir systemdutilconfdir systemdcatalog systemdntpunits \
+- systemdntpunitsconfdir systemdsystemunitdir systemdsystemconfdir \
+- hostonly_cmdline loginstall tmpfilesdir tmpfilesconfdir depmodd \
+- depmodconfdir
++ hostonly_cmdline loginstall depmodd depmodconfdir
mods_to_load=""
# check all our modules to see if they should be sourced.
-@@ -1558,17 +1529,6 @@ if [[ $kernel_only != yes ]]; then
+@@ -2042,17 +1860,6 @@ if [[ $kernel_only != yes ]]; then
cat "$f" >> "${initdir}/etc/fstab"
done
-- if [[ $systemdutildir ]]; then
-- if [ -d ${initdir}/$systemdutildir ]; then
-- mkdir -p ${initdir}/etc/conf.d
+- if [[ $dracutsysrootdir$systemdutildir ]]; then
+- if [[ -d ${initdir}/$systemdutildir ]]; then
+- mkdir -p "${initdir}"/etc/conf.d
- {
- printf "%s\n" "systemdutildir=\"$systemdutildir\""
- printf "%s\n" "systemdsystemunitdir=\"$systemdsystemunitdir\""
- printf "%s\n" "systemdsystemconfdir=\"$systemdsystemconfdir\""
-- } > ${initdir}/etc/conf.d/systemd.conf
+- } > "${initdir}"/etc/conf.d/systemd.conf
- fi
- fi
-
if [[ $DRACUT_RESOLVE_LAZY ]] && [[ $DRACUT_INSTALL ]]; then
dinfo "*** Resolving executable dependencies ***"
find "$initdir" -type f -perm /0111 -not -path '*.ko' -print0 \
-@@ -1849,23 +1809,4 @@ fi
-
- command -v restorecon &>/dev/null && restorecon -- "$outfile"
+@@ -2587,25 +2394,4 @@ freeze_ok_for_fstype() {
+ esac
+ }
-# We sync/fsfreeze only if we're operating on a live booted system.
-# It's possible for e.g. `kernel` to be installed as an RPM BuildRequires or equivalent,
-# and there's no reason to sync, and *definitely* no reason to fsfreeze.
-# Another case where this happens is rpm-ostree, which performs its own sync/fsfreeze
-# globally. See e.g. https://github.com/ostreedev/ostree/commit/8642ef5ab3fec3ac8eb8f193054852f83a8bc4d0
--if test -d /run/systemd/system; then
+-if [[ -d $dracutsysrootdir/run/systemd/system ]]; then
- if ! sync "$outfile" 2> /dev/null; then
- dinfo "dracut: sync operation on newly created initramfs $outfile failed"
- exit 1
- fi
-
- # use fsfreeze only if we're not writing to /
-- if [[ "$(stat -c %m -- "$outfile")" != "/" && "$(stat -f -c %T -- "$outfile")" != "msdos" ]]; then
-- if ! $(fsfreeze -f $(dirname "$outfile") 2>/dev/null && fsfreeze -u $(dirname "$outfile") 2>/dev/null); then
+- if [[ "$(stat -c %m -- "$outfile")" != "/" ]] && freeze_ok_for_fstype "$outfile"; then
+- FSFROZEN="$(dirname "$outfile")"
+- if ! (fsfreeze -f "${FSFROZEN}" 2> /dev/null && fsfreeze -u "${FSFROZEN}" 2> /dev/null); then
- dinfo "dracut: warning: could not fsfreeze $(dirname "$outfile")"
- fi
+- unset FSFROZEN
- fi
-fi
-
exit 0
-diff -urpa dracut-048.orig/modules.d/02caps/module-setup.sh dracut-048/modules.d/02caps/module-setup.sh
---- dracut-048.orig/modules.d/02caps/module-setup.sh 2018-07-06 08:37:51.000000000 +0000
-+++ dracut-048/modules.d/02caps/module-setup.sh 2018-07-21 21:00:11.630092687 +0000
-@@ -13,13 +13,9 @@ depends() {
+diff -urpa dracut-056.orig/modules.d/01fips/fips.sh dracut-056/modules.d/01fips/fips.sh
+--- dracut-056.orig/modules.d/01fips/fips.sh 2022-02-18 12:32:53.000000000 +0100
++++ dracut-056/modules.d/01fips/fips.sh 2022-08-30 00:01:50.073198984 +0200
+@@ -4,15 +4,9 @@ type getarg > /dev/null 2>&1 || . /lib/d
+
+ # systemd lets stdout go to journal only, but the system
+ # has to halt when the integrity check fails to satisfy FIPS.
+-if [ -z "$DRACUT_SYSTEMD" ]; then
+- fips_info() {
+- info "$*"
+- }
+-else
+- fips_info() {
+- echo "$*" >&2
+- }
+-fi
++fips_info() {
++ info "$*"
++}
+
+ mount_boot() {
+ boot=$(getarg boot=)
+diff -urpa dracut-056.orig/modules.d/02caps/module-setup.sh dracut-056/modules.d/02caps/module-setup.sh
+--- dracut-056.orig/modules.d/02caps/module-setup.sh 2022-02-18 12:32:53.000000000 +0100
++++ dracut-056/modules.d/02caps/module-setup.sh 2022-08-29 23:46:09.489747726 +0200
+@@ -14,12 +14,8 @@ depends() {
# called by dracut
install() {
- if ! dracut_module_included "systemd"; then
- inst_hook pre-pivot 00 "$moddir/caps.sh"
-- inst $(type -P capsh 2>/dev/null) /usr/sbin/capsh
+- inst "$(find_binary capsh 2> /dev/null)" /usr/sbin/capsh
- # capsh wants bash and we need bash also
- inst /bin/bash
- else
- dwarning "caps: does not work with systemd in the initramfs"
- fi
+ inst_hook pre-pivot 00 "$moddir/caps.sh"
-+ inst $(type -P capsh 2>/dev/null) /usr/sbin/capsh
++ inst "$(find_binary capsh 2> /dev/null)" /usr/sbin/capsh
+ # capsh wants bash and we need bash also
+ inst /bin/bash
}
-
-diff -urpa dracut-048.orig/modules.d/04watchdog/module-setup.sh dracut-048/modules.d/04watchdog/module-setup.sh
---- dracut-048.orig/modules.d/04watchdog/module-setup.sh 2018-07-06 08:37:51.000000000 +0000
-+++ dracut-048/modules.d/04watchdog/module-setup.sh 2018-07-21 21:00:11.630092687 +0000
-@@ -12,21 +12,17 @@ depends() {
-
- # called by dracut
+diff -urpa dracut-056.orig/modules.d/04watchdog/module-setup.sh dracut-056/modules.d/04watchdog/module-setup.sh
+--- dracut-056.orig/modules.d/04watchdog/module-setup.sh 2022-02-18 12:32:53.000000000 +0100
++++ dracut-056/modules.d/04watchdog/module-setup.sh 2022-08-29 23:49:02.214014930 +0200
+@@ -15,20 +15,17 @@ depends() {
install() {
-- # Do not add watchdog hooks if systemd module is included
-- # In that case, systemd will manage watchdog kick
+ # Do not add watchdog hooks if systemd module is included
+ # In that case, systemd will manage watchdog kick
- if ! dracut_module_included "systemd"; then
-- inst_hook cmdline 00 "$moddir/watchdog.sh"
-- inst_hook cmdline 50 "$moddir/watchdog.sh"
+- inst_hook cmdline 00 "$moddir/watchdog.sh"
+- inst_hook cmdline 50 "$moddir/watchdog.sh"
- inst_hook pre-trigger 00 "$moddir/watchdog.sh"
- inst_hook initqueue 00 "$moddir/watchdog.sh"
-- inst_hook mount 00 "$moddir/watchdog.sh"
-- inst_hook mount 50 "$moddir/watchdog.sh"
-- inst_hook mount 99 "$moddir/watchdog.sh"
+- inst_hook mount 00 "$moddir/watchdog.sh"
+- inst_hook mount 50 "$moddir/watchdog.sh"
+- inst_hook mount 99 "$moddir/watchdog.sh"
- inst_hook pre-pivot 00 "$moddir/watchdog.sh"
- inst_hook pre-pivot 99 "$moddir/watchdog.sh"
-- inst_hook cleanup 00 "$moddir/watchdog.sh"
-- inst_hook cleanup 99 "$moddir/watchdog.sh"
+- inst_hook cleanup 00 "$moddir/watchdog.sh"
+- inst_hook cleanup 99 "$moddir/watchdog.sh"
- fi
-+ inst_hook cmdline 00 "$moddir/watchdog.sh"
-+ inst_hook cmdline 50 "$moddir/watchdog.sh"
+-
++ inst_hook cmdline 00 "$moddir/watchdog.sh"
++ inst_hook cmdline 50 "$moddir/watchdog.sh"
+ inst_hook pre-trigger 00 "$moddir/watchdog.sh"
+ inst_hook initqueue 00 "$moddir/watchdog.sh"
-+ inst_hook mount 00 "$moddir/watchdog.sh"
-+ inst_hook mount 50 "$moddir/watchdog.sh"
-+ inst_hook mount 99 "$moddir/watchdog.sh"
++ inst_hook mount 00 "$moddir/watchdog.sh"
++ inst_hook mount 50 "$moddir/watchdog.sh"
++ inst_hook mount 99 "$moddir/watchdog.sh"
+ inst_hook pre-pivot 00 "$moddir/watchdog.sh"
+ inst_hook pre-pivot 99 "$moddir/watchdog.sh"
-+ inst_hook cleanup 00 "$moddir/watchdog.sh"
-+ inst_hook cleanup 99 "$moddir/watchdog.sh"
++ inst_hook cleanup 00 "$moddir/watchdog.sh"
++ inst_hook cleanup 99 "$moddir/watchdog.sh"
inst_hook emergency 02 "$moddir/watchdog-stop.sh"
inst_multiple -o wdctl
}
-diff -urpa dracut-048.orig/modules.d/10i18n/console_init.sh dracut-048/modules.d/10i18n/console_init.sh
---- dracut-048.orig/modules.d/10i18n/console_init.sh 2018-07-06 08:37:51.000000000 +0000
-+++ dracut-048/modules.d/10i18n/console_init.sh 2018-07-21 21:00:11.630092687 +0000
+diff -urpa dracut-056.orig/modules.d/10i18n/console_init.sh dracut-056/modules.d/10i18n/console_init.sh
+--- dracut-056.orig/modules.d/10i18n/console_init.sh 2022-02-18 12:32:53.000000000 +0100
++++ dracut-056/modules.d/10i18n/console_init.sh 2022-08-30 01:27:10.881161304 +0200
@@ -1,11 +1,5 @@
#!/bin/sh
-[ -n "$DRACUT_SYSTEMD" ] && exit 0
-
--if [ -x $systemdutildir/systemd-vconsole-setup ]; then
-- $systemdutildir/systemd-vconsole-setup "$@"
+-if [ -x "$systemdutildir"/systemd-vconsole-setup ]; then
+- "$systemdutildir"/systemd-vconsole-setup "$@"
-fi
-
[ -e /etc/vconsole.conf ] && . /etc/vconsole.conf
- DEFAULT_FONT=LatArCyrHeb-16
-diff -urpa dracut-048.orig/modules.d/10i18n/module-setup.sh dracut-048/modules.d/10i18n/module-setup.sh
---- dracut-048.orig/modules.d/10i18n/module-setup.sh 2018-07-06 08:37:51.000000000 +0000
-+++ dracut-048/modules.d/10i18n/module-setup.sh 2018-07-21 21:00:11.630092687 +0000
-@@ -16,12 +16,6 @@ depends() {
-
- # called by dracut
+ DEFAULT_FONT=eurlatgr
+diff -urpa dracut-056.orig/modules.d/10i18n/module-setup.sh dracut-056/modules.d/10i18n/module-setup.sh
+--- dracut-056.orig/modules.d/10i18n/module-setup.sh 2022-02-18 12:32:53.000000000 +0100
++++ dracut-056/modules.d/10i18n/module-setup.sh 2022-08-29 23:49:56.738099274 +0200
+@@ -18,13 +18,6 @@ depends() {
install() {
+ declare -A KEYMAPS
+
- if dracut_module_included "systemd"; then
- unset FONT
- unset KEYMAP
-- [[ -f /etc/vconsole.conf ]] && . /etc/vconsole.conf
+- # shellcheck disable=SC1090
+- [[ -f "$dracutsysrootdir"/etc/vconsole.conf ]] && . "$dracutsysrootdir"/etc/vconsole.conf
- fi
-
- KBDSUBDIRS=consolefonts,consoletrans,keymaps,unimaps
- DEFAULT_FONT="${i18n_default_font:-LatArCyrHeb-16}"
+ KBDSUBDIRS=(consolefonts consoletrans keymaps unimaps)
+ DEFAULT_FONT="${i18n_default_font:-eurlatgr}"
I18N_CONF="/etc/locale.conf"
-@@ -99,11 +93,9 @@ install() {
+@@ -121,11 +114,9 @@ install() {
install_base() {
inst_multiple setfont loadkeys kbd_mode stty
- if ! dracut_module_included "systemd"; then
-- inst ${moddir}/console_init.sh /lib/udev/console_init
-- inst_rules ${moddir}/10-console.rules
+- inst "${moddir}"/console_init.sh /lib/udev/console_init
+- inst_rules "${moddir}"/10-console.rules
- inst_hook cmdline 20 "${moddir}/parse-i18n.sh"
- fi
-+ inst ${moddir}/console_init.sh /lib/udev/console_init
-+ inst_rules ${moddir}/10-console.rules
++ inst "${moddir}"/console_init.sh /lib/udev/console_init
++ inst_rules "${moddir}"/10-console.rules
+ inst_hook cmdline 20 "${moddir}/parse-i18n.sh"
if [[ ${kbddir} != "/usr/share" ]]; then
inst_dir /usr/share
-@@ -222,19 +214,11 @@ install() {
- inst_simple ${kbddir}/unimaps/${FONT_UNIMAP}.uni
+@@ -239,17 +230,11 @@ install() {
+ inst_simple "${kbddir}"/unimaps/"${FONT_UNIMAP}".uni
fi
-- if dracut_module_included "systemd" && [[ -f ${I18N_CONF} ]]; then
+- if dracut_module_included "systemd" && [[ -f $dracutsysrootdir${I18N_CONF} ]]; then
- inst_simple ${I18N_CONF}
- else
-- mksubdirs ${initdir}${I18N_CONF}
-- print_vars LC_ALL LANG >> ${initdir}${I18N_CONF}
+- mksubdirs "${initdir}"${I18N_CONF}
+- print_vars LC_ALL LANG >> "${initdir}"${I18N_CONF}
- fi
-+ mksubdirs ${initdir}${I18N_CONF}
-+ print_vars LC_ALL LANG >> ${initdir}${I18N_CONF}
++ mksubdirs "${initdir}"${I18N_CONF}
++ print_vars LC_ALL LANG >> "${initdir}"${I18N_CONF}
-- if dracut_module_included "systemd" && [[ -f ${VCONFIG_CONF} ]]; then
-- inst_simple ${VCONFIG_CONF}
-- else
-- mksubdirs ${initdir}${VCONFIG_CONF}
-- print_vars KEYMAP EXT_KEYMAPS UNICODE FONT FONT_MAP FONT_UNIMAP >> ${initdir}${VCONFIG_CONF}
+- if ! dracut_module_included "systemd"; then
+- mksubdirs "${initdir}"${VCONFIG_CONF}
+- print_vars KEYMAP EXT_KEYMAPS UNICODE FONT FONT_MAP FONT_UNIMAP >> "${initdir}"${VCONFIG_CONF}
- fi
-+ mksubdirs ${initdir}${VCONFIG_CONF}
-+ print_vars KEYMAP EXT_KEYMAPS UNICODE FONT FONT_MAP FONT_UNIMAP >> ${initdir}${VCONFIG_CONF}
++ mksubdirs "${initdir}"${VCONFIG_CONF}
++ print_vars KEYMAP EXT_KEYMAPS UNICODE FONT FONT_MAP FONT_UNIMAP >> "${initdir}"${VCONFIG_CONF}
return 0
}
-diff -urpa dracut-048.orig/modules.d/40network/net-lib.sh dracut-048/modules.d/40network/net-lib.sh
---- dracut-048.orig/modules.d/40network/net-lib.sh 2018-07-06 08:37:51.000000000 +0000
-+++ dracut-048/modules.d/40network/net-lib.sh 2018-07-21 21:00:11.630092687 +0000
-@@ -52,7 +52,7 @@ iface_name() {
+@@ -278,11 +263,6 @@ install() {
+ if checks; then
+ install_base
+
+- # https://github.com/dracutdevs/dracut/issues/796
+- if dracut_module_included "systemd" && [[ -f $dracutsysrootdir${VCONFIG_CONF} ]]; then
+- inst_simple ${VCONFIG_CONF}
+- fi
+-
+ if [[ ${hostonly} ]] && ! [[ ${i18n_install_all} == "yes" ]]; then
+ install_local_i18n || install_all_kbd
+ else
+diff -urpa dracut-056.orig/modules.d/35network-legacy/module-setup.sh dracut-056/modules.d/35network-legacy/module-setup.sh
+--- dracut-056.orig/modules.d/35network-legacy/module-setup.sh 2022-02-18 12:32:53.000000000 +0100
++++ dracut-056/modules.d/35network-legacy/module-setup.sh 2022-08-29 23:48:24.023955850 +0200
+@@ -22,12 +22,6 @@ installkernel() {
+ install() {
+ local _arch
+
+- #Adding default link
+- if dracut_module_included "systemd"; then
+- inst_multiple -o "${systemdutildir}/network/99-default.link"
+- [[ $hostonly ]] && inst_multiple -H -o "${systemdsystemconfdir}/network/*.link"
+- fi
+-
+ inst_multiple ip dhclient sed awk grep pgrep tr expr
+
+ inst_multiple -o arping arping2
+diff -urpa dracut-056.orig/modules.d/35network-legacy/net-genrules.sh dracut-056/modules.d/35network-legacy/net-genrules.sh
+--- dracut-056.orig/modules.d/35network-legacy/net-genrules.sh 2022-02-18 12:32:53.000000000 +0100
++++ dracut-056/modules.d/35network-legacy/net-genrules.sh 2022-08-29 23:59:17.879964809 +0200
+@@ -102,11 +102,8 @@ command -v fix_bootif > /dev/null || . /
+
+ for iface in $IFACES; do
+ if [ "$bootdev" = "$iface" ] || [ "$NEEDNET" = "1" ]; then
+- if [ -n "$netroot" ] && [ -n "$DRACUT_SYSTEMD" ]; then
+- echo "systemctl is-active initrd-root-device.target || [ -f /tmp/net.${iface}.did-setup ]"
+- else
+- echo "[ -f /tmp/net.${iface}.did-setup ]"
+- fi > "$hookdir"/initqueue/finished/wait-"$iface".sh
++ echo "[ -f /tmp/net.${iface}.did-setup ]"
++ > "$hookdir"/initqueue/finished/wait-"$iface".sh
+ fi
+ done
+ # Default: We don't know the interface to use, handle all
+diff -urpa dracut-056.orig/modules.d/40network/module-setup.sh dracut-056/modules.d/40network/module-setup.sh
+--- dracut-056.orig/modules.d/40network/module-setup.sh 2022-02-18 12:32:53.000000000 +0100
++++ dracut-056/modules.d/40network/module-setup.sh 2022-08-29 23:39:01.349085410 +0200
+@@ -9,23 +9,12 @@ check() {
+ depends() {
+ is_qemu_virtualized && echo -n "qemu-net "
+
+- for module in network-wicked network-manager network-legacy systemd-networkd; do
+- if dracut_module_included "$module"; then
+- network_handler="$module"
+- break
+- fi
+- done
++ if dracut_module_included "network-legacy"; then
++ network_handler="$module"
++ fi
+
+ if [ -z "$network_handler" ]; then
+- if [[ -e $dracutsysrootdir$systemdsystemunitdir/wicked.service ]]; then
+- network_handler="network-wicked"
+- elif [[ -x $dracutsysrootdir/usr/libexec/nm-initrd-generator ]] || [[ -x $dracutsysrootdir/usr/lib/nm-initrd-generator ]]; then
+- network_handler="network-manager"
+- elif [[ -x $dracutsysrootdir$systemdutildir/systemd-networkd ]]; then
+- network_handler="systemd-networkd"
+- else
+- network_handler="network-legacy"
+- fi
++ network_handler="network-legacy"
+ fi
+ echo "kernel-network-modules $network_handler"
+ return 0
+diff -urpa dracut-056.orig/modules.d/40network/net-lib.sh dracut-056/modules.d/40network/net-lib.sh
+--- dracut-056.orig/modules.d/40network/net-lib.sh 2022-02-18 12:32:53.000000000 +0100
++++ dracut-056/modules.d/40network/net-lib.sh 2022-08-30 01:56:14.047883232 +0200
+@@ -59,7 +59,7 @@ iface_name() {
configured_ifaces() {
local IFACES="" iface_id="" rv=1
- [ -e "/tmp/net.ifaces" ] && read IFACES < /tmp/net.ifaces
+ [ -e "/tmp/net.ifaces" ] && read -r IFACES < /tmp/net.ifaces
- if { pidof udevd || pidof systemd-udevd; } > /dev/null; then
+ if { pidof udevd; } > /dev/null; then
for iface_id in $IFACES; do
- echo $(iface_name $iface_id)
+ printf "%s\n" "$(iface_name "$iface_id")"
rv=0
-diff -urpa dracut-048.orig/modules.d/50plymouth/module-setup.sh dracut-048/modules.d/50plymouth/module-setup.sh
---- dracut-048.orig/modules.d/50plymouth/module-setup.sh 2018-07-06 08:37:51.000000000 +0000
-+++ dracut-048/modules.d/50plymouth/module-setup.sh 2018-07-21 21:00:11.631092687 +0000
-@@ -41,9 +41,7 @@ install() {
+diff -urpa dracut-056.orig/modules.d/50plymouth/module-setup.sh dracut-056/modules.d/50plymouth/module-setup.sh
+--- dracut-056.orig/modules.d/50plymouth/module-setup.sh 2022-02-18 12:32:53.000000000 +0100
++++ dracut-056/modules.d/50plymouth/module-setup.sh 2022-08-29 23:49:11.145028746 +0200
+@@ -44,8 +44,6 @@ install() {
- inst_multiple readlink
+ inst_multiple plymouthd plymouth plymouth-set-default-theme
- if ! dracut_module_included "systemd"; then
- inst_hook pre-trigger 10 "$moddir"/plymouth-pretrigger.sh
+ inst_hook pre-trigger 10 "$moddir"/plymouth-pretrigger.sh
+ inst_hook pre-pivot 90 "$moddir"/plymouth-newroot.sh
}
-
-diff -urpa dracut-048.orig/modules.d/50plymouth/plymouth-newroot.sh dracut-048/modules.d/50plymouth/plymouth-newroot.sh
---- dracut-048.orig/modules.d/50plymouth/plymouth-newroot.sh 2018-07-06 08:37:51.000000000 +0000
-+++ dracut-048/modules.d/50plymouth/plymouth-newroot.sh 2018-07-21 21:00:11.631092687 +0000
-@@ -1,5 +1,5 @@
- #!/bin/sh
-
--if type plymouth >/dev/null 2>&1 && [ -z "$DRACUT_SYSTEMD" ]; then
-+if type plymouth >/dev/null 2>&1; then
- plymouth --newroot=$NEWROOT
- fi
-diff -urpa dracut-048.orig/modules.d/50plymouth/plymouth-pretrigger.sh dracut-048/modules.d/50plymouth/plymouth-pretrigger.sh
---- dracut-048.orig/modules.d/50plymouth/plymouth-pretrigger.sh 2018-07-06 08:37:51.000000000 +0000
-+++ dracut-048/modules.d/50plymouth/plymouth-pretrigger.sh 2018-07-21 21:00:11.631092687 +0000
-@@ -1,6 +1,6 @@
- #!/bin/sh
-
--if type plymouthd >/dev/null 2>&1 && [ -z "$DRACUT_SYSTEMD" ]; then
-+if type plymouthd >/dev/null 2>&1; then
- if getargbool 1 plymouth.enable && getargbool 1 rd.plymouth -d -n rd_NO_PLYMOUTH; then
- # first trigger graphics subsystem
- udevadm trigger --action=add --attr-match=class=0x030000 >/dev/null 2>&1
-diff -urpa dracut-048.orig/modules.d/90btrfs/module-setup.sh dracut-048/modules.d/90btrfs/module-setup.sh
---- dracut-048.orig/modules.d/90btrfs/module-setup.sh 2018-07-06 08:37:51.000000000 +0000
-+++ dracut-048/modules.d/90btrfs/module-setup.sh 2018-07-21 21:00:11.631092687 +0000
-@@ -42,9 +42,7 @@ install() {
- esac
+diff -urpa dracut-056.orig/modules.d/90btrfs/module-setup.sh dracut-056/modules.d/90btrfs/module-setup.sh
+--- dracut-056.orig/modules.d/90btrfs/module-setup.sh 2022-02-18 12:32:53.000000000 +0100
++++ dracut-056/modules.d/90btrfs/module-setup.sh 2022-08-29 23:45:54.430724429 +0200
+@@ -43,9 +43,7 @@ install() {
+ inst_rules 64-btrfs-dm.rules
fi
- if ! dracut_module_included "systemd"; then
+ inst_hook initqueue/timeout 10 "$moddir/btrfs_timeout.sh"
inst_multiple -o btrfsck btrfs-zero-log
- inst $(command -v btrfs) /sbin/btrfs
-diff -urpa dracut-048.orig/modules.d/90crypt/crypt-run-generator.sh dracut-048/modules.d/90crypt/crypt-run-generator.sh
---- dracut-048.orig/modules.d/90crypt/crypt-run-generator.sh 2018-07-06 08:37:51.000000000 +0000
-+++ dracut-048/modules.d/90crypt/crypt-run-generator.sh 2018-07-21 21:00:11.631092687 +0000
+ inst "$(command -v btrfs)" /sbin/btrfs
+diff -urpa dracut-056.orig/modules.d/90crypt/crypt-lib.sh dracut-056/modules.d/90crypt/crypt-lib.sh
+--- dracut-056.orig/modules.d/90crypt/crypt-lib.sh 2022-02-18 12:32:53.000000000 +0100
++++ dracut-056/modules.d/90crypt/crypt-lib.sh 2022-08-30 00:31:11.632917988 +0200
+@@ -105,30 +105,22 @@ ask_for_password() {
+
+ {
+ flock -s 9
+- # Prompt for password with plymouth, if installed and running.
+- if type plymouth > /dev/null 2>&1 && plymouth --ping 2> /dev/null; then
+- plymouth ask-for-password \
+- --prompt "$ply_prompt" --number-of-tries="$ply_tries" \
+- --command="$ply_cmd"
+- ret=$?
+- else
+- if [ "$tty_echo_off" = yes ]; then
+- stty_orig="$(stty -g)"
+- stty -echo
+- fi
++ if [ "$tty_echo_off" = yes ]; then
++ stty_orig="$(stty -g)"
++ stty -echo
++ fi
+
+- local i=1
+- while [ $i -le "$tty_tries" ]; do
+- [ -n "$tty_prompt" ] \
+- && printf "%s" "$tty_prompt [$i/$tty_tries]:" >&2
+- eval "$tty_cmd" && ret=0 && break
+- ret=$?
+- i=$((i + 1))
+- [ -n "$tty_prompt" ] && printf '\n' >&2
+- done
++ local i=1
++ while [ $i -le "$tty_tries" ]; do
++ [ -n "$tty_prompt" ] \
++ && printf "%s" "$tty_prompt [$i/$tty_tries]:" >&2
++ eval "$tty_cmd" && ret=0 && break
++ ret=$?
++ i=$((i + 1))
++ [ -n "$tty_prompt" ] && printf '\n' >&2
++ done
+
+- [ "$tty_echo_off" = yes ] && stty "$stty_orig"
+- fi
++ [ "$tty_echo_off" = yes ] && stty "$stty_orig"
+ } 9> /.console_lock
+
+ [ $ret -ne 0 ] && echo "Wrong password" >&2
+diff -urpa dracut-056.orig/modules.d/90crypt/crypt-run-generator.sh dracut-056/modules.d/90crypt/crypt-run-generator.sh
+--- dracut-056.orig/modules.d/90crypt/crypt-run-generator.sh 2022-02-18 12:32:53.000000000 +0100
++++ dracut-056/modules.d/90crypt/crypt-run-generator.sh 2022-08-30 00:00:07.766041555 +0200
+@@ -11,7 +11,7 @@ crypttab_contains "$luks" "$dev" && exit
+ allowdiscards="-"
+
+ # parse for allow-discards
+-if [ -n "$DRACUT_SYSTEMD" ] || strstr "$(cryptsetup --help)" "allow-discards"; then
++if strstr "$(cryptsetup --help)" "allow-discards"; then
+ if discarduuids=$(getargs "rd.luks.allow-discards"); then
+ discarduuids=$(str_replace "$discarduuids" 'luks-' '')
+ if strstr " $discarduuids " " ${luks##luks-}"; then
@@ -24,8 +24,4 @@ fi
echo "$luks $dev - timeout=0,$allowdiscards" >> /etc/crypttab
--if command -v systemctl >/dev/null; then
+-if command -v systemctl > /dev/null; then
- systemctl daemon-reload
- systemctl start cryptsetup.target
-fi
exit 0
-diff -urpa dracut-048.orig/modules.d/90crypt/module-setup.sh dracut-048/modules.d/90crypt/module-setup.sh
---- dracut-048.orig/modules.d/90crypt/module-setup.sh 2018-07-21 20:59:45.494094245 +0000
-+++ dracut-048/modules.d/90crypt/module-setup.sh 2018-07-21 21:00:11.631092687 +0000
+diff -urpa dracut-056.orig/modules.d/90crypt/module-setup.sh dracut-056/modules.d/90crypt/module-setup.sh
+--- dracut-056.orig/modules.d/90crypt/module-setup.sh 2022-08-28 19:27:11.079536407 +0200
++++ dracut-056/modules.d/90crypt/module-setup.sh 2022-08-30 01:50:10.450316831 +0200
@@ -4,7 +4,7 @@
check() {
- local _rootdev
+ local fs
# if cryptsetup is not installed, then we cannot support encrypted devices.
-- require_any_binary $systemdutildir/systemd-cryptsetup cryptsetup || return 1
+- require_any_binary "$systemdutildir"/systemd-cryptsetup cryptsetup || return 1
+ require_any_binary cryptsetup || return 1
[[ $hostonly ]] || [[ $mount_needs ]] && {
for fs in "${host_fs_types[@]}"; do
-@@ -59,13 +59,11 @@ install() {
+@@ -20,17 +20,6 @@ check() {
+ depends() {
+ local deps
+ deps="dm rootfs-block"
+- if [[ $hostonly && -f "$dracutsysrootdir"/etc/crypttab ]]; then
+- if grep -q -e "fido2-device=" -e "fido2-cid=" "$dracutsysrootdir"/etc/crypttab; then
+- deps+=" fido2"
+- fi
+- if grep -q "pkcs11-uri" "$dracutsysrootdir"/etc/crypttab; then
+- deps+=" pkcs11"
+- fi
+- if grep -q "tpm2-device=" "$dracutsysrootdir"/etc/crypttab; then
+- deps+=" tpm2-tss"
+- fi
+- fi
+ echo "$deps"
+ return 0
+ }
+@@ -96,13 +85,11 @@ install() {
fi
inst_hook cmdline 30 "$moddir/parse-crypt.sh"
+ inst_hook cmdline 10 "$moddir/parse-keydev.sh"
+ inst_hook cleanup 30 "$moddir/crypt-cleanup.sh"
- if [[ $hostonly ]] && [[ -f /etc/crypttab ]]; then
+ if [[ $hostonly ]] && [[ -f $dracutsysrootdir/etc/crypttab ]]; then
# filter /etc/crypttab for the devices we need
-@@ -135,17 +133,5 @@ install() {
-
+@@ -176,21 +163,5 @@ install() {
inst_simple "$moddir/crypt-lib.sh" "/lib/dracut-crypt-lib.sh"
+ inst_script "$moddir/crypt-run-generator.sh" "/sbin/crypt-run-generator"
- if dracut_module_included "systemd"; then
+- # the cryptsetup targets are already pulled in by 00systemd, but not
+- # the enablement symlinks
- inst_multiple -o \
-- $systemdutildir/system-generators/systemd-cryptsetup-generator \
-- $systemdutildir/systemd-cryptsetup \
-- $systemdsystemunitdir/systemd-ask-password-console.path \
-- $systemdsystemunitdir/systemd-ask-password-console.service \
-- $systemdsystemunitdir/cryptsetup.target \
-- $systemdsystemunitdir/sysinit.target.wants/cryptsetup.target \
-- systemd-ask-password systemd-tty-ask-password-agent
-- inst_script "$moddir"/crypt-run-generator.sh /sbin/crypt-run-generator
+- "$tmpfilesdir"/cryptsetup.conf \
+- "$systemdutildir"/system-generators/systemd-cryptsetup-generator \
+- "$systemdutildir"/systemd-cryptsetup \
+- "$systemdsystemunitdir"/systemd-ask-password-console.path \
+- "$systemdsystemunitdir"/systemd-ask-password-console.service \
+- "$systemdsystemunitdir"/cryptsetup.target \
+- "$systemdsystemunitdir"/sysinit.target.wants/cryptsetup.target \
+- "$systemdsystemunitdir"/remote-cryptsetup.target \
+- "$systemdsystemunitdir"/initrd-root-device.target.wants/remote-cryptsetup.target \
+- systemd-ask-password systemd-tty-ask-password-agent
- fi
-
dracut_need_initqueue
}
-diff -urpa dracut-048.orig/modules.d/90crypt/parse-crypt.sh dracut-048/modules.d/90crypt/parse-crypt.sh
---- dracut-048.orig/modules.d/90crypt/parse-crypt.sh 2018-07-06 08:37:51.000000000 +0000
-+++ dracut-048/modules.d/90crypt/parse-crypt.sh 2018-07-21 21:00:11.631092687 +0000
-@@ -40,12 +40,6 @@ else
+diff -urpa dracut-056.orig/modules.d/90crypt/parse-crypt.sh dracut-056/modules.d/90crypt/parse-crypt.sh
+--- dracut-056.orig/modules.d/90crypt/parse-crypt.sh 2022-02-18 12:32:53.000000000 +0100
++++ dracut-056/modules.d/90crypt/parse-crypt.sh 2022-08-30 01:48:49.594190856 +0200
+@@ -36,12 +36,6 @@ else
LUKS=$(getargs rd.luks.uuid -d rd_LUKS_UUID)
tout=$(getarg rd.luks.key.tout)
if [ -n "$PARTUUID" ]; then
for uuid in $PARTUUID; do
-@@ -56,26 +50,12 @@ else
+@@ -58,28 +52,13 @@ else
luksname="luks-$uuid"
fi
- printf -- 'ENV{ID_PART_ENTRY_UUID}=="*%s*", ' "$uuid"
- printf -- 'RUN+="%s --settled --unique --onetime ' "$(command -v initqueue)"
- printf -- '--name cryptroot-ask-%%k %s ' "$(command -v cryptroot-ask)"
-- printf -- '$env{DEVNAME} %s %s"\n' "$luksname" "$tout"
+- # shellcheck disable=SC2016
+- printf -- '$env{DEVNAME} %s %s %s"\n' "$luksname" "$is_keysource" "$tout"
- } >> /etc/udev/rules.d/70-luks.rules.new
- else
- luksname=$(dev_unit_name "$luksname")
+- # shellcheck disable=SC1003
- luksname="$(str_replace "$luksname" '\' '\\')"
-
- if ! crypttab_contains "$uuid"; then
+ printf -- 'ENV{ID_PART_ENTRY_UUID}=="*%s*", ' "$uuid"
+ printf -- 'RUN+="%s --settled --unique --onetime ' "$(command -v initqueue)"
+ printf -- '--name cryptroot-ask-%%k %s ' "$(command -v cryptroot-ask)"
-+ printf -- '$env{DEVNAME} %s %s"\n' "$luksname" "$tout"
++ # shellcheck disable=SC2016
++ printf -- '$env{DEVNAME} %s %s %s"\n' "$luksname" "$is_keysource" "$tout"
+ } >> /etc/udev/rules.d/70-luks.rules.new
done
elif [ -n "$SERIAL" ]; then
-@@ -88,26 +68,12 @@ else
+@@ -98,28 +77,13 @@ else
luksname="luks-$serialid"
fi
- printf -- 'ENV{ID_SERIAL_SHORT}=="*%s*", ' "$serialid"
- printf -- 'RUN+="%s --settled --unique --onetime ' "$(command -v initqueue)"
- printf -- '--name cryptroot-ask-%%k %s ' "$(command -v cryptroot-ask)"
-- printf -- '$env{DEVNAME} %s %s"\n' "$luksname" "$tout"
+- # shellcheck disable=SC2016
+- printf -- '$env{DEVNAME} %s %s %s"\n' "$luksname" "$is_keysource" "$tout"
- } >> /etc/udev/rules.d/70-luks.rules.new
- else
- luksname=$(dev_unit_name "$luksname")
+- # shellcheck disable=SC1003
- luksname="$(str_replace "$luksname" '\' '\\')"
-
- if ! crypttab_contains "$serialid"; then
+ printf -- 'ENV{ID_SERIAL_SHORT}=="*%s*", ' "$serialid"
+ printf -- 'RUN+="%s --settled --unique --onetime ' "$(command -v initqueue)"
+ printf -- '--name cryptroot-ask-%%k %s ' "$(command -v cryptroot-ask)"
-+ printf -- '$env{DEVNAME} %s %s"\n' "$luksname" "$tout"
++ # shellcheck disable=SC2016
++ printf -- '$env{DEVNAME} %s %s %s"\n' "$luksname" "$is_keysource" "$tout"
+ } >> /etc/udev/rules.d/70-luks.rules.new
done
elif [ -n "$LUKS" ]; then
-@@ -120,28 +86,13 @@ else
+@@ -138,30 +102,14 @@ else
luksname="luks-$luksid"
fi
- printf -- 'ENV{ID_FS_UUID}=="*%s*", ' "$luksid"
- printf -- 'RUN+="%s --settled --unique --onetime ' "$(command -v initqueue)"
- printf -- '--name cryptroot-ask-%%k %s ' "$(command -v cryptroot-ask)"
-- printf -- '$env{DEVNAME} %s %s"\n' "$luksname" "$tout"
+- # shellcheck disable=SC2016
+- printf -- '$env{DEVNAME} %s %s %s"\n' "$luksname" "$is_keysource" "$tout"
- } >> /etc/udev/rules.d/70-luks.rules.new
- else
- luksname=$(dev_unit_name "$luksname")
+- # shellcheck disable=SC1003
- luksname="$(str_replace "$luksname" '\' '\\')"
-
- if ! crypttab_contains "$luksid"; then
+ printf -- 'ENV{ID_FS_UUID}=="*%s*", ' "$luksid"
+ printf -- 'RUN+="%s --settled --unique --onetime ' "$(command -v initqueue)"
+ printf -- '--name cryptroot-ask-%%k %s ' "$(command -v cryptroot-ask)"
-+ printf -- '$env{DEVNAME} %s %s"\n' "$luksname" "$tout"
++ # shellcheck disable=SC2016
++ printf -- '$env{DEVNAME} %s %s %s"\n' "$luksname" "$is_keysource" "$tout"
+ } >> /etc/udev/rules.d/70-luks.rules.new
- uuid=$luksid
- while [ "$uuid" != "${uuid#*-}" ]; do uuid=${uuid%%-*}${uuid#*-}; done
-@@ -154,19 +105,11 @@ else
- } >> "$hookdir/emergency/90-crypt.sh"
+ if [ $is_keysource -eq 0 ]; then
+ uuid=$luksid
+@@ -175,21 +123,12 @@ else
+ fi
done
elif getargbool 0 rd.auto; then
- if [ -z "$DRACUT_SYSTEMD" ]; then
- {
- printf -- 'ENV{ID_FS_TYPE}=="crypto_LUKS", RUN+="%s ' "$(command -v initqueue)"
- printf -- '--unique --settled --onetime --name cryptroot-ask-%%k '
+- # shellcheck disable=SC2016
- printf -- '%s $env{DEVNAME} luks-$env{ID_FS_UUID} %s"\n' "$(command -v cryptroot-ask)" "$tout"
- } >> /etc/udev/rules.d/70-luks.rules.new
- else
- {
- printf -- 'ENV{ID_FS_TYPE}=="crypto_LUKS", RUN+="%s ' "$(command -v initqueue)"
- printf -- '--unique --settled --onetime --name crypt-run-generator-%%k '
+- # shellcheck disable=SC2016
- printf -- '%s $env{DEVNAME} luks-$env{ID_FS_UUID}"\n' "$(command -v crypt-run-generator)"
- } >> /etc/udev/rules.d/70-luks.rules.new
- fi
+ {
+ printf -- 'ENV{ID_FS_TYPE}=="crypto_LUKS", RUN+="%s ' "$(command -v initqueue)"
+ printf -- '--unique --settled --onetime --name cryptroot-ask-%%k '
++ # shellcheck disable=SC2016
+ printf -- '%s $env{DEVNAME} luks-$env{ID_FS_UUID} %s"\n' "$(command -v cryptroot-ask)" "$tout"
+ } >> /etc/udev/rules.d/70-luks.rules.new
fi
echo 'LABEL="luks_end"' >> /etc/udev/rules.d/70-luks.rules.new
-diff -urpa dracut-048.orig/modules.d/90dmsquash-live/dmsquash-live-root.sh dracut-048/modules.d/90dmsquash-live/dmsquash-live-root.sh
---- dracut-048.orig/modules.d/90dmsquash-live/dmsquash-live-root.sh 2018-07-06 08:37:51.000000000 +0000
-+++ dracut-048/modules.d/90dmsquash-live/dmsquash-live-root.sh 2018-07-21 21:00:11.632092687 +0000
-@@ -41,12 +41,7 @@ fi
+diff -urpa dracut-056.orig/modules.d/90dmsquash-live/dmsquash-live-root.sh dracut-056/modules.d/90dmsquash-live/dmsquash-live-root.sh
+--- dracut-056.orig/modules.d/90dmsquash-live/dmsquash-live-root.sh 2022-02-18 12:32:53.000000000 +0100
++++ dracut-056/modules.d/90dmsquash-live/dmsquash-live-root.sh 2022-08-30 00:32:12.334011986 +0200
+@@ -40,18 +40,11 @@ if [ "$fs" = "iso9660" -o "$fs" = "udf"
+ fi
getarg rd.live.check -d check || check=""
if [ -n "$check" ]; then
- type plymouth >/dev/null 2>&1 && plymouth --hide-splash
+- type plymouth > /dev/null 2>&1 && plymouth --hide-splash
- if [ -n "$DRACUT_SYSTEMD" ]; then
- p=$(dev_unit_name "$livedev")
-- systemctl start checkisomd5@${p}.service
+- systemctl start checkisomd5@"${p}".service
- else
-- checkisomd5 --verbose $livedev
+- checkisomd5 --verbose "$livedev"
- fi
-+ checkisomd5 --verbose $livedev
++ checkisomd5 --verbose "$livedev"
if [ $? -eq 1 ]; then
die "CD check failed!"
exit 1
-@@ -81,9 +76,6 @@ else
- if [ "$(blkid -o value -s TYPE $livedev)" != "ntfs" ]; then
- mount -n -t $fstype -o ${liverw:-ro} $livedev /run/initramfs/live
- else
-- # Symlinking /usr/bin/ntfs-3g as /sbin/mount.ntfs seems to boot
-- # at the first glance, but ends with lots and lots of squashfs
-- # errors, because systemd attempts to kill the ntfs-3g process?!
- if [ -x "/usr/bin/ntfs-3g" ]; then
- ( exec -a @ntfs-3g ntfs-3g -o ${liverw:-ro} $livedev /run/initramfs/live ) | vwarn
- else
-@@ -137,7 +129,6 @@ do_live_overlay() {
+ fi
+- type plymouth > /dev/null 2>&1 && plymouth --show-splash
+ fi
+
+ ln -s "$livedev" /run/initramfs/livedev
+@@ -142,7 +135,6 @@ do_live_overlay() {
fi
if [ -n "$overlayfs" ]; then
unset -v overlayfs
-- [ -n "$DRACUT_SYSTEMD" ] && reloadsysrootmountunit="yes"
+- [ -n "$DRACUT_SYSTEMD" ] && reloadsysrootmountunit=":>/xor_overlayfs;"
fi
setup="yes"
else
-@@ -148,7 +139,6 @@ do_live_overlay() {
- ln -s /run/initramfs/overlayfs/ovlwork /run/ovlwork$opt
- if [ -z "$overlayfs" ]; then
- overlayfs="yes"
-- [ -n "$DRACUT_SYSTEMD" ] && reloadsysrootmountunit="yes"
- fi
+@@ -151,9 +143,6 @@ do_live_overlay() {
+ && [ -d /run/initramfs/overlayfs/ovlwork ]; then
+ ln -s /run/initramfs/overlayfs/overlayfs /run/overlayfs${readonly_overlay:+-r}
+ ln -s /run/initramfs/overlayfs/ovlwork /run/ovlwork${readonly_overlay:+-r}
+- if [ -z "$overlayfs" ] && [ -n "$DRACUT_SYSTEMD" ]; then
+- reloadsysrootmountunit=":>/xor_overlayfs;"
+- fi
+ overlayfs="required"
setup="yes"
fi
-@@ -159,7 +149,6 @@ do_live_overlay() {
- ln -s /run/initramfs/overlayfs$pathspec/../ovlwork /run/ovlwork$opt
- if [ -z "$overlayfs" ]; then
- overlayfs="yes"
-- [ -n "$DRACUT_SYSTEMD" ] && reloadsysrootmountunit="yes"
- fi
+@@ -162,9 +151,6 @@ do_live_overlay() {
+ && [ -d /run/initramfs/overlayfs$pathspec/../ovlwork ]; then
+ ln -s /run/initramfs/overlayfs$pathspec /run/overlayfs${readonly_overlay:+-r}
+ ln -s /run/initramfs/overlayfs$pathspec/../ovlwork /run/ovlwork${readonly_overlay:+-r}
+- if [ -z "$overlayfs" ] && [ -n "$DRACUT_SYSTEMD" ]; then
+- reloadsysrootmountunit=":>/xor_overlayfs;"
+- fi
+ overlayfs="required"
setup="yes"
fi
-@@ -169,7 +158,6 @@ do_live_overlay() {
- if [ $? != 0 ]; then
+@@ -175,7 +161,6 @@ do_live_overlay() {
+ die "OverlayFS is required but not available."
+ exit 1
+ fi
+- [ -n "$DRACUT_SYSTEMD" ] && reloadsysrootmountunit=":>/xor_overlayfs;"
m='OverlayFS is not available; using temporary Device-mapper overlay.'
+ info "$m"
unset -v overlayfs setup
-- [ -n "$reloadsysrootmountunit" ] && unset -v reloadsysrootmountunit
- fi
- fi
-
-@@ -182,23 +170,8 @@ do_live_overlay() {
+@@ -191,29 +176,12 @@ do_live_overlay() {
m="$m"$'\n All root filesystem changes will be lost on shutdown.'
m="$m"$'\n Press [Enter] to continue.'
- echo -e "\n\n\n\n${m}\n\n\n" > /dev/kmsg
+ printf "\n\n\n\n%s\n\n\n" "${m}" > /dev/kmsg
- if [ -n "$DRACUT_SYSTEMD" ]; then
-- if type plymouth >/dev/null 2>&1 && plymouth --ping ; then
-- if getargbool 0 rhgb || getargbool 0 splash ; then
+- if type plymouth > /dev/null 2>&1 && plymouth --ping; then
+- if getargbool 0 rhgb || getargbool 0 splash; then
- m='>>>'$'\n''>>>'$'\n''>>>'$'\n\n\n'"$m"
- m="${m%n.*}"$'n.\n\n\n''<<<'$'\n''<<<'$'\n''<<<'
- plymouth display-message --text="${m}"
- systemd-ask-password --timeout=0 "${m}"
- fi
- else
-- type plymouth >/dev/null 2>&1 && plymouth --ping && plymouth --quit
-- read -s -r -p $'\n\n'"${m}" -n 1 reply
+- type plymouth > /dev/null 2>&1 && plymouth --ping && plymouth --quit
+- read -s -r -p $'\n\n'"${m}" -n 1 _
- fi
-+ type plymouth >/dev/null 2>&1 && plymouth --ping && plymouth --quit
-+ read -s -r -p $'\n\n'"${m}" -n 1 reply
++ read -s -r -p $'\n\n'"${m}" -n 1 _
fi
if [ -n "$overlayfs" ]; then
- mkdir -m 0755 /run/overlayfs
-@@ -354,11 +327,6 @@ if [ -b "$OSMIN_LOOPDEV" ]; then
- echo "0 $sz snapshot $BASE_LOOPDEV $OSMIN_LOOPDEV P 8" | dmsetup create --readonly live-osimg-min
- fi
-
--if [ -n "$reloadsysrootmountunit" ]; then
-- > /xor_overlayfs
-- systemctl daemon-reload
--fi
--
- ROOTFLAGS="$(getarg rootflags)"
-
- if [ -n "$overlayfs" ]; then
-@@ -375,18 +343,14 @@ if [ -n "$overlayfs" ]; then
+ if [ -n "$readonly_overlay" ] && ! [ -h /run/overlayfs-r ]; then
+ info "No persistent overlay found."
+ unset -v readonly_overlay
+- [ -n "$DRACUT_SYSTEMD" ] && reloadsysrootmountunit="${reloadsysrootmountunit}:>/xor_readonly;"
+ fi
+ else
+ dd if=/dev/null of=/overlay bs=1024 count=1 seek=$((overlay_size * 1024)) 2> /dev/null
+@@ -296,9 +264,6 @@ if [ -e "$SQUASHED" ]; then
+ fi
+ elif [ -d /run/initramfs/squashfs/proc ]; then
+ FSIMG=$SQUASHED
+- if [ -z "$overlayfs" ] && [ -n "$DRACUT_SYSTEMD" ]; then
+- reloadsysrootmountunit=":>/xor_overlayfs;"
+- fi
+ overlayfs="required"
+ else
+ die "Failed to find a root filesystem in $SQUASHED."
+@@ -384,16 +349,12 @@ if [ -n "$overlayfs" ]; then
else
- mount -r $FSIMG /run/rootfsbase
+ ovlfs=lowerdir=/run/rootfsbase
fi
- if [ -z "$DRACUT_SYSTEMD" ]; then
-- #FIXME What to link to /dev/root? Is it even needed?
- printf 'mount -t overlay LiveOS_rootfs -o%s,%s %s\n' "$ROOTFLAGS" \
-- 'lowerdir=/run/rootfsbase,upperdir=/run/overlayfs,workdir=/run/ovlwork' \
-- "$NEWROOT" > $hookdir/mount/01-$$-live.sh
+- "$ovlfs",upperdir=/run/overlayfs,workdir=/run/ovlwork \
+- "$NEWROOT" > "$hookdir"/mount/01-$$-live.sh
- fi
-+ #FIXME What to link to /dev/root? Is it even needed?
+ printf 'mount -t overlay LiveOS_rootfs -o%s,%s %s\n' "$ROOTFLAGS" \
-+ 'lowerdir=/run/rootfsbase,upperdir=/run/overlayfs,workdir=/run/ovlwork' \
-+ "$NEWROOT" > $hookdir/mount/01-$$-live.sh
++ "$ovlfs",upperdir=/run/overlayfs,workdir=/run/ovlwork \
++ "$NEWROOT" > "$hookdir"/mount/01-$$-live.sh
else
- ln -s /dev/mapper/live-rw /dev/root
- if [ -z "$DRACUT_SYSTEMD" ]; then
- [ -n "$ROOTFLAGS" ] && ROOTFLAGS="-o $ROOTFLAGS"
-- printf 'mount %s /dev/mapper/live-rw %s\n' "$ROOTFLAGS" "$NEWROOT" > $hookdir/mount/01-$$-live.sh
+- printf 'mount %s /dev/mapper/live-rw %s\n' "$ROOTFLAGS" "$NEWROOT" > "$hookdir"/mount/01-$$-live.sh
- fi
+ [ -n "$ROOTFLAGS" ] && ROOTFLAGS="-o $ROOTFLAGS"
-+ printf 'mount %s /dev/mapper/live-rw %s\n' "$ROOTFLAGS" "$NEWROOT" > $hookdir/mount/01-$$-live.sh
- ln -s $BASE_LOOPDEV /run/rootfsbase
++ printf 'mount %s /dev/mapper/live-rw %s\n' "$ROOTFLAGS" "$NEWROOT" > "$hookdir"/mount/01-$$-live.sh
fi
+ [ -e "$SQUASHED" ] && umount -l /run/initramfs/squashfs
-diff -urpa dracut-048.orig/modules.d/90dmsquash-live/iso-scan.sh dracut-048/modules.d/90dmsquash-live/iso-scan.sh
---- dracut-048.orig/modules.d/90dmsquash-live/iso-scan.sh 2018-07-06 08:37:51.000000000 +0000
-+++ dracut-048/modules.d/90dmsquash-live/iso-scan.sh 2018-07-21 21:00:11.632092687 +0000
-@@ -16,7 +16,7 @@ do_iso_scan() {
- local _name
- local dev
- for dev in /dev/disk/by-uuid/*; do
-- _name=$(dev_unit_name "$dev")
-+ _name="$dev"
- [ -e /tmp/isoscan-${_name} ] && continue
- > /tmp/isoscan-${_name}
- mount -t auto -o ro "$dev" "/run/initramfs/isoscan" || continue
-diff -urpa dracut-048.orig/modules.d/90dmsquash-live/module-setup.sh dracut-048/modules.d/90dmsquash-live/module-setup.sh
---- dracut-048.orig/modules.d/90dmsquash-live/module-setup.sh 2018-07-06 08:37:51.000000000 +0000
-+++ dracut-048/modules.d/90dmsquash-live/module-setup.sh 2018-07-21 21:00:11.632092687 +0000
-@@ -31,9 +31,7 @@ install() {
+diff -urpa dracut-056.orig/modules.d/90dmsquash-live/module-setup.sh dracut-056/modules.d/90dmsquash-live/module-setup.sh
+--- dracut-056.orig/modules.d/90dmsquash-live/module-setup.sh 2022-02-18 12:32:53.000000000 +0100
++++ dracut-056/modules.d/90dmsquash-live/module-setup.sh 2022-08-30 01:22:36.037730409 +0200
+@@ -31,10 +31,6 @@ install() {
inst_hook pre-pivot 20 "$moddir/apply-live-updates.sh"
inst_script "$moddir/dmsquash-live-root.sh" "/sbin/dmsquash-live-root"
inst_script "$moddir/iso-scan.sh" "/sbin/iso-scan"
-- inst_script "$moddir/dmsquash-generator.sh" $systemdutildir/system-generators/dracut-dmsquash-generator
+- if dracut_module_included "systemd-initrd"; then
+- inst_script "$moddir/dmsquash-generator.sh" "$systemdutildir"/system-generators/dracut-dmsquash-generator
+- inst_simple "$moddir/checkisomd5@.service" "/etc/systemd/system/checkisomd5@.service"
+- fi
# should probably just be generally included
inst_rules 60-cdrom_id.rules
-- inst_simple "$moddir/checkisomd5@.service" "/etc/systemd/system/checkisomd5@.service"
dracut_need_initqueue
- }
-diff -urpa dracut-048.orig/modules.d/90kernel-modules/module-setup.sh dracut-048/modules.d/90kernel-modules/module-setup.sh
---- dracut-048.orig/modules.d/90kernel-modules/module-setup.sh 2018-07-06 08:37:51.000000000 +0000
-+++ dracut-048/modules.d/90kernel-modules/module-setup.sh 2018-07-21 21:00:11.632092687 +0000
-@@ -92,8 +92,6 @@ installkernel() {
- install() {
- inst_multiple -o /lib/modprobe.d/*.conf
+diff -urpa dracut-056.orig/modules.d/90kernel-modules/module-setup.sh dracut-056/modules.d/90kernel-modules/module-setup.sh
+--- dracut-056.orig/modules.d/90kernel-modules/module-setup.sh 2022-02-18 12:32:53.000000000 +0100
++++ dracut-056/modules.d/90kernel-modules/module-setup.sh 2022-08-29 23:47:25.754865711 +0200
+@@ -152,8 +152,6 @@ install() {
+ [[ -d /lib/modprobe.d ]] && inst_multiple -o "/lib/modprobe.d/*.conf"
+ [[ -d /usr/lib/modprobe.d ]] && inst_multiple -o "/usr/lib/modprobe.d/*.conf"
[[ $hostonly ]] && inst_multiple -H -o /etc/modprobe.d/*.conf /etc/modprobe.conf
- if ! dracut_module_included "systemd"; then
- inst_hook cmdline 01 "$moddir/parse-kernel.sh"
+ inst_hook cmdline 01 "$moddir/parse-kernel.sh"
inst_simple "$moddir/insmodpost.sh" /sbin/insmodpost.sh
}
-diff -urpa dracut-048.orig/modules.d/90livenet/module-setup.sh dracut-048/modules.d/90livenet/module-setup.sh
---- dracut-048.orig/modules.d/90livenet/module-setup.sh 2018-07-06 08:37:51.000000000 +0000
-+++ dracut-048/modules.d/90livenet/module-setup.sh 2018-07-21 21:00:11.632092687 +0000
+diff -urpa dracut-056.orig/modules.d/90livenet/module-setup.sh dracut-056/modules.d/90livenet/module-setup.sh
+--- dracut-056.orig/modules.d/90livenet/module-setup.sh 2022-02-18 12:32:53.000000000 +0100
++++ dracut-056/modules.d/90livenet/module-setup.sh 2022-08-30 01:22:43.539742171 +0200
@@ -17,8 +17,5 @@ install() {
inst_hook cmdline 29 "$moddir/parse-livenet.sh"
inst_hook initqueue/online 95 "$moddir/fetch-liveupdate.sh"
inst_script "$moddir/livenetroot.sh" "/sbin/livenetroot"
- if dracut_module_included "systemd-initrd"; then
-- inst_script "$moddir/livenet-generator.sh" $systemdutildir/system-generators/dracut-livenet-generator
+- inst_script "$moddir/livenet-generator.sh" "$systemdutildir"/system-generators/dracut-livenet-generator
- fi
dracut_need_initqueue
}
-diff -urpa dracut-048.orig/modules.d/90lvm/module-setup.sh dracut-048/modules.d/90lvm/module-setup.sh
---- dracut-048.orig/modules.d/90lvm/module-setup.sh 2018-07-21 20:59:45.491094245 +0000
-+++ dracut-048/modules.d/90lvm/module-setup.sh 2018-07-21 21:00:11.632092687 +0000
-@@ -97,15 +97,8 @@ install() {
-
- # Do not run lvmetad update via pvscan in udev rule - lvmetad is not running yet in dracut!
- if [[ -f ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules ]]; then
-- if grep -q SYSTEMD_WANTS ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules; then
-- sed -i -e 's/^ENV{SYSTEMD_ALIAS}=.*/# No LVM pvscan in dracut - lvmetad is not running yet/' \
-- ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules
-- sed -i -e 's/^ENV{ID_MODEL}=.*//' ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules
-- sed -i -e 's/^ENV{SYSTEMD_WANTS}=.*//' ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules
-- else
-- sed -i -e 's/.*lvm pvscan.*/# No LVM pvscan for in dracut - lvmetad is not running yet/' \
-- ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules
-- fi
-+ sed -i -e 's/.*lvm pvscan.*/# No LVM pvscan for in dracut - lvmetad is not running yet/' \
-+ ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules
- fi
-
- # Gentoo ebuild for LVM2 prior to 2.02.63-r1 doesn't install above rules
-diff -urpa dracut-048.orig/modules.d/90mdraid/module-setup.sh dracut-048/modules.d/90mdraid/module-setup.sh
---- dracut-048.orig/modules.d/90mdraid/module-setup.sh 2018-07-06 08:37:51.000000000 +0000
-+++ dracut-048/modules.d/90mdraid/module-setup.sh 2018-07-21 21:00:11.633092687 +0000
-@@ -126,17 +126,6 @@ install() {
+diff -urpa dracut-056.orig/modules.d/90mdraid/module-setup.sh dracut-056/modules.d/90mdraid/module-setup.sh
+--- dracut-056.orig/modules.d/90mdraid/module-setup.sh 2022-02-18 12:32:53.000000000 +0100
++++ dracut-056/modules.d/90mdraid/module-setup.sh 2022-08-29 23:45:43.188707041 +0200
+@@ -121,20 +121,6 @@ install() {
inst_hook shutdown 30 "$moddir/md-shutdown.sh"
inst_script "$moddir/mdraid-cleanup.sh" /sbin/mdraid-cleanup
inst_script "$moddir/mdraid_start.sh" /sbin/mdraid_start
- if dracut_module_included "systemd"; then
-- if [ -e $systemdsystemunitdir/mdmon@.service ]; then
-- inst_simple $systemdsystemunitdir/mdmon@.service
+- if [[ -e $dracutsysrootdir$systemdsystemunitdir/mdmon@.service ]]; then
+- inst_simple "$systemdsystemunitdir"/mdmon@.service
- fi
-- if [ -e $systemdsystemunitdir/mdadm-last-resort@.service ]; then
-- inst_simple $systemdsystemunitdir/mdadm-last-resort@.service
+- if [[ -e $dracutsysrootdir$systemdsystemunitdir/mdadm-last-resort@.service ]]; then
+- inst_simple "$systemdsystemunitdir"/mdadm-last-resort@.service
- fi
-- if [ -e $systemdsystemunitdir/mdadm-last-resort@.timer ]; then
-- inst_simple $systemdsystemunitdir/mdadm-last-resort@.timer
+- if [[ -e $dracutsysrootdir$systemdsystemunitdir/mdadm-last-resort@.timer ]]; then
+- inst_simple "$systemdsystemunitdir"/mdadm-last-resort@.timer
+- fi
+- if [[ -e $dracutsysrootdir$systemdsystemunitdir/mdadm-grow-continue@.service ]]; then
+- inst_simple "$systemdsystemunitdir"/mdadm-grow-continue@.service
- fi
- fi
inst_hook pre-shutdown 30 "$moddir/mdmon-pre-shutdown.sh"
dracut_need_initqueue
}
-diff -urpa dracut-048.orig/modules.d/90multipath/module-setup.sh dracut-048/modules.d/90multipath/module-setup.sh
---- dracut-048.orig/modules.d/90multipath/module-setup.sh 2018-07-06 08:37:51.000000000 +0000
-+++ dracut-048/modules.d/90multipath/module-setup.sh 2018-07-21 21:00:11.633092687 +0000
-@@ -107,14 +107,8 @@ install() {
+diff -urpa dracut-056.orig/modules.d/90multipath/module-setup.sh dracut-056/modules.d/90multipath/module-setup.sh
+--- dracut-056.orig/modules.d/90multipath/module-setup.sh 2022-02-18 12:32:53.000000000 +0100
++++ dracut-056/modules.d/90multipath/module-setup.sh 2022-08-29 23:46:41.394797087 +0200
+@@ -132,17 +132,8 @@ install() {
[[ $_conf ]] && echo "$_conf" >> "${initdir}/etc/cmdline.d/90multipath.conf"
fi
- if dracut_module_included "systemd"; then
+- if mpathconf_installed; then
+- inst_simple "${moddir}/multipathd-configure.service" "${systemdsystemunitdir}/multipathd-configure.service"
+- $SYSTEMCTL -q --root "$initdir" enable multipathd-configure.service
+- fi
- inst_simple "${moddir}/multipathd.service" "${systemdsystemunitdir}/multipathd.service"
-- mkdir -p "${initdir}${systemdsystemunitdir}/sysinit.target.wants"
-- ln -rfs "${initdir}${systemdsystemunitdir}/multipathd.service" "${initdir}${systemdsystemunitdir}/sysinit.target.wants/multipathd.service"
+- $SYSTEMCTL -q --root "$initdir" enable multipathd.service
- else
- inst_hook pre-trigger 02 "$moddir/multipathd.sh"
-- inst_hook cleanup 02 "$moddir/multipathd-stop.sh"
+- inst_hook cleanup 02 "$moddir/multipathd-stop.sh"
- fi
+ inst_hook pre-trigger 02 "$moddir/multipathd.sh"
-+ inst_hook cleanup 02 "$moddir/multipathd-stop.sh"
-
- inst_hook cleanup 80 "$moddir/multipathd-needshutdown.sh"
- inst_hook shutdown 20 "$moddir/multipath-shutdown.sh"
-diff -urpa dracut-048.orig/modules.d/90qemu/module-setup.sh dracut-048/modules.d/90qemu/module-setup.sh
---- dracut-048.orig/modules.d/90qemu/module-setup.sh 2018-07-06 08:37:51.000000000 +0000
-+++ dracut-048/modules.d/90qemu/module-setup.sh 2018-07-21 21:00:11.633092687 +0000
-@@ -3,14 +3,6 @@
- # called by dracut
- check() {
- if [[ $hostonly ]] || [[ $mount_needs ]]; then
-- if type -P systemd-detect-virt >/dev/null 2>&1; then
-- vm=$(systemd-detect-virt --vm 2>/dev/null)
-- (($? != 0)) && return 255
-- [[ $vm = "qemu" ]] && return 0
-- [[ $vm = "kvm" ]] && return 0
-- [[ $vm = "bochs" ]] && return 0
-- fi
--
- for i in /sys/class/dmi/id/*_vendor; do
- [[ -f $i ]] || continue
- read vendor < $i
-diff -urpa dracut-048.orig/modules.d/90qemu-net/module-setup.sh dracut-048/modules.d/90qemu-net/module-setup.sh
---- dracut-048.orig/modules.d/90qemu-net/module-setup.sh 2018-07-06 08:37:51.000000000 +0000
-+++ dracut-048/modules.d/90qemu-net/module-setup.sh 2018-07-21 21:00:11.633092687 +0000
-@@ -3,14 +3,6 @@
- # called by dracut
- check() {
- if [[ $hostonly ]] || [[ $mount_needs ]]; then
-- if type -P systemd-detect-virt >/dev/null 2>&1; then
-- vm=$(systemd-detect-virt --vm >/dev/null 2>&1)
-- (($? != 0)) && return 255
-- [[ $vm = "qemu" ]] && return 0
-- [[ $vm = "kvm" ]] && return 0
-- [[ $vm = "bochs" ]] && return 0
-- fi
--
- for i in /sys/class/dmi/id/*_vendor; do
- [[ -f $i ]] || continue
- read vendor < $i
-diff -urpa dracut-048.orig/modules.d/90stratis/module-setup.sh dracut-048/modules.d/90stratis/module-setup.sh
---- dracut-048.orig/modules.d/90stratis/module-setup.sh 2018-07-06 08:37:51.000000000 +0000
-+++ dracut-048/modules.d/90stratis/module-setup.sh 2018-07-21 21:00:11.633092687 +0000
-@@ -22,13 +22,7 @@ install() {
++ inst_hook cleanup 02 "$moddir/multipathd-stop.sh"
- inst_multiple stratisd-init thin_check thin_repair
+ inst_hook cleanup 80 "$moddir/multipathd-needshutdown.sh"
+ inst_hook shutdown 20 "$moddir/multipath-shutdown.sh"
+diff -urpa dracut-056.orig/modules.d/91zipl/install_zipl_cmdline.sh dracut-056/modules.d/91zipl/install_zipl_cmdline.sh
+--- dracut-056.orig/modules.d/91zipl/install_zipl_cmdline.sh 2022-02-18 12:32:53.000000000 +0100
++++ dracut-056/modules.d/91zipl/install_zipl_cmdline.sh 2022-08-30 01:53:26.508622304 +0200
+@@ -30,10 +30,6 @@ fi
-- if dracut_module_included "systemd"; then
-- inst_simple "${moddir}/stratisd-init.service" "${systemdsystemunitdir}/stratisd-init.service"
-- mkdir -p "${initdir}${systemdsystemunitdir}/sysinit.target.wants"
-- ln -rfs "${initdir}${systemdsystemunitdir}/stratisd-init.service" "${initdir}${systemdsystemunitdir}/sysinit.target.wants/stratisd-init.service"
-- else
-- inst_hook cmdline 25 "$moddir/stratisd-start.sh"
-- inst_hook cleanup 25 "$moddir/stratisd-stop.sh"
-- fi
-+ inst_hook cmdline 25 "$moddir/stratisd-start.sh"
-+ inst_hook cleanup 25 "$moddir/stratisd-stop.sh"
- }
+ umount ${MNT}
-diff -urpa dracut-048.orig/modules.d/95debug/module-setup.sh dracut-048/modules.d/95debug/module-setup.sh
---- dracut-048.orig/modules.d/95debug/module-setup.sh 2018-07-06 08:37:51.000000000 +0000
-+++ dracut-048/modules.d/95debug/module-setup.sh 2018-07-21 21:00:11.633092687 +0000
+-if [ -f /etc/cmdline.d/99zipl.conf ]; then
+- systemctl restart dracut-cmdline.service
+- systemctl restart systemd-udev-trigger.service
+-fi
+ : > /tmp/install.zipl.cmdline-done
+
+ exit 0
+diff -urpa dracut-056.orig/modules.d/95debug/module-setup.sh dracut-056/modules.d/95debug/module-setup.sh
+--- dracut-056.orig/modules.d/95debug/module-setup.sh 2022-02-18 12:32:53.000000000 +0100
++++ dracut-056/modules.d/95debug/module-setup.sh 2022-08-30 01:51:43.760462213 +0200
@@ -15,7 +15,7 @@ depends() {
install() {
- inst_multiple -o cat ls ps grep more cat rm strace free showmount \
- ping netstat rpcinfo vi scp ping6 ssh find vi \
-- tcpdump cp less hostname mkdir systemd-analyze \
-+ tcpdump cp less hostname mkdir \
- fsck fsck.ext2 fsck.ext4 fsck.ext3 fsck.ext4dev fsck.f2fs fsck.vfat e2fsck
-
- grep '^tcpdump:' /etc/passwd 2>/dev/null >> "$initdir/etc/passwd"
-diff -urpa dracut-048.orig/modules.d/95fcoe/cleanup-fcoe.sh dracut-048/modules.d/95fcoe/cleanup-fcoe.sh
---- dracut-048.orig/modules.d/95fcoe/cleanup-fcoe.sh 2018-07-06 08:37:51.000000000 +0000
-+++ dracut-048/modules.d/95fcoe/cleanup-fcoe.sh 2018-07-21 21:00:11.633092687 +0000
-@@ -4,11 +4,7 @@
-
- if [ -e /var/run/lldpad.pid ]; then
+ inst_multiple -o ls ps grep more cat rm strace free showmount df du lsblk \
+ ping netstat rpcinfo vi scp ping6 ssh find \
+- tcpdump cp dd less hostname mkdir systemd-analyze \
++ tcpdump cp dd less hostname mkdir \
+ fsck fsck.ext2 fsck.ext4 fsck.ext3 fsck.ext4dev fsck.f2fs fsck.vfat e2fsck
+
+ grep '^tcpdump:' "$dracutsysrootdir"/etc/passwd 2> /dev/null >> "$initdir/etc/passwd"
+diff -urpa dracut-056.orig/modules.d/95fcoe/cleanup-fcoe.sh dracut-056/modules.d/95fcoe/cleanup-fcoe.sh
+--- dracut-056.orig/modules.d/95fcoe/cleanup-fcoe.sh 2022-02-18 12:32:53.000000000 +0100
++++ dracut-056/modules.d/95fcoe/cleanup-fcoe.sh 2022-08-30 00:01:38.521181213 +0200
+@@ -6,10 +6,8 @@ if [ -e /var/run/lldpad.pid ]; then
lldpad -k
-- # with systemd version 230, this is not necessary anymore
-- # systemd commit cacf980ed44a28e276a6cc7f8fc41f991e2ab354
+ # with systemd version 230, this is not necessary anymore
+ # systemd commit cacf980ed44a28e276a6cc7f8fc41f991e2ab354
- if [ -z "$DRACUT_SYSTEMD" ]; then
+- # shellcheck disable=SC2174
- mkdir -m 0755 -p /run/initramfs/state/dev/shm
- cp /dev/shm/lldpad.state /run/initramfs/state/dev/shm/ > /dev/null 2>&1
- echo "files /dev/shm/lldpad.state" >> /run/initramfs/rwtab
- fi
++ # shellcheck disable=SC2174
+ mkdir -m 0755 -p /run/initramfs/state/dev/shm
+ cp /dev/shm/lldpad.state /run/initramfs/state/dev/shm/ > /dev/null 2>&1
+ echo "files /dev/shm/lldpad.state" >> /run/initramfs/rwtab
fi
-diff -urpa dracut-048.orig/modules.d/95fstab-sys/mount-sys.sh dracut-048/modules.d/95fstab-sys/mount-sys.sh
---- dracut-048.orig/modules.d/95fstab-sys/mount-sys.sh 2018-07-06 08:37:51.000000000 +0000
-+++ dracut-048/modules.d/95fstab-sys/mount-sys.sh 2018-07-21 21:00:11.633092687 +0000
-@@ -25,11 +25,7 @@ fstab_mount() {
- return 0
- }
+diff -urpa dracut-056.orig/modules.d/95fstab-sys/mount-sys.sh dracut-056/modules.d/95fstab-sys/mount-sys.sh
+--- dracut-056.orig/modules.d/95fstab-sys/mount-sys.sh 2022-02-18 12:32:53.000000000 +0100
++++ dracut-056/modules.d/95fstab-sys/mount-sys.sh 2022-08-29 23:58:56.546931985 +0200
+@@ -27,9 +27,7 @@ fstab_mount() {
--# systemd will mount and run fsck from /etc/fstab and we don't want to
--# run into a race condition.
+ # systemd will mount and run fsck from /etc/fstab and we don't want to
+ # run into a race condition.
-if [ -z "$DRACUT_SYSTEMD" ]; then
- [ -f /etc/fstab ] && fstab_mount /etc/fstab
-fi
+[ -f /etc/fstab ] && fstab_mount /etc/fstab
# prefer $NEWROOT/etc/fstab.sys over local /etc/fstab.sys
- if [ -f $NEWROOT/etc/fstab.sys ]; then
-diff -urpa dracut-048.orig/modules.d/95iscsi/cleanup-iscsi.sh dracut-048/modules.d/95iscsi/cleanup-iscsi.sh
---- dracut-048.orig/modules.d/95iscsi/cleanup-iscsi.sh 2018-07-06 08:37:51.000000000 +0000
-+++ dracut-048/modules.d/95iscsi/cleanup-iscsi.sh 2018-07-21 21:00:11.634092687 +0000
-@@ -1,4 +1,4 @@
+ if [ -f "$NEWROOT"/etc/fstab.sys ]; then
+diff -urpa dracut-056.orig/modules.d/95iscsi/cleanup-iscsi.sh dracut-056/modules.d/95iscsi/cleanup-iscsi.sh
+--- dracut-056.orig/modules.d/95iscsi/cleanup-iscsi.sh 2022-02-18 12:32:53.000000000 +0100
++++ dracut-056/modules.d/95iscsi/cleanup-iscsi.sh 2022-08-30 00:02:04.813221666 +0200
+@@ -1,5 +1,5 @@
#!/bin/sh
--[ -z "${DRACUT_SYSTEMD}" ] && [ -e /sys/module/bnx2i ] && killproc iscsiuio
-+[ -e /sys/module/bnx2i ] && killproc iscsiuio
-
-diff -urpa dracut-048.orig/modules.d/95iscsi/iscsiroot.sh dracut-048/modules.d/95iscsi/iscsiroot.sh
---- dracut-048.orig/modules.d/95iscsi/iscsiroot.sh 2018-07-06 08:37:51.000000000 +0000
-+++ dracut-048/modules.d/95iscsi/iscsiroot.sh 2018-07-21 21:00:11.634092687 +0000
-@@ -36,7 +36,7 @@ iroot=${iroot#:}
- # figured out a way how to check whether this is built-in or not
- modprobe crc32c 2>/dev/null
-
--if [ -z "${DRACUT_SYSTEMD}" ] && [ -e /sys/module/bnx2i ] && ! [ -e /tmp/iscsiuio-started ]; then
-+if [ -e /sys/module/bnx2i ] && ! [ -e /tmp/iscsiuio-started ]; then
- iscsiuio
- > /tmp/iscsiuio-started
+-if [ -z "${DRACUT_SYSTEMD}" ] && { [ -e /sys/module/bnx2i ] || [ -e /sys/module/qedi ]; }; then
++if { [ -e /sys/module/bnx2i ] || [ -e /sys/module/qedi ]; }; then
+ killproc iscsiuio
fi
-@@ -142,11 +142,6 @@ handle_netroot()
- mkdir -p /etc/iscsi
- ln -fs /run/initiatorname.iscsi /etc/iscsi/initiatorname.iscsi
- > /tmp/iscsi_set_initiator
-- if [ -n "$DRACUT_SYSTEMD" ]; then
-- systemctl try-restart iscsid
-- # FIXME: iscsid is not yet ready, when the service is :-/
-- sleep 1
-- fi
+diff -urpa dracut-056.orig/modules.d/95iscsi/iscsiroot.sh dracut-056/modules.d/95iscsi/iscsiroot.sh
+--- dracut-056.orig/modules.d/95iscsi/iscsiroot.sh 2022-02-18 12:32:53.000000000 +0100
++++ dracut-056/modules.d/95iscsi/iscsiroot.sh 2022-08-30 00:04:28.936443406 +0200
+@@ -37,8 +37,7 @@ iroot=${iroot#:}
+ modprobe crc32c 2> /dev/null
+
+ # start iscsiuio if needed
+-if [ -z "${DRACUT_SYSTEMD}" ] \
+- && { [ -e /sys/module/bnx2i ] || [ -e /sys/module/qedi ]; } \
++if { [ -e /sys/module/bnx2i ] || [ -e /sys/module/qedi ]; } \
+ && ! [ -e /tmp/iscsiuio-started ]; then
+ iscsiuio
+ : > /tmp/iscsiuio-started
+@@ -159,11 +158,6 @@ handle_netroot() {
+ mkdir -p /etc/iscsi
+ ln -fs /run/initiatorname.iscsi /etc/iscsi/initiatorname.iscsi
+ : > /tmp/iscsi_set_initiator
+- if [ -n "$DRACUT_SYSTEMD" ]; then
+- systemctl try-restart iscsid
+- # FIXME: iscsid is not yet ready, when the service is :-/
+- sleep 1
+- fi
fi
if [ -z "$iscsi_initiator" ]; then
-@@ -163,11 +158,6 @@ handle_netroot()
+@@ -180,11 +174,6 @@ handle_netroot() {
mkdir -p /etc/iscsi
ln -fs /run/initiatorname.iscsi /etc/iscsi/initiatorname.iscsi
- > /tmp/iscsi_set_initiator
+ : > /tmp/iscsi_set_initiator
- if [ -n "$DRACUT_SYSTEMD" ]; then
- systemctl try-restart iscsid
- # FIXME: iscsid is not yet ready, when the service is :-/
- fi
fi
-
-@@ -188,11 +178,6 @@ handle_netroot()
+ if [ -z "$iscsi_target_port" ]; then
+@@ -204,17 +193,10 @@ handle_netroot() {
if ! [ -e /etc/iscsi/initiatorname.iscsi ]; then
mkdir -p /etc/iscsi
ln -fs /run/initiatorname.iscsi /etc/iscsi/initiatorname.iscsi
- sleep 1
- fi
fi
- # FIXME $iscsi_protocol??
-@@ -204,12 +189,9 @@ handle_netroot()
+- if [ -z "$DRACUT_SYSTEMD" ]; then
+- iscsid
+- sleep 2
+- fi
++ iscsid
++ sleep 2
+
+ # FIXME $iscsi_protocol??
+
+@@ -226,8 +208,7 @@ handle_netroot() {
wait_for_dev -n /dev/root
# install mount script
-- [ -z "$DRACUT_SYSTEMD" ] && \
-- echo "iscsi_lun=$iscsi_lun . /bin/mount-lun.sh " > $hookdir/mount/01-$$-iscsi.sh
-+ echo "iscsi_lun=$iscsi_lun . /bin/mount-lun.sh " > $hookdir/mount/01-$$-iscsi.sh
+- [ -z "$DRACUT_SYSTEMD" ] \
+- && echo "iscsi_lun=$iscsi_lun . /bin/mount-lun.sh " > "$hookdir"/mount/01-$$-iscsi.sh
++ echo "iscsi_lun=$iscsi_lun . /bin/mount-lun.sh " > "$hookdir"/mount/01-$$-iscsi.sh
fi
-- ### ToDo: Upstream calls systemd-run - Shall we, do we have to port this?
--
- targets=$(iscsiadm -m discovery -t st -p $iscsi_target_ip:${iscsi_target_port:+$iscsi_target_port} | sed 's/^.*iqn/iqn/')
- [ -z "$targets" ] && echo "Target discovery to $iscsi_target_ip:${iscsi_target_port:+$iscsi_target_port} failed with status $?" && exit 1
-
-@@ -250,14 +232,6 @@ if [ "$netif" != "timeout" ] && getargbo
- all_ifaces_setup || exit 0
- fi
-
--if [ "$netif" = "timeout" ] && all_ifaces_setup; then
-- # s.th. went wrong and the timeout script hits
-- # restart
-- systemctl restart iscsid
-- # damn iscsid is not ready after unit says it's ready
-- sleep 2
--fi
--
- if getargbool 0 rd.iscsi.firmware -d -y iscsi_firmware ; then
- if [ "$netif" = "timeout" ] || [ "$netif" = "online" ] || [ "$netif" = "dummy" ]; then
- [ -f /tmp/session-retry ] || echo 1 > /tmp/session-retry
-diff -urpa dracut-048.orig/modules.d/95iscsi/module-setup.sh dracut-048/modules.d/95iscsi/module-setup.sh
---- dracut-048.orig/modules.d/95iscsi/module-setup.sh 2018-07-06 08:37:51.000000000 +0000
-+++ dracut-048/modules.d/95iscsi/module-setup.sh 2018-07-21 21:00:11.634092687 +0000
-@@ -208,17 +208,6 @@ install() {
- inst_libdir_file 'libgcc_s.so*'
- inst_multiple umount hostname iscsi-iname iscsiadm iscsid
+ if strglobin "$iscsi_target_ip" '*:*:*' && ! strglobin "$iscsi_target_ip" '['; then
+diff -urpa dracut-056.orig/modules.d/95iscsi/module-setup.sh dracut-056/modules.d/95iscsi/module-setup.sh
+--- dracut-056.orig/modules.d/95iscsi/module-setup.sh 2022-02-18 12:32:53.000000000 +0100
++++ dracut-056/modules.d/95iscsi/module-setup.sh 2022-08-30 01:38:50.480257424 +0200
+@@ -190,14 +190,6 @@ install() {
+ inst_multiple umount iscsi-iname iscsiadm iscsid
+ inst_binary sort
-- ln -sf $systemdsystemunitdir/iscsid.socket $systemdsystemunitdir/sockets.target.wants/iscsid.socket
-- ln -sf $systemdsystemunitdir/iscsiuio.socket $systemdsystemunitdir/sockets.target.wants/iscsiuio.socket
--
- inst_multiple -o \
-- $systemdsystemunitdir/iscsid.socket \
-- $systemdsystemunitdir/iscsid.service \
-- $systemdsystemunitdir/iscsiuio.service \
-- $systemdsystemunitdir/iscsiuio.socket \
-- $systemdsystemunitdir/sockets.target.wants/iscsid.socket \
-- $systemdsystemunitdir/sockets.target.wants/iscsiuio.socket
+- "$systemdsystemunitdir"/iscsid.socket \
+- "$systemdsystemunitdir"/iscsid.service \
+- "$systemdsystemunitdir"/iscsiuio.service \
+- "$systemdsystemunitdir"/iscsiuio.socket \
+- "$systemdsystemunitdir"/sockets.target.wants/iscsid.socket \
+- "$systemdsystemunitdir"/sockets.target.wants/iscsiuio.socket
-
- [[ -d /etc/iscsi ]] && inst_dir $(/usr/bin/find /etc/iscsi)
+ if [[ $hostonly ]]; then
+ local -a _filenames
- # Detect iBFT and perform mandatory steps
-@@ -230,40 +219,7 @@ install() {
+@@ -218,74 +210,7 @@ install() {
inst_hook cmdline 90 "$moddir/parse-iscsiroot.sh"
inst_hook cleanup 90 "$moddir/cleanup-iscsi.sh"
inst "$moddir/iscsiroot.sh" "/sbin/iscsiroot"
+-
- if ! dracut_module_included "systemd"; then
- inst "$moddir/mount-lun.sh" "/bin/mount-lun.sh"
- else
- inst_multiple -o \
-- $systemdsystemunitdir/iscsi.service \
-- $systemdsystemunitdir/iscsid.service \
-- $systemdsystemunitdir/iscsid.socket \
-- $systemdsystemunitdir/iscsiuio.service \
-- $systemdsystemunitdir/iscsiuio.socket \
-- iscsiadm iscsid
--
-- mkdir -p "${initdir}/$systemdsystemunitdir/sockets.target.wants"
-- for i in \
-- iscsiuio.socket \
-- ; do
-- ln_r "$systemdsystemunitdir/${i}" "$systemdsystemunitdir/sockets.target.wants/${i}"
-- done
+- "$systemdsystemunitdir"/iscsi.service \
+- "$systemdsystemunitdir"/iscsi-init.service \
+- "$systemdsystemunitdir"/iscsid.service \
+- "$systemdsystemunitdir"/iscsid.socket \
+- "$systemdsystemunitdir"/iscsiuio.service \
+- "$systemdsystemunitdir"/iscsiuio.socket \
+- iscsiadm iscsid
-
-- mkdir -p "${initdir}/$systemdsystemunitdir/basic.target.wants"
- for i in \
-- iscsid.service \
-- iscsiuio.service \
-- ; do
-- ln_r "$systemdsystemunitdir/${i}" "$systemdsystemunitdir/basic.target.wants/${i}"
+- iscsid.socket \
+- iscsiuio.socket; do
+- $SYSTEMCTL -q --root "$initdir" enable "$i"
- done
-
-- # Make sure iscsid is started after dracut-cmdline and ready for the initqueue
- mkdir -p "${initdir}/$systemdsystemunitdir/iscsid.service.d"
-- (
+- {
+- echo "[Unit]"
+- echo "DefaultDependencies=no"
+- echo "Conflicts=shutdown.target"
+- echo "Before=shutdown.target"
+- } > "${initdir}/$systemdsystemunitdir/iscsid.service.d/dracut.conf"
+-
+- mkdir -p "${initdir}/$systemdsystemunitdir/iscsid.socket.d"
+- {
+- echo "[Unit]"
+- echo "DefaultDependencies=no"
+- echo "Conflicts=shutdown.target"
+- echo "Before=shutdown.target sockets.target"
+- } > "${initdir}/$systemdsystemunitdir/iscsid.socket.d/dracut.conf"
+-
+- mkdir -p "${initdir}/$systemdsystemunitdir/iscsiuio.service.d"
+- {
+- echo "[Unit]"
+- echo "DefaultDependencies=no"
+- echo "Conflicts=shutdown.target"
+- echo "Before=shutdown.target"
+- } > "${initdir}/$systemdsystemunitdir/iscsiuio.service.d/dracut.conf"
+-
+- mkdir -p "${initdir}/$systemdsystemunitdir/iscsiuio.socket.d"
+- {
- echo "[Unit]"
-- echo "After=dracut-cmdline.service"
-- echo "Before=dracut-initqueue.service"
-- ) > "${initdir}/$systemdsystemunitdir/iscsid.service.d/dracut.conf"
+- echo "DefaultDependencies=no"
+- echo "Conflicts=shutdown.target"
+- echo "Before=shutdown.target sockets.target"
+- } > "${initdir}/$systemdsystemunitdir/iscsiuio.socket.d/dracut.conf"
+-
+- # Fedora 34 iscsid requires iscsi-shutdown.service
+- # which would terminate all iSCSI connections on switch root
+- cat > "${initdir}/$systemdsystemunitdir/iscsi-shutdown.service" << EOF
+-[Unit]
+-Description=Dummy iscsi-shutdown.service for the initrd
+-Documentation=man:iscsid(8) man:iscsiadm(8)
+-DefaultDependencies=no
+-Conflicts=shutdown.target
+-After=systemd-remount-fs.service network.target iscsid.service iscsiuio.service
+-Before=remote-fs-pre.target
+-
+-[Service]
+-Type=oneshot
+-RemainAfterExit=false
+-ExecStart=-/usr/bin/true
+-EOF
- fi
+ inst "$moddir/mount-lun.sh" "/bin/mount-lun.sh"
inst_dir /var/lib/iscsi
- dracut_need_initqueue
- }
-diff -urpa dracut-048.orig/modules.d/95iscsi/parse-iscsiroot.sh dracut-048/modules.d/95iscsi/parse-iscsiroot.sh
---- dracut-048.orig/modules.d/95iscsi/parse-iscsiroot.sh 2018-07-06 08:37:51.000000000 +0000
-+++ dracut-048/modules.d/95iscsi/parse-iscsiroot.sh 2018-07-21 21:00:11.634092687 +0000
-@@ -41,7 +41,7 @@ if [ "${root%%:*}" = "iscsi" ] ; then
+ mkdir -p "${initdir}/var/lib/iscsi/nodes"
+ # Fedora 34 iscsid wants a non-empty /var/lib/iscsi/nodes directory
+diff -urpa dracut-056.orig/modules.d/95iscsi/parse-iscsiroot.sh dracut-056/modules.d/95iscsi/parse-iscsiroot.sh
+--- dracut-056.orig/modules.d/95iscsi/parse-iscsiroot.sh 2022-02-18 12:32:53.000000000 +0100
++++ dracut-056/modules.d/95iscsi/parse-iscsiroot.sh 2022-08-30 00:03:21.583339788 +0200
+@@ -41,7 +41,6 @@ if [ "${root%%:*}" = "iscsi" ]; then
netroot=$root
# if root is not specified try to mount the whole iSCSI LUN
printf 'ENV{DEVTYPE}!="partition", SYMLINK=="disk/by-path/*-iscsi-*-*", SYMLINK+="root"\n' >> /etc/udev/rules.d/99-iscsi-root.rules
- [ -n "$DRACUT_SYSTEMD" ] && systemctl is-active systemd-udevd && udevadm control --reload-rules
-+ udevadm control --reload-rules
root=/dev/root
write_fs_tab /dev/root
-@@ -58,7 +58,7 @@ done
- if [ "${root}" = "/dev/root" ] && getarg "netroot=dhcp" ; then
+@@ -58,7 +57,6 @@ done
+ if [ "${root}" = "/dev/root" ] && getarg "netroot=dhcp"; then
# if root is not specified try to mount the whole iSCSI LUN
printf 'ENV{DEVTYPE}!="partition", SYMLINK=="disk/by-path/*-iscsi-*-*", SYMLINK+="root"\n' >> /etc/udev/rules.d/99-iscsi-root.rules
- [ -n "$DRACUT_SYSTEMD" ] && systemctl is-active systemd-udevd && udevadm control --reload-rules
-+ udevadm control --reload-rules
fi
- if [ -n "$iscsiroot" ] ; then
-@@ -116,11 +116,6 @@ if arg=$(getarg rd.iscsi.initiator -d is
- if ! [ -e /etc/iscsi/initiatorname.iscsi ]; then
- mkdir -p /etc/iscsi
- ln -fs /run/initiatorname.iscsi /etc/iscsi/initiatorname.iscsi
-- if [ -n "$DRACUT_SYSTEMD" ]; then
-- systemctl try-restart iscsid
-- # FIXME: iscsid is not yet ready, when the service is :-/
-- sleep 1
-- fi
- fi
+ if [ -n "$iscsiroot" ]; then
+@@ -84,7 +82,7 @@ if [ -n "$iscsi_firmware" ]; then
+ modprobe -b -q iscsi_boot_sysfs 2> /dev/null
+ modprobe -b -q iscsi_ibft
+ # if no ip= is given, but firmware
+- echo "${DRACUT_SYSTEMD+systemctl is-active initrd-root-device.target || }[ -f '/tmp/iscsistarted-firmware' ]" > "$hookdir"/initqueue/finished/iscsi_started.sh
++ echo "[ -f '/tmp/iscsistarted-firmware' ]" > "$hookdir"/initqueue/finished/iscsi_started.sh
+ initqueue --unique --online /sbin/iscsiroot online "iscsi:" "$NEWROOT"
+ initqueue --unique --onetime --timeout /sbin/iscsiroot timeout "iscsi:" "$NEWROOT"
+ initqueue --unique --onetime --settled /sbin/iscsiroot online "iscsi:" "'$NEWROOT'"
+@@ -110,11 +108,6 @@ if arg=$(getarg rd.iscsi.initiator -d is
+ rm -f /etc/iscsi/initiatorname.iscsi
+ mkdir -p /etc/iscsi
+ ln -fs /run/initiatorname.iscsi /etc/iscsi/initiatorname.iscsi
+- if [ -n "$DRACUT_SYSTEMD" ]; then
+- systemctl try-restart iscsid
+- # FIXME: iscsid is not yet ready, when the service is :-/
+- sleep 1
+- fi
fi
-@@ -133,11 +128,6 @@ if [ -z $iscsi_initiator ] && [ -f /sys/
+ # If not given on the cmdline and initiator-name available via iBFT
+@@ -126,11 +119,6 @@ if [ -z "$iscsi_initiator" ] && [ -f /sy
mkdir -p /etc/iscsi
ln -fs /run/initiatorname.iscsi /etc/iscsi/initiatorname.iscsi
- > /tmp/iscsi_set_initiator
+ : > /tmp/iscsi_set_initiator
- if [ -n "$DRACUT_SYSTEMD" ]; then
- systemctl try-restart iscsid
- # FIXME: iscsid is not yet ready, when the service is :-/
fi
fi
-diff -urpa dracut-048.orig/modules.d/95nbd/module-setup.sh dracut-048/modules.d/95nbd/module-setup.sh
---- dracut-048.orig/modules.d/95nbd/module-setup.sh 2018-07-06 08:37:51.000000000 +0000
-+++ dracut-048/modules.d/95nbd/module-setup.sh 2018-07-21 21:00:11.634092687 +0000
-@@ -34,9 +34,6 @@ install() {
+@@ -145,7 +133,7 @@ for nroot in $(getargs netroot); do
+ type parse_iscsi_root > /dev/null 2>&1 || . /lib/net-lib.sh
+ parse_iscsi_root "$nroot" || return 1
+ netroot_enc=$(str_replace "$nroot" '/' '\2f')
+- echo "${DRACUT_SYSTEMD+systemctl is-active initrd-root-device.target || }[ -f '/tmp/iscsistarted-$netroot_enc' ]" > "$hookdir"/initqueue/finished/iscsi_started.sh
++ echo "[ -f '/tmp/iscsistarted-$netroot_enc' ]" > "$hookdir"/initqueue/finished/iscsi_started.sh
+ done
+
+ # Done, all good!
+diff -urpa dracut-056.orig/modules.d/95nbd/module-setup.sh dracut-056/modules.d/95nbd/module-setup.sh
+--- dracut-056.orig/modules.d/95nbd/module-setup.sh 2022-02-18 12:32:53.000000000 +0100
++++ dracut-056/modules.d/95nbd/module-setup.sh 2022-08-30 01:22:13.502695076 +0200
+@@ -32,8 +32,5 @@ install() {
inst nbd-client
inst_hook cmdline 90 "$moddir/parse-nbdroot.sh"
inst_script "$moddir/nbdroot.sh" "/sbin/nbdroot"
- if dracut_module_included "systemd-initrd"; then
-- inst_script "$moddir/nbd-generator.sh" $systemdutildir/system-generators/dracut-nbd-generator
+- inst_script "$moddir/nbd-generator.sh" "$systemdutildir"/system-generators/dracut-nbd-generator
- fi
dracut_need_initqueue
}
-
-diff -urpa dracut-048.orig/modules.d/95nbd/nbdroot.sh dracut-048/modules.d/95nbd/nbdroot.sh
---- dracut-048.orig/modules.d/95nbd/nbdroot.sh 2018-07-06 08:37:51.000000000 +0000
-+++ dracut-048/modules.d/95nbd/nbdroot.sh 2018-07-21 21:00:11.634092687 +0000
-@@ -97,37 +97,15 @@ if [ "$root" = "block:/dev/root" -o "$ro
- write_fs_tab /dev/root "$nbdfstype" "$fsopts"
+diff -urpa dracut-056.orig/modules.d/95nbd/nbdroot.sh dracut-056/modules.d/95nbd/nbdroot.sh
+--- dracut-056.orig/modules.d/95nbd/nbdroot.sh 2022-02-18 12:32:53.000000000 +0100
++++ dracut-056/modules.d/95nbd/nbdroot.sh 2022-08-30 01:41:57.958549518 +0200
+@@ -101,27 +101,13 @@ if [ "$root" = "block:/dev/root" -o "$ro
+ udevadm control --reload
wait_for_dev -n /dev/root
- if [ -z "$DRACUT_SYSTEMD" ]; then
-- printf '/bin/mount %s\n' \
-- "$NEWROOT" \
-- > $hookdir/mount/01-$$-nbd.sh
-- fi
--fi
--
--if strstr "$(nbd-client --help 2>&1)" "systemd-mark"; then
-- preopts="--systemd-mark $preopts"
-+ printf '/bin/mount %s\n' \
-+ "$NEWROOT" \
-+ > $hookdir/mount/01-$$-nbd.sh
- fi
+- type write_fs_tab > /dev/null 2>&1 || . /lib/fs-lib.sh
++ type write_fs_tab > /dev/null 2>&1 || . /lib/fs-lib.sh
- if [ "$nbdport" -gt 0 ] 2>/dev/null; then
-- if [ -z "$DRACUT_SYSTEMD" ]; then
-- nbd-client "$nbdserver" $nbdport /dev/nbd0 $preopts $opts || exit 1
-- else
-- systemd-run --no-block --service-type=forking --quiet \
-- --description="nbd nbd0" \
-- -p 'DefaultDependencies=no' \
-- -p 'KillMode=none' \
-- --unit="nbd0" -- nbd-client "$nbdserver" $nbdport /dev/nbd0 $preopts $opts >/dev/null 2>&1 || exit 1
-- fi
-+ nbd-client "$nbdserver" $nbdport /dev/nbd0 $preopts $opts || exit 1
- else
-- if [ -z "$DRACUT_SYSTEMD" ]; then
-- nbd-client -name "$nbdport" "$nbdserver" /dev/nbd0 $preopts $opts || exit 1
+- write_fs_tab /dev/root "$nbdfstype" "$fsopts"
++ write_fs_tab /dev/root "$nbdfstype" "$fsopts"
+
+- printf '/bin/mount %s\n' \
+- "$NEWROOT" \
+- > "$hookdir"/mount/01-$$-nbd.sh
- else
-- systemd-run --no-block --service-type=forking --quiet \
-- --description="nbd nbd0" \
-- -p 'DefaultDependencies=no' \
-- -p 'KillMode=none' \
-- --unit="nbd0" -- nbd-client -name "$nbdport" "$nbdserver" /dev/nbd0 $preopts $opts >/dev/null 2>&1 || exit 1
+- mkdir -p /run/systemd/system/sysroot.mount.d
+- cat << EOF > /run/systemd/system/sysroot.mount.d/dhcp.conf
+-[Mount]
+-Where=/sysroot
+-What=/dev/root
+-Type=$nbdfstype
+-Options=$fsopts
+-EOF
+- systemctl --no-block daemon-reload
- fi
-+ nbd-client -name "$nbdport" "$nbdserver" /dev/nbd0 $preopts $opts || exit 1
+- # if we're on systemd, use the nbd-generator script
+- # to create the /sysroot mount.
++ printf '/bin/mount %s\n' \
++ "$NEWROOT" \
++ > "$hookdir"/mount/01-$$-nbd.sh
fi
- # NBD doesn't emit uevents when it gets connected, so kick it
-diff -urpa dracut-048.orig/modules.d/95nbd/parse-nbdroot.sh dracut-048/modules.d/95nbd/parse-nbdroot.sh
---- dracut-048.orig/modules.d/95nbd/parse-nbdroot.sh 2018-07-06 08:37:51.000000000 +0000
-+++ dracut-048/modules.d/95nbd/parse-nbdroot.sh 2018-07-21 21:00:11.634092687 +0000
-@@ -46,11 +46,6 @@ fi
- [ "${netroot%%:*}" = "nbd" ] || return
-
-
--if [ -n "${DRACUT_SYSTEMD}" ] && [ "$root" = "dhcp" ]; then
-- echo "root=$netroot" > /etc/cmdline.d/root.conf
-- systemctl --no-block daemon-reload
--fi
--
- # Check required arguments
- netroot_to_var $netroot
- [ -z "$server" ] && die "Argument server for nbdroot is missing"
-diff -urpa dracut-048.orig/modules.d/95nfs/module-setup.sh dracut-048/modules.d/95nfs/module-setup.sh
---- dracut-048.orig/modules.d/95nfs/module-setup.sh 2018-07-06 08:37:51.000000000 +0000
-+++ dracut-048/modules.d/95nfs/module-setup.sh 2018-07-21 21:00:11.635092687 +0000
-@@ -73,7 +73,7 @@ install() {
- local _i
- local _nsslibs
- inst_multiple -o portmap rpcbind rpc.statd mount.nfs \
-- mount.nfs4 umount rpc.idmapd sed /etc/netconfig chmod "$tmpfilesdir/rpcbind.conf"
-+ mount.nfs4 umount rpc.idmapd sed /etc/netconfig chmod
- inst_multiple /etc/services /etc/nsswitch.conf /etc/rpc /etc/protocols /etc/idmapd.conf
-
- if [[ $hostonly_cmdline == "yes" ]]; then
-diff -urpa dracut-048.orig/modules.d/95resume/module-setup.sh dracut-048/modules.d/95resume/module-setup.sh
---- dracut-048.orig/modules.d/95resume/module-setup.sh 2018-07-21 20:59:45.488094246 +0000
-+++ dracut-048/modules.d/95resume/module-setup.sh 2018-07-21 21:00:11.635092687 +0000
-@@ -33,15 +33,6 @@ install() {
- [[ $_resumeconf ]] && printf "%s\n" "$_resumeconf" >> "${initdir}/etc/cmdline.d/95resume.conf"
+ if ! [ "$nbdport" -gt 0 ] 2> /dev/null; then
+diff -urpa dracut-056.orig/modules.d/95resume/module-setup.sh dracut-056/modules.d/95resume/module-setup.sh
+--- dracut-056.orig/modules.d/95resume/module-setup.sh 2022-02-18 12:32:53.000000000 +0100
++++ dracut-056/modules.d/95resume/module-setup.sh 2022-08-29 23:50:05.938113509 +0200
+@@ -40,15 +40,6 @@ install() {
+ [[ $_resumeconf ]] && printf "%s\n" "$_resumeconf" >> "${initdir}/etc/cmdline.d/95resume.conf"
fi
- # if systemd is included and has the hibernate-resume tool, use it and nothing else
-- if dracut_module_included "systemd" && [[ -x $systemdutildir/systemd-hibernate-resume ]]; then
+- if dracut_module_included "systemd" && [[ -x $dracutsysrootdir$systemdutildir/systemd-hibernate-resume ]]; then
- inst_multiple -o \
-- $systemdutildir/system-generators/systemd-hibernate-resume-generator \
-- $systemdsystemunitdir/systemd-hibernate-resume@.service \
-- $systemdutildir/systemd-hibernate-resume
+- "$systemdutildir"/system-generators/systemd-hibernate-resume-generator \
+- "$systemdsystemunitdir"/systemd-hibernate-resume@.service \
+- "$systemdutildir"/systemd-hibernate-resume
- return 0
- fi
-
# Optional uswsusp support
- for _bin in /usr/sbin/resume /usr/@lib@/suspend/resume /usr/@lib@/uswsusp/resume
- do
-@@ -52,11 +43,7 @@ install() {
+ for _bin in /usr/sbin/resume /usr/lib/suspend/resume /usr/lib64/suspend/resume /usr/lib/uswsusp/resume /usr/lib64/uswsusp/resume; do
+ [[ -x $dracutsysrootdir${_bin} ]] && {
+@@ -58,11 +49,7 @@ install() {
}
done
- fi
+ inst_hook cmdline 10 "$moddir/parse-resume.sh"
- inst_script "$moddir/resume.sh" /lib/dracut/resume.sh
+ inst_script "$moddir/resume.sh" /lib/dracut/resume.sh
}
-diff -urpa dracut-048.orig/modules.d/95rootfs-block/module-setup.sh dracut-048/modules.d/95rootfs-block/module-setup.sh
---- dracut-048.orig/modules.d/95rootfs-block/module-setup.sh 2018-07-06 08:37:51.000000000 +0000
-+++ dracut-048/modules.d/95rootfs-block/module-setup.sh 2018-07-21 21:00:11.635092687 +0000
-@@ -69,11 +69,9 @@ install() {
+diff -urpa dracut-056.orig/modules.d/95rootfs-block/module-setup.sh dracut-056/modules.d/95rootfs-block/module-setup.sh
+--- dracut-056.orig/modules.d/95rootfs-block/module-setup.sh 2022-02-18 12:32:53.000000000 +0100
++++ dracut-056/modules.d/95rootfs-block/module-setup.sh 2022-08-29 23:46:22.156767313 +0200
+@@ -77,11 +77,9 @@ install() {
inst_multiple umount
inst_multiple tr
inst_hook initqueue/timeout 99 "$moddir/rootfallback.sh"
}
-diff -urpa dracut-048.orig/modules.d/95udev-rules/module-setup.sh dracut-048/modules.d/95udev-rules/module-setup.sh
---- dracut-048.orig/modules.d/95udev-rules/module-setup.sh 2018-07-06 08:37:51.000000000 +0000
-+++ dracut-048/modules.d/95udev-rules/module-setup.sh 2018-07-21 21:00:11.635092687 +0000
-@@ -11,20 +11,7 @@ install() {
+diff -urpa dracut-056.orig/modules.d/95udev-rules/module-setup.sh dracut-056/modules.d/95udev-rules/module-setup.sh
+--- dracut-056.orig/modules.d/95udev-rules/module-setup.sh 2022-02-18 12:32:53.000000000 +0100
++++ dracut-056/modules.d/95udev-rules/module-setup.sh 2022-08-30 01:26:13.553071427 +0200
+@@ -11,18 +11,13 @@ install() {
inst_dir /etc/udev
inst_multiple -o /etc/udev/udev.conf
-- [ -d ${initdir}/$systemdutildir ] || mkdir -p ${initdir}/$systemdutildir
-- for _i in ${systemdutildir}/systemd-udevd ${udevdir}/udevd /sbin/udevd; do
-- [ -x "$_i" ] || continue
-- inst "$_i"
+- [[ -d ${initdir}/$systemdutildir ]] || mkdir -p "${initdir}/$systemdutildir"
+- for _i in "${systemdutildir}"/systemd-udevd "${udevdir}"/udevd /sbin/udevd; do
++ for _i in /sbin/udevd; do
+ [[ -x $dracutsysrootdir$_i ]] || continue
+ inst "$_i"
-
-- if ! [[ -f ${initdir}${systemdutildir}/systemd-udevd ]]; then
-- ln -fs "$_i" ${initdir}${systemdutildir}/systemd-udevd
+- if ! [[ -f ${initdir}${systemdutildir}/systemd-udevd ]]; then
+- ln -fs "$_i" "${initdir}${systemdutildir}"/systemd-udevd
- fi
-- break
-- done
+ break
+ done
- if ! [[ -e ${initdir}${systemdutildir}/systemd-udevd ]]; then
- derror "Cannot find [systemd-]udevd binary!"
-- exit 1
-- fi
-+ inst /sbin/udevd;
-
- inst_rules \
- 40-redhat.rules \
-@@ -56,11 +43,6 @@ install() {
- # eudev rules
- inst_rules 80-drivers-modprobe.rules
-
-- if dracut_module_included "systemd"; then
-- inst_multiple -o ${systemdutildir}/network/*.link
-- [[ $hostonly ]] && inst_multiple -H -o /etc/systemd/network/*.link
-- fi
--
- {
- for i in cdrom tape dialout floppy; do
- if ! grep -q "^$i:" "$initdir/etc/group" 2>/dev/null; then
-diff -urpa dracut-048.orig/modules.d/95virtfs/module-setup.sh dracut-048/modules.d/95virtfs/module-setup.sh
---- dracut-048.orig/modules.d/95virtfs/module-setup.sh 2018-07-06 08:37:51.000000000 +0000
-+++ dracut-048/modules.d/95virtfs/module-setup.sh 2018-07-21 21:00:11.635092687 +0000
-@@ -9,14 +9,6 @@ check() {
- return 255
- }
++ if ! [[ -e /sbin/udevd ]]; then
++ derror "Cannot find udevd binary!"
+ exit 1
+ fi
-- if type -P systemd-detect-virt >/dev/null 2>&1; then
-- vm=$(systemd-detect-virt --vm >/dev/null 2>&1)
-- (($? != 0)) && return 255
-- [[ $vm = "qemu" ]] && return 0
-- [[ $vm = "kvm" ]] && return 0
-- [[ $vm = "bochs" ]] && return 0
-- fi
--
- for i in /sys/class/dmi/id/*_vendor; do
- [[ -f $i ]] || continue
- read vendor < $i
-diff -urpa dracut-048.orig/modules.d/98usrmount/module-setup.sh dracut-048/modules.d/98usrmount/module-setup.sh
---- dracut-048.orig/modules.d/98usrmount/module-setup.sh 2018-07-06 08:37:51.000000000 +0000
-+++ dracut-048/modules.d/98usrmount/module-setup.sh 2018-07-21 21:00:11.635092687 +0000
-@@ -13,9 +13,7 @@ depends() {
+diff -urpa dracut-056.orig/modules.d/98usrmount/module-setup.sh dracut-056/modules.d/98usrmount/module-setup.sh
+--- dracut-056.orig/modules.d/98usrmount/module-setup.sh 2022-02-18 12:32:53.000000000 +0100
++++ dracut-056/modules.d/98usrmount/module-setup.sh 2022-08-29 23:46:30.068779565 +0200
+@@ -13,8 +13,6 @@ depends() {
# called by dracut
install() {
+ inst_hook pre-pivot 50 "$moddir/mount-usr.sh"
:
}
+diff -urpa dracut-056.orig/modules.d/99base/dracut-dev-lib.sh dracut-056/modules.d/99base/dracut-dev-lib.sh
+--- dracut-056.orig/modules.d/99base/dracut-dev-lib.sh 2022-02-18 12:32:53.000000000 +0100
++++ dracut-056/modules.d/99base/dracut-dev-lib.sh 2022-08-30 01:48:05.734122524 +0200
+@@ -25,11 +25,6 @@ str_replace() {
+ dev_unit_name() {
+ local dev="$1"
+
+- if command -v systemd-escape > /dev/null; then
+- systemd-escape -p -- "$dev"
+- return $?
+- fi
+-
+ if [ "$dev" = "/" -o -z "$dev" ]; then
+ printf -- "-"
+ return 0
+@@ -48,53 +43,6 @@ dev_unit_name() {
+ printf -- "%s" "$dev"
+ }
-diff -urpa dracut-048.orig/modules.d/99base/dracut-lib.sh dracut-048/modules.d/99base/dracut-lib.sh
---- dracut-048.orig/modules.d/99base/dracut-lib.sh 2018-07-21 20:59:45.493094245 +0000
-+++ dracut-048/modules.d/99base/dracut-lib.sh 2018-07-21 21:00:11.636092687 +0000
-@@ -1,6 +1,5 @@
- #!/bin/sh
+-# set_systemd_timeout_for_dev [-n] <dev> [<timeout>]
+-# Set 'rd.timeout' as the systemd timeout for <dev>
+-set_systemd_timeout_for_dev() {
+- local _name
+- local _needreload
+- local _noreload
+- local _timeout
+-
+- [ -z "$DRACUT_SYSTEMD" ] && return 0
+-
+- if [ "$1" = "-n" ]; then
+- _noreload=1
+- shift
+- fi
+-
+- if [ -n "$2" ]; then
+- _timeout="$2"
+- else
+- _timeout=$(getarg rd.timeout)
+- fi
+-
+- _timeout=${_timeout:-0}
+-
+- _name=$(dev_unit_name "$1")
+- if ! [ -L "${PREFIX}/etc/systemd/system/initrd.target.wants/${_name}.device" ]; then
+- [ -d "${PREFIX}"/etc/systemd/system/initrd.target.wants ] || mkdir -p "${PREFIX}"/etc/systemd/system/initrd.target.wants
+- ln -s ../"${_name}".device "${PREFIX}/etc/systemd/system/initrd.target.wants/${_name}.device"
+- type mark_hostonly > /dev/null 2>&1 && mark_hostonly /etc/systemd/system/initrd.target.wants/"${_name}".device
+- _needreload=1
+- fi
+-
+- if ! [ -f "${PREFIX}/etc/systemd/system/${_name}.device.d/timeout.conf" ]; then
+- mkdir -p "${PREFIX}/etc/systemd/system/${_name}.device.d"
+- {
+- echo "[Unit]"
+- echo "JobTimeoutSec=$_timeout"
+- echo "JobRunningTimeoutSec=$_timeout"
+- } > "${PREFIX}/etc/systemd/system/${_name}.device.d/timeout.conf"
+- type mark_hostonly > /dev/null 2>&1 && mark_hostonly /etc/systemd/system/"${_name}".device.d/timeout.conf
+- _needreload=1
+- fi
+-
+- if [ -z "$PREFIX" ] && [ "$_needreload" = 1 ] && [ -z "$_noreload" ]; then
+- /sbin/initqueue --onetime --unique --name daemon-reload systemctl daemon-reload
+- fi
+-}
+-
+ # wait_for_dev <dev> [<timeout>]
+ #
+ # Installs a initqueue-finished script,
+@@ -122,7 +70,6 @@ wait_for_dev() {
+ printf 'warn "\"%s\" does not exist"\n' "$1"
+ } >> "${PREFIX}$hookdir/emergency/80-${_name}.sh"
+
+- set_systemd_timeout_for_dev $_noreload "$@"
+ }
+
+ cancel_wait_for_dev() {
+@@ -130,10 +77,4 @@ cancel_wait_for_dev() {
+ _name="$(str_replace "$1" '/' '\x2f')"
+ rm -f -- "$hookdir/initqueue/finished/devexists-${_name}.sh"
+ rm -f -- "$hookdir/emergency/80-${_name}.sh"
+- if [ -n "$DRACUT_SYSTEMD" ]; then
+- _name=$(dev_unit_name "$1")
+- rm -f -- "${PREFIX}/etc/systemd/system/initrd.target.wants/${_name}.device"
+- rm -f -- "${PREFIX}/etc/systemd/system/${_name}.device.d/timeout.conf"
+- /sbin/initqueue --onetime --unique --name daemon-reload systemctl daemon-reload
+- fi
+ }
+diff -urpa dracut-056.orig/modules.d/99base/dracut-lib.sh dracut-056/modules.d/99base/dracut-lib.sh
+--- dracut-056.orig/modules.d/99base/dracut-lib.sh 2022-08-28 19:16:30.263174545 +0200
++++ dracut-056/modules.d/99base/dracut-lib.sh 2022-08-30 00:31:36.280956151 +0200
+@@ -2,7 +2,6 @@
+
+ type wait_for_dev > /dev/null 2>&1 || . /lib/dracut-dev-lib.sh
-export DRACUT_SYSTEMD
export NEWROOT
if [ -n "$NEWROOT" ]; then
- [ -d $NEWROOT ] || mkdir -p -m 0755 $NEWROOT
-@@ -58,32 +57,13 @@ trim() {
+ [ -d "$NEWROOT" ] || mkdir -p -m 0755 "$NEWROOT"
+@@ -63,33 +62,19 @@ trim() {
printf "%s" "$var"
}
- info() {
- check_quiet
- echo "<30>dracut: $*" > /dev/kmsg
-- [ "$DRACUT_QUIET" != "yes" ] && \
+- if [ "$DRACUT_QUIET" != "yes" ]; then
- echo "dracut: $*" >&2
+- fi
- }
-
-else
- echo "$*"
- }
+warn() {
-+ echo "Warning: $*" >&2
++ check_quiet
++ echo "<28>dracut Warning: $*" > /dev/kmsg
++ echo "dracut Warning: $*" >&2
+}
-fi
+info() {
-+ echo "$*"
++ check_quiet
++ echo "<30>dracut: $*" > /dev/kmsg
++ if [ "$DRACUT_QUIET" != "yes" ]; then
++ echo "dracut: $*" >&2
++ fi
+}
vwarn() {
- while read line || [ -n "$line" ]; do
-@@ -475,10 +455,6 @@ die() {
+ while read -r line || [ -n "$line" ]; do
+@@ -464,10 +449,6 @@ die() {
source_hook "shutdown-emergency"
fi
exit 1
}
-@@ -883,77 +859,7 @@ wait_for_mount()
- } >> "$hookdir/emergency/90-${_name}.sh"
- }
-
--# get a systemd-compatible unit name from a path
--# (mimicks unit_name_from_path_instance())
--dev_unit_name()
--{
-- local dev="$1"
--
-- if command -v systemd-escape >/dev/null; then
-- systemd-escape -p -- "$dev"
-- return
-- fi
-
-- if [ "$dev" = "/" -o -z "$dev" ]; then
-- printf -- "-"
-- exit 0
-- fi
--
-- dev="${1%%/}"
-- dev="${dev##/}"
-- dev="$(str_replace "$dev" '\' '\x5c')"
-- dev="$(str_replace "$dev" '-' '\x2d')"
-- if [ "${dev##.}" != "$dev" ]; then
-- dev="\x2e${dev##.}"
-- fi
-- dev="$(str_replace "$dev" '/' '-')"
--
-- printf -- "%s" "$dev"
--}
--
--# set_systemd_timeout_for_dev <dev>
--# Set 'rd.timeout' as the systemd timeout for <dev>
--
--set_systemd_timeout_for_dev()
--{
-- local _name
-- local _needreload
-- local _noreload
-- local _timeout
--
-- if [ "$1" = "-n" ]; then
-- _noreload=1
-- shift
-- fi
--
-- _timeout=$(getarg rd.timeout)
-- _timeout=${_timeout:-0}
--
-- if [ -n "$DRACUT_SYSTEMD" ]; then
-- _name=$(dev_unit_name "$1")
-- if ! [ -L ${PREFIX}/etc/systemd/system/initrd.target.wants/${_name}.device ]; then
-- [ -d ${PREFIX}/etc/systemd/system/initrd.target.wants ] || mkdir -p ${PREFIX}/etc/systemd/system/initrd.target.wants
-- ln -s ../${_name}.device ${PREFIX}/etc/systemd/system/initrd.target.wants/${_name}.device
-- type mark_hostonly >/dev/null 2>&1 && mark_hostonly /etc/systemd/system/initrd.target.wants/${_name}.device
-- _needreload=1
-- fi
--
-- if ! [ -f ${PREFIX}/etc/systemd/system/${_name}.device.d/timeout.conf ]; then
-- mkdir -p ${PREFIX}/etc/systemd/system/${_name}.device.d
-- {
-- echo "[Unit]"
-- echo "JobTimeoutSec=$_timeout"
-- echo "JobRunningTimeoutSec=$_timeout"
-- } > ${PREFIX}/etc/systemd/system/${_name}.device.d/timeout.conf
-- type mark_hostonly >/dev/null 2>&1 && mark_hostonly /etc/systemd/system/${_name}.device.d/timeout.conf
-- _needreload=1
-- fi
--
-- if [ -z "$PREFIX" ] && [ "$_needreload" = 1 ] && [ -z "$_noreload" ]; then
-- /sbin/initqueue --onetime --unique --name daemon-reload systemctl daemon-reload
-- fi
-- fi
--}
- # wait_for_dev <dev>
- #
- # Installs a initqueue-finished script,
-@@ -981,8 +887,6 @@ wait_for_dev()
- printf '[ -e "%s" ] || ' $1
- printf 'warn "\"%s\" does not exist"\n' $1
- } >> "${PREFIX}$hookdir/emergency/80-${_name}.sh"
--
-- set_systemd_timeout_for_dev $_noreload $1
- }
-
- cancel_wait_for_dev()
-@@ -991,12 +895,6 @@ cancel_wait_for_dev()
- _name="$(str_replace "$1" '/' '\x2f')"
- rm -f -- "$hookdir/initqueue/finished/devexists-${_name}.sh"
- rm -f -- "$hookdir/emergency/80-${_name}.sh"
-- if [ -n "$DRACUT_SYSTEMD" ]; then
-- _name=$(dev_unit_name "$1")
-- rm -f -- ${PREFIX}/etc/systemd/system/initrd.target.wants/${_name}.device
-- rm -f -- ${PREFIX}/etc/systemd/system/${_name}.device.d/timeout.conf
-- /sbin/initqueue --onetime --unique --name daemon-reload systemctl daemon-reload
-- fi
- }
+@@ -924,43 +905,34 @@ fi
- killproc() {
-@@ -1081,43 +979,35 @@ fi
- _emergency_shell()
- {
+ _emergency_shell() {
local _name="$1"
- if [ -n "$DRACUT_SYSTEMD" ]; then
-- > /.console_lock
-- echo "PS1=\"$_name:\\\${PWD}# \"" >/etc/profile
+- : > /.console_lock
+- echo "PS1=\"$_name:\\\${PWD}# \"" > /etc/profile
- systemctl start dracut-emergency.service
- rm -f -- /etc/profile
- rm -f -- /.console_lock
- /sbin/rdsosreport
- echo 'You might want to save "/run/initramfs/rdsosreport.txt" to a USB stick or /boot'
- echo 'after mounting them and attach it to a bug report.'
-- if ! RD_DEBUG= getargbool 0 rd.debug -d -y rdinitdebug -d -y rdnetdebug; then
+- if ! RD_DEBUG='' getargbool 0 rd.debug -d -y rdinitdebug -d -y rdnetdebug; then
- echo
- echo 'To get more debug information in the report,'
- echo 'reboot with "rd.debug" added to the kernel command line.'
+ /sbin/rdsosreport
+ echo 'You might want to save "/run/initramfs/rdsosreport.txt" to a USB stick or /boot'
+ echo 'after mounting them and attach it to a bug report.'
-+ if ! RD_DEBUG= getargbool 0 rd.debug -d -y rdinitdebug -d -y rdnetdebug; then
++ if ! RD_DEBUG='' getargbool 0 rd.debug -d -y rdinitdebug -d -y rdnetdebug; then
echo
- export PS1="$_name:\${PWD}# "
-- [ -e /.profile ] || >/.profile
+- [ -e /.profile ] || : > /.profile
-
-- _ctty="$(RD_DEBUG= getarg rd.ctty=)" && _ctty="/dev/${_ctty##*/}"
++ echo 'To get more debug information in the report,'
++ echo 'reboot with "rd.debug" added to the kernel command line.'
++ fi
++ echo
++ echo 'Dropping to debug shell.'
++ echo
++ export PS1="$_name:\${PWD}# "
++ [ -e /.profile ] || : > /.profile
+ _ctty="$(RD_DEBUG='' getarg rd.ctty=)" && _ctty="/dev/${_ctty##*/}"
- if [ -z "$_ctty" ]; then
- _ctty=console
- while [ -f /sys/class/tty/$_ctty/active ]; do
- _ctty=/dev/$_ctty
- fi
- [ -c "$_ctty" ] || _ctty=/dev/tty1
-- case "$(/usr/bin/setsid --help 2>&1)" in *--ctty*) CTTY="--ctty";; esac
-- setsid $CTTY /bin/sh -i -l 0<>$_ctty 1<>$_ctty 2<>$_ctty
-+ echo 'To get more debug information in the report,'
-+ echo 'reboot with "rd.debug" added to the kernel command line.'
-+ fi
-+ echo
-+ echo 'Dropping to debug shell.'
-+ echo
-+ export PS1="$_name:\${PWD}# "
-+ [ -e /.profile ] || >/.profile
-+
-+ _ctty="$(RD_DEBUG= getarg rd.ctty=)" && _ctty="/dev/${_ctty##*/}"
+- case "$(/usr/bin/setsid --help 2>&1)" in *--ctty*) CTTY="--ctty" ;; esac
+- setsid $CTTY /bin/sh -i -l 0<> $_ctty 1<> $_ctty 2<> $_ctty
+ if [ -z "$_ctty" ]; then
+ _ctty=console
+ while [ -f /sys/class/tty/$_ctty/active ]; do
+ _ctty=/dev/$_ctty
fi
+ [ -c "$_ctty" ] || _ctty=/dev/tty1
-+ case "$(/usr/bin/setsid --help 2>&1)" in *--ctty*) CTTY="--ctty";; esac
-+ setsid $CTTY /bin/sh -i -l 0<>$_ctty 1<>$_ctty 2<>$_ctty
++ case "$(/usr/bin/setsid --help 2>&1)" in *--ctty*) CTTY="--ctty" ;; esac
++ setsid $CTTY /bin/sh -i -l 0<> $_ctty 1<> $_ctty 2<> $_ctty
}
- emergency_shell()
-diff -urpa dracut-048.orig/modules.d/99base/init.sh dracut-048/modules.d/99base/init.sh
---- dracut-048.orig/modules.d/99base/init.sh 2018-07-21 20:59:45.493094245 +0000
-+++ dracut-048/modules.d/99base/init.sh 2018-07-21 21:00:11.636092687 +0000
-@@ -150,7 +150,7 @@ getargbool 0 rd.udev.info -d -y rdudevin
+ emergency_shell() {
+@@ -976,11 +948,6 @@ emergency_shell() {
+ _rdshell_name=$2
+ action="Shutdown"
+ hook="shutdown-emergency"
+- if type plymouth > /dev/null 2>&1; then
+- plymouth --hide-splash
+- elif [ -x /oldroot/bin/plymouth ]; then
+- /oldroot/bin/plymouth --hide-splash
+- fi
+ shift 2
+ fi
+
+diff -urpa dracut-056.orig/modules.d/99base/init.sh dracut-056/modules.d/99base/init.sh
+--- dracut-056.orig/modules.d/99base/init.sh 2022-08-28 19:16:30.263174545 +0200
++++ dracut-056/modules.d/99base/init.sh 2022-08-30 01:26:56.596138918 +0200
+@@ -141,7 +141,7 @@ getargbool 0 rd.udev.info -d -y rdudevin
getargbool 0 rd.udev.debug -d -y rdudevdebug && UDEV_LOG=debug
# start up udev and trigger cold plugs
--UDEV_LOG=$UDEV_LOG $systemdutildir/systemd-udevd --daemon --resolve-names=never
+-UDEV_LOG=$UDEV_LOG "$systemdutildir"/systemd-udevd --daemon --resolve-names=never
+UDEV_LOG=$UDEV_LOG /sbin/udevd --daemon --resolve-names=never
UDEV_QUEUE_EMPTY="udevadm settle --timeout=0"
-diff -urpa dracut-048.orig/modules.d/99base/memtrace-ko.sh dracut-048/modules.d/99base/memtrace-ko.sh
---- dracut-048.orig/modules.d/99base/memtrace-ko.sh 2018-07-06 08:37:51.000000000 +0000
-+++ dracut-048/modules.d/99base/memtrace-ko.sh 2018-07-21 21:00:11.636092687 +0000
-@@ -23,7 +23,7 @@ get_want_events() {
- }
-
- get_event_filter() {
-- echo "comm == systemd-udevd || comm == modprobe || comm == insmod"
-+ echo "comm == udevd || comm == modprobe || comm == insmod"
- }
-
- is_trace_ready() {
-@@ -63,7 +63,7 @@ prepare_trace() {
- echo "$(get_want_events)" > $trace_base/tracing/set_event
-
- # There are three kinds of known applications for module loading:
-- # "systemd-udevd", "modprobe" and "insmod".
-+ # "udevd", "modprobe" and "insmod".
- # Set them as the global events filter.
- # NOTE: Some kernel may not support this format of filter, anyway
- # the operation will fail and it doesn't matter.
-diff -urpa dracut-048.orig/modules.d/99base/module-setup.sh dracut-048/modules.d/99base/module-setup.sh
---- dracut-048.orig/modules.d/99base/module-setup.sh 2018-07-21 20:59:45.493094245 +0000
-+++ dracut-048/modules.d/99base/module-setup.sh 2018-07-21 21:00:11.636092687 +0000
-@@ -46,11 +46,8 @@ install() {
- inst_simple "$moddir/dracut-lib.sh" "/lib/dracut-lib.sh"
- mkdir -p "${initdir}/var"
+diff -urpa dracut-056.orig/modules.d/99base/module-setup.sh dracut-056/modules.d/99base/module-setup.sh
+--- dracut-056.orig/modules.d/99base/module-setup.sh 2022-08-28 19:23:42.688085700 +0200
++++ dracut-056/modules.d/99base/module-setup.sh 2022-08-29 23:51:05.024204902 +0200
+@@ -53,11 +53,8 @@ install() {
+ inst_simple "$moddir/dracut-dev-lib.sh" "/lib/dracut-dev-lib.sh"
+ mkdir -p "${initdir}"/var
- if ! dracut_module_included "systemd"; then
- inst_multiple switch_root || dfatal "Failed to install switch_root"
- inst_hook cmdline 10 "$moddir/parse-root-opts.sh"
-- inst_multiple -o $systemdutildir/systemd-timestamp
+- inst_multiple -o "$systemdutildir"/systemd-timestamp
- fi
+ inst_multiple switch_root || dfatal "Failed to install switch_root"
+ inst_hook cmdline 10 "$moddir/parse-root-opts.sh"
if [[ $realinitpath ]]; then
for i in $realinitpath; do
-@@ -92,11 +89,8 @@ install() {
-
- ## save host_devs which we need bring up
- if [[ $hostonly_cmdline == "yes" ]]; then
-- if [[ -f "$initdir/lib/dracut/need-initqueue" ]] || ! dracut_module_included "systemd"; then
-+ if [[ -f "$initdir/lib/dracut/need-initqueue" ]]; then
+@@ -109,11 +106,8 @@ install() {
+ if [[ -n ${host_devs[*]} ]]; then
+ dracut_need_initqueue
+ fi
+- if [[ -f $initdir/lib/dracut/need-initqueue ]] || ! dracut_module_included "systemd"; then
++ if [[ -f $initdir/lib/dracut/need-initqueue ]]; then
(
- if dracut_module_included "systemd"; then
-- DRACUT_SYSTEMD=1
+- export DRACUT_SYSTEMD=1
- fi
- PREFIX="$initdir"
-
- . "$moddir/dracut-lib.sh"
-diff -urpa dracut-048.orig/modules.d/99fs-lib/fs-lib.sh dracut-048/modules.d/99fs-lib/fs-lib.sh
---- dracut-048.orig/modules.d/99fs-lib/fs-lib.sh 2018-07-06 08:37:51.000000000 +0000
-+++ dracut-048/modules.d/99fs-lib/fs-lib.sh 2018-07-21 21:00:11.636092687 +0000
-@@ -247,9 +247,4 @@ write_fs_tab() {
- fi
+ export PREFIX="$initdir"
+ export hookdir=/lib/dracut/hooks
- echo "$_root /sysroot $_rootfstype $_rootflags $_fspassno 0" >> /etc/fstab
--
-- if type systemctl >/dev/null 2>/dev/null; then
-- systemctl daemon-reload
-- systemctl --no-block start initrd-root-fs.target
-- fi
- }