]> TLD Linux GIT Repositories - packages/dracut.git/blob - no_systemd.patch
- updated to 059
[packages/dracut.git] / no_systemd.patch
1 diff -urpa dracut-059.orig/dracut-init.sh dracut-059/dracut-init.sh
2 --- dracut-059.orig/dracut-init.sh      2022-12-24 17:49:27.000000000 +0100
3 +++ dracut-059/dracut-init.sh   2024-04-03 01:34:16.263871644 +0200
4 @@ -1183,16 +1183,6 @@ fi
5  is_qemu_virtualized() {
6      # 0 if a virt environment was detected
7      # 1 if a virt environment could not be detected
8 -    # 255 if any error was encountered
9 -    if type -P systemd-detect-virt > /dev/null 2>&1; then
10 -        if ! vm=$(systemd-detect-virt --vm > /dev/null 2>&1); then
11 -            return 255
12 -        fi
13 -        [[ $vm == "qemu" ]] && return 0
14 -        [[ $vm == "kvm" ]] && return 0
15 -        [[ $vm == "bochs" ]] && return 0
16 -    fi
17 -
18      for i in /sys/class/dmi/id/*_vendor; do
19          [[ -f $i ]] || continue
20          read -r vendor < "$i"
21 diff -urpa dracut-059.orig/dracut-logger.sh dracut-059/dracut-logger.sh
22 --- dracut-059.orig/dracut-logger.sh    2022-12-24 17:49:27.000000000 +0100
23 +++ dracut-059/dracut-logger.sh 2024-04-03 01:35:06.456549565 +0200
24 @@ -142,16 +142,7 @@ dlog_init() {
25      fi
26  
27      if ((sysloglvl > 0)); then
28 -        if [[ -d /run/systemd/journal ]] \
29 -            && type -P systemd-cat &> /dev/null \
30 -            && systemctl --quiet is-active systemd-journald.socket &> /dev/null \
31 -            && { echo "dracut-$DRACUT_VERSION" | systemd-cat -t 'dracut' &> /dev/null; }; then
32 -            readonly _systemdcatfile="$DRACUT_TMPDIR/systemd-cat"
33 -            mkfifo "$_systemdcatfile"
34 -            readonly _dlogfd=15
35 -            systemd-cat -t 'dracut' --level-prefix=true < "$_systemdcatfile" &
36 -            exec 15> "$_systemdcatfile"
37 -        elif ! ([[ -S /dev/log ]] && [[ -w /dev/log ]] && command -v logger > /dev/null); then
38 +        if ! ([[ -S /dev/log ]] && [[ -w /dev/log ]] && command -v logger > /dev/null); then
39              # We cannot log to syslog, so turn this facility off.
40              kmsgloglvl=$sysloglvl
41              sysloglvl=0
42 diff -urpa dracut-059.orig/dracut.sh dracut-059/dracut.sh
43 --- dracut-059.orig/dracut.sh   2024-04-03 01:29:40.532147553 +0200
44 +++ dracut-059/dracut.sh        2024-04-03 01:52:54.446974062 +0200
45 @@ -1285,13 +1285,6 @@ if [[ -f $dracutbasedir/dracut-version.s
46      . "$dracutbasedir"/dracut-version.sh
47  fi
48  
49 -if systemd-detect-virt -c &> /dev/null; then
50 -    export DRACUT_NO_MKNOD=1 DRACUT_NO_XATTR=1
51 -    if [[ $hostonly ]]; then
52 -        printf "%s\n" "dracut: WARNING: running in hostonly mode in a container!!"
53 -    fi
54 -fi
55 -
56  if [[ -f $dracutbasedir/dracut-init.sh ]]; then
57      # shellcheck source=./dracut-init.sh
58      . "$dracutbasedir"/dracut-init.sh
59 @@ -1389,19 +1382,6 @@ esac
60  
61  abs_outfile=$(readlink -f "$outfile") && outfile="$abs_outfile"
62  
63 -[[ -d $dracutsysrootdir$systemdutildir ]] \
64 -    || systemdutildir=$(pkg-config systemd --variable=systemdutildir 2> /dev/null)
65 -
66 -if ! [[ -d $dracutsysrootdir$systemdutildir ]]; then
67 -    [[ -e $dracutsysrootdir/lib/systemd/systemd-udevd ]] && systemdutildir=/lib/systemd
68 -    [[ -e $dracutsysrootdir/usr/lib/systemd/systemd-udevd ]] && systemdutildir=/usr/lib/systemd
69 -fi
70 -
71 -[[ -d $dracutsysrootdir$systemdutilconfdir ]] \
72 -    || systemdutilconfdir=$(pkg-config systemd --variable=systemdutilconfdir 2> /dev/null)
73 -
74 -[[ -d $dracutsysrootdir$systemdutilconfdir ]] || systemdutilconfdir=/etc/systemd
75 -
76  if [[ $no_kernel != yes ]] && [[ -d $srcmods ]]; then
77      if ! [[ -f $srcmods/modules.dep ]]; then
78          if [[ -n "$(find "$srcmods" -name '*.ko*')" ]]; then
79 @@ -1467,10 +1447,6 @@ if [[ ! $print_cmdline ]]; then
80          esac
81  
82          if ! [[ -s $uefi_stub ]]; then
83 -            uefi_stub="$dracutsysrootdir${systemdutildir}/boot/efi/linux${EFI_MACHINE_TYPE_NAME}.efi.stub"
84 -        fi
85 -
86 -        if ! [[ -s $uefi_stub ]]; then
87              dfatal "Can't find a uefi stub '$uefi_stub' to create a UEFI executable"
88              exit 1
89          fi
90 @@ -1722,66 +1698,6 @@ for dev in "${!host_fs_types[@]}"; do
91      fi
92  done
93  
94 -[[ -d $dracutsysrootdir$dbus ]] \
95 -    || dbus=$(pkg-config dbus --variable=dbus 2> /dev/null)
96 -
97 -[[ -d $dracutsysrootdir$dbus ]] || dbus=/usr/share/dbus-1
98 -
99 -[[ -d $dracutsysrootdir$dbusconfdir ]] \
100 -    || dbusconfdir=$(pkg-config dbus --variable=dbusconfdir 2> /dev/null)
101 -
102 -[[ -d $dracutsysrootdir$dbusconfdir ]] || dbusconfdir=/etc/dbus-1
103 -
104 -[[ -d $dracutsysrootdir$dbusinterfaces ]] \
105 -    || dbusinterfaces=$(pkg-config dbus --variable=dbusinterfaces 2> /dev/null)
106 -
107 -[[ -d $dracutsysrootdir$dbusinterfaces ]] || dbusinterfaces=${dbus}/interfaces
108 -
109 -[[ -d $dracutsysrootdir$dbusinterfacesconfdir ]] \
110 -    || dbusinterfacesconfdir=$(pkg-config dbus --variable=dbusinterfacesconfdir 2> /dev/null)
111 -
112 -[[ -d $dracutsysrootdir$dbusinterfacesconfdir ]] || dbusinterfacesconfdir=${dbusconfdir}/interfaces
113 -
114 -[[ -d $dracutsysrootdir$dbusservices ]] \
115 -    || dbusservices=$(pkg-config dbus --variable=dbusservices 2> /dev/null)
116 -
117 -[[ -d $dracutsysrootdir$dbusservices ]] || dbusservices=${dbus}/services
118 -
119 -[[ -d $dracutsysrootdir$dbusservicesconfdir ]] \
120 -    || dbusservicesconfdir=$(pkg-config dbus --variable=dbusservicesconfdir 2> /dev/null)
121 -
122 -[[ -d $dracutsysrootdir$dbusservicesconfdir ]] || dbusservicesconfdir=${dbusconfdir}/services
123 -
124 -[[ -d $dracutsysrootdir$dbussession ]] \
125 -    || dbussession=$(pkg-config dbus --variable=dbussession 2> /dev/null)
126 -
127 -[[ -d $dracutsysrootdir$dbussession ]] || dbussession=${dbus}/session.d
128 -
129 -[[ -d $dracutsysrootdir$dbussessionconfdir ]] \
130 -    || dbussessionconfdir=$(pkg-config dbus --variable=dbussessionconfdir 2> /dev/null)
131 -
132 -[[ -d $dracutsysrootdir$dbussessionconfdir ]] || dbussessionconfdir=${dbusconfdir}/session.d
133 -
134 -[[ -d $dracutsysrootdir$dbussystem ]] \
135 -    || dbussystem=$(pkg-config dbus --variable=dbussystem 2> /dev/null)
136 -
137 -[[ -d $dracutsysrootdir$dbussystem ]] || dbussystem=${dbus}/system.d
138 -
139 -[[ -d $dracutsysrootdir$dbussystemconfdir ]] \
140 -    || dbussystemconfdir=$(pkg-config dbus --variable=dbussystemconfdir 2> /dev/null)
141 -
142 -[[ -d $dracutsysrootdir$dbussystemconfdir ]] || dbussystemconfdir=${dbusconfdir}/system.d
143 -
144 -[[ -d $dracutsysrootdir$dbussystemservices ]] \
145 -    || dbussystemservices=$(pkg-config dbus --variable=dbussystemservices 2> /dev/null)
146 -
147 -[[ -d $dracutsysrootdir$dbussystemservices ]] || dbussystemservices=${dbus}/system-services
148 -
149 -[[ -d $dracutsysrootdir$dbussystemservicesconfdir ]] \
150 -    || dbussystemservicesconfdir=$(pkg-config dbus --variable=dbussystemservicesconfdir 2> /dev/null)
151 -
152 -[[ -d $dracutsysrootdir$dbussystemservicesconfdir ]] || dbussystemservicesconfdir=${dbusconfdir}/system-services
153 -
154  [[ -d $dracutsysrootdir$udevdir ]] \
155      || udevdir="$(pkg-config udev --variable=udevdir 2> /dev/null)"
156  if ! [[ -d $dracutsysrootdir$udevdir ]]; then
157 @@ -1804,114 +1720,22 @@ fi
158  
159  [[ -d $dracutsysrootdir$udevrulesconfdir ]] || udevrulesconfdir=${udevconfdir}/rules.d
160  
161 -[[ -d $dracutsysrootdir$sysctld ]] \
162 -    || sysctld=$(pkg-config systemd --variable=sysctld 2> /dev/null)
163 -
164  [[ -d $dracutsysrootdir$sysctld ]] || sysctld=/usr/lib/sysctl.d
165  
166 -[[ -d $dracutsysrootdir$sysctlconfdir ]] \
167 -    || sysctlconfdir=$(pkg-config systemd --variable=sysctlconfdir 2> /dev/null)
168 -
169  [[ -d $dracutsysrootdir$sysctlconfdir ]] || sysctlconfdir=/etc/sysctl.d
170  
171 -[[ -d $dracutsysrootdir$environment ]] \
172 -    || environment=$(pkg-config systemd --variable=environment 2> /dev/null)
173 -
174  [[ -d $dracutsysrootdir$environment ]] || environment=/usr/lib/environment.d
175  
176 -[[ -d $dracutsysrootdir$environmentconfdir ]] \
177 -    || environmentconfdir=$(pkg-config systemd --variable=environmentconfdir 2> /dev/null)
178 -
179  [[ -d $dracutsysrootdir$environmentconfdir ]] || environmentconfdir=/etc/environment.d
180  
181 -[[ -d $dracutsysrootdir$systemdcatalog ]] \
182 -    || systemdcatalog=$(pkg-config systemd --variable=systemdcatalog 2> /dev/null)
183 -
184 -[[ -d $dracutsysrootdir$systemdcatalog ]] || systemdcatalog=${systemdutildir}/catalog
185 -
186 -[[ -d $dracutsysrootdir$modulesload ]] \
187 -    || modulesload=$(pkg-config systemd --variable=modulesload 2> /dev/null)
188 -
189  [[ -d $dracutsysrootdir$modulesload ]] || modulesload=/usr/lib/modules-load.d
190  
191 -[[ -d $dracutsysrootdir$modulesloadconfdir ]] \
192 -    || modulesloadconfdir=$(pkg-config systemd --variable=modulesloadconfdir 2> /dev/null)
193 -
194  [[ -d $dracutsysrootdir$modulesloadconfdir ]] || modulesloadconfdir=/etc/modules-load.d
195  
196 -[[ -d $dracutsysrootdir$systemdnetwork ]] \
197 -    || systemdnetwork=$(pkg-config systemd --variable=systemdnetwork 2> /dev/null)
198 -
199 -[[ -d $dracutsysrootdir$systemdnetwork ]] || systemdnetwork=${systemdutildir}/network
200 -
201 -[[ -d $dracutsysrootdir$systemdnetworkconfdir ]] \
202 -    || systemdnetworkconfdir=$(pkg-config systemd --variable=systemdnetworkconfdir 2> /dev/null)
203 -
204 -[[ -d $dracutsysrootdir$systemdnetworkconfdir ]] || systemdnetworkconfdir=${systemdutilconfdir}/network
205 -
206 -[[ -d $dracutsysrootdir$systemdntpunits ]] \
207 -    || systemdntpunits=$(pkg-config systemd --variable=systemdntpunits 2> /dev/null)
208 -
209 -[[ -d $dracutsysrootdir$systemdntpunits ]] || systemdntpunits=${systemdutildir}/ntp-units.d
210 -
211 -[[ -d $dracutsysrootdir$systemdntpunitsconfdir ]] \
212 -    || systemdntpunitsconfdir=$(pkg-config systemd --variable=systemdntpunitsconfdir 2> /dev/null)
213 -
214 -[[ -d $dracutsysrootdir$systemdntpunitsconfdir ]] || systemdntpunitsconfdir=${systemdutilconfdir}/ntp-units.d
215 -
216 -[[ -d $dracutsysrootdir$systemdportable ]] \
217 -    || systemdportable=$(pkg-config systemd --variable=systemdportable 2> /dev/null)
218 -
219 -[[ -d $dracutsysrootdir$systemdportable ]] || systemdportable=${systemdutildir}/portable
220 -
221 -[[ -d $dracutsysrootdir$systemdportableconfdir ]] \
222 -    || systemdportableconfdir=$(pkg-config systemd --variable=systemdportableconfdir 2> /dev/null)
223 -
224 -[[ -d "$dracutsysrootdir$systemdportableconfdir" ]] || systemdportableconfdir=${systemdutilconfdir}/portable
225 -
226 -[[ -d $dracutsysrootdir$systemdsystemunitdir ]] \
227 -    || systemdsystemunitdir=$(pkg-config systemd --variable=systemdsystemunitdir 2> /dev/null)
228 -
229 -[[ -d "$dracutsysrootdir$systemdsystemunitdir" ]] || systemdsystemunitdir=${systemdutildir}/system
230 -
231 -[[ -d $dracutsysrootdir$systemduser ]] \
232 -    || systemduser=$(pkg-config systemd --variable=systemduser 2> /dev/null)
233 -
234 -[[ -d $dracutsysrootdir$systemduser ]] || systemduser=${systemdutildir}/user
235 -
236 -[[ -d $dracutsysrootdir$systemduserconfdir ]] \
237 -    || systemduserconfdir=$(pkg-config systemd --variable=systemduserconfdir 2> /dev/null)
238 -
239 -[[ -d $dracutsysrootdir$systemduserconfdir ]] || systemduserconfdir=${systemdutilconfdir}/user
240 -
241 -[[ -d $dracutsysrootdir$systemdsystemconfdir ]] \
242 -    || systemdsystemconfdir=$(pkg-config systemd --variable=systemdsystemconfdir 2> /dev/null)
243 -
244 -[[ -d $dracutsysrootdir$systemdsystemconfdir ]] || systemdsystemconfdir=/etc/systemd/system
245 -
246 -[[ -d $dracutsysrootdir$sysusers ]] \
247 -    || sysusers=$(pkg-config systemd --variable=sysusers 2> /dev/null)
248 -
249  [[ -d $dracutsysrootdir$sysusers ]] || sysusers=/usr/lib/sysusers.d
250  
251 -[[ -d $dracutsysrootdir$sysusersconfdir ]] \
252 -    || sysusersconfdir=$(pkg-config systemd --variable=sysusersconfdir 2> /dev/null)
253 -
254  [[ -d $dracutsysrootdir$sysusersconfdir ]] || sysusersconfdir=/etc/sysusers.d
255  
256 -[[ -d $dracutsysrootdir$tmpfilesdir ]] \
257 -    || tmpfilesdir=$(pkg-config systemd --variable=tmpfilesdir 2> /dev/null)
258 -
259 -if ! [[ -d $dracutsysrootdir$tmpfilesdir ]]; then
260 -    [[ -d $dracutsysrootdir/lib/tmpfiles.d ]] && tmpfilesdir=/lib/tmpfiles.d
261 -    [[ -d $dracutsysrootdir/usr/lib/tmpfiles.d ]] && tmpfilesdir=/usr/lib/tmpfiles.d
262 -fi
263 -
264 -[[ -d $dracutsysrootdir$tmpfilesconfdir ]] \
265 -    || tmpfilesconfdir=$(pkg-config systemd --variable=tmpfilesconfdir 2> /dev/null)
266 -
267 -[[ -d $dracutsysrootdir$tmpfilesconfdir ]] || tmpfilesconfdir=/etc/tmpfiles.d
268 -
269  [[ -d $dracutsysrootdir$depmodd ]] \
270      || depmodd=$(pkg-config libkmod --variable=depmodd 2> /dev/null)
271  
272 @@ -1931,17 +1755,9 @@ export initdir dracutbasedir \
273      stdloglvl sysloglvl fileloglvl kmsgloglvl logfile \
274      debug host_fs_types host_devs swap_devs sshkey add_fstab \
275      DRACUT_VERSION udevdir udevconfdir udevrulesdir udevrulesconfdir \
276 -    prefix filesystems drivers dbus dbusconfdir dbusinterfaces \
277 -    dbusinterfacesconfdir dbusservices dbusservicesconfdir dbussession \
278 -    dbussessionconfdir dbussystem dbussystemconfdir dbussystemservices \
279 -    dbussystemservicesconfdir environment environmentconfdir modulesload \
280 +    prefix filesystems drivers environment environmentconfdir modulesload \
281      modulesloadconfdir sysctld sysctlconfdir sysusers sysusersconfdir \
282 -    systemdutildir systemdutilconfdir systemdcatalog systemdnetwork \
283 -    systemdnetworkconfdir systemdntpunits systemdntpunitsconfdir \
284 -    systemdportable systemdportableconfdir systemdsystemunitdir \
285 -    systemdsystemconfdir systemduser systemduserconfdir \
286 -    hostonly_cmdline loginstall tmpfilesdir tmpfilesconfdir depmodd \
287 -    depmodconfdir
288 +    hostonly_cmdline loginstall depmodd depmodconfdir
289  
290  mods_to_load=""
291  # check all our modules to see if they should be sourced.
292 @@ -2169,17 +1985,6 @@ if [[ $kernel_only != yes ]]; then
293          cat "$f" >> "${initdir}/etc/fstab"
294      done
295  
296 -    if [[ $dracutsysrootdir$systemdutildir ]]; then
297 -        if [[ -d ${initdir}/$systemdutildir ]]; then
298 -            mkdir -p "${initdir}"/etc/conf.d
299 -            {
300 -                printf "%s\n" "systemdutildir=\"$systemdutildir\""
301 -                printf "%s\n" "systemdsystemunitdir=\"$systemdsystemunitdir\""
302 -                printf "%s\n" "systemdsystemconfdir=\"$systemdsystemconfdir\""
303 -            } > "${initdir}"/etc/conf.d/systemd.conf
304 -        fi
305 -    fi
306 -
307      if [[ $DRACUT_RESOLVE_LAZY ]] && [[ $DRACUT_INSTALL ]]; then
308          dinfo "*** Resolving executable dependencies ***"
309          # shellcheck disable=SC2086
310 @@ -2712,25 +2517,4 @@ freeze_ok_for_fstype() {
311      esac
312  }
313  
314 -# We sync/fsfreeze only if we're operating on a live booted system.
315 -# It's possible for e.g. `kernel` to be installed as an RPM BuildRequires or equivalent,
316 -# and there's no reason to sync, and *definitely* no reason to fsfreeze.
317 -# Another case where this happens is rpm-ostree, which performs its own sync/fsfreeze
318 -# globally.  See e.g. https://github.com/ostreedev/ostree/commit/8642ef5ab3fec3ac8eb8f193054852f83a8bc4d0
319 -if [[ -d $dracutsysrootdir/run/systemd/system ]]; then
320 -    if ! sync "$outfile" 2> /dev/null; then
321 -        dinfo "sync operation on newly created initramfs $outfile failed"
322 -        exit 1
323 -    fi
324 -
325 -    # use fsfreeze only if we're not writing to /
326 -    if [[ "$(stat -c %m -- "$outfile")" != "/" ]] && freeze_ok_for_fstype "$outfile"; then
327 -        FSFROZEN="$(dirname "$outfile")"
328 -        if ! (fsfreeze -f "${FSFROZEN}" 2> /dev/null && fsfreeze -u "${FSFROZEN}" 2> /dev/null); then
329 -            dwarn "Could not fsfreeze $(dirname "$outfile")"
330 -        fi
331 -        unset FSFROZEN
332 -    fi
333 -fi
334 -
335  exit 0
336 diff -urpa dracut-059.orig/man/dracut.cmdline.7.asc dracut-059/man/dracut.cmdline.7.asc
337 --- dracut-059.orig/man/dracut.cmdline.7.asc    2022-12-24 17:49:27.000000000 +0100
338 +++ dracut-059/man/dracut.cmdline.7.asc 2024-04-03 01:58:16.335321542 +0200
339 @@ -1253,14 +1253,6 @@ CIO_IGNORE
340  rd.cio_accept=0.0.0180,0.0.0800,0.0.0801,0.0.0802
341  --
342  
343 -Plymouth Boot Splash
344 -~~~~~~~~~~~~~~~~~~~~
345 -**plymouth.enable=0**::
346 -    disable the plymouth bootsplash completely.
347 -
348 -**rd.plymouth=0**::
349 -    disable the plymouth bootsplash only for the initramfs.
350 -
351  Kernel keys
352  ~~~~~~~~~~~
353  **masterkey=**__<kernel master key path name>__::
354 @@ -1408,8 +1400,6 @@ iscsi_in_password:: rd.iscsi.in.password
355  
356  iscsi_firmware:: rd.iscsi.firmware=0
357  
358 -rd_NO_PLYMOUTH:: rd.plymouth=0
359 -
360  rd_retry:: rd.retry
361  
362  rdshell:: rd.shell
363 diff -urpa dracut-059.orig/modules.d/01fips/fips.sh dracut-059/modules.d/01fips/fips.sh
364 --- dracut-059.orig/modules.d/01fips/fips.sh    2022-12-24 17:49:27.000000000 +0100
365 +++ dracut-059/modules.d/01fips/fips.sh 2024-04-03 01:34:16.263871644 +0200
366 @@ -4,15 +4,9 @@ type getarg > /dev/null 2>&1 || . /lib/d
367  
368  # systemd lets stdout go to journal only, but the system
369  # has to halt when the integrity check fails to satisfy FIPS.
370 -if [ -z "$DRACUT_SYSTEMD" ]; then
371 -    fips_info() {
372 -        info "$*"
373 -    }
374 -else
375 -    fips_info() {
376 -        echo "$*" >&2
377 -    }
378 -fi
379 +fips_info() {
380 +    info "$*"
381 +}
382  
383  mount_boot() {
384      boot=$(getarg boot=)
385 diff -urpa dracut-059.orig/modules.d/02caps/module-setup.sh dracut-059/modules.d/02caps/module-setup.sh
386 --- dracut-059.orig/modules.d/02caps/module-setup.sh    2022-12-24 17:49:27.000000000 +0100
387 +++ dracut-059/modules.d/02caps/module-setup.sh 2024-04-03 01:34:16.263871644 +0200
388 @@ -14,12 +14,8 @@ depends() {
389  
390  # called by dracut
391  install() {
392 -    if ! dracut_module_included "systemd"; then
393 -        inst_hook pre-pivot 00 "$moddir/caps.sh"
394 -        inst "$(find_binary capsh 2> /dev/null)" /usr/sbin/capsh
395 -        # capsh wants bash and we need bash also
396 -        inst /bin/bash
397 -    else
398 -        dwarning "caps: does not work with systemd in the initramfs"
399 -    fi
400 +    inst_hook pre-pivot 00 "$moddir/caps.sh"
401 +    inst "$(find_binary capsh 2> /dev/null)" /usr/sbin/capsh
402 +    # capsh wants bash and we need bash also
403 +    inst /bin/bash
404  }
405 diff -urpa dracut-059.orig/modules.d/04watchdog/module-setup.sh dracut-059/modules.d/04watchdog/module-setup.sh
406 --- dracut-059.orig/modules.d/04watchdog/module-setup.sh        2022-12-24 17:49:27.000000000 +0100
407 +++ dracut-059/modules.d/04watchdog/module-setup.sh     2024-04-03 01:34:16.263871644 +0200
408 @@ -15,20 +15,17 @@ depends() {
409  install() {
410      # Do not add watchdog hooks if systemd module is included
411      # In that case, systemd will manage watchdog kick
412 -    if ! dracut_module_included "systemd"; then
413 -        inst_hook cmdline 00 "$moddir/watchdog.sh"
414 -        inst_hook cmdline 50 "$moddir/watchdog.sh"
415 -        inst_hook pre-trigger 00 "$moddir/watchdog.sh"
416 -        inst_hook initqueue 00 "$moddir/watchdog.sh"
417 -        inst_hook mount 00 "$moddir/watchdog.sh"
418 -        inst_hook mount 50 "$moddir/watchdog.sh"
419 -        inst_hook mount 99 "$moddir/watchdog.sh"
420 -        inst_hook pre-pivot 00 "$moddir/watchdog.sh"
421 -        inst_hook pre-pivot 99 "$moddir/watchdog.sh"
422 -        inst_hook cleanup 00 "$moddir/watchdog.sh"
423 -        inst_hook cleanup 99 "$moddir/watchdog.sh"
424 -    fi
425 -
426 +    inst_hook cmdline 00 "$moddir/watchdog.sh"
427 +    inst_hook cmdline 50 "$moddir/watchdog.sh"
428 +    inst_hook pre-trigger 00 "$moddir/watchdog.sh"
429 +    inst_hook initqueue 00 "$moddir/watchdog.sh"
430 +    inst_hook mount 00 "$moddir/watchdog.sh"
431 +    inst_hook mount 50 "$moddir/watchdog.sh"
432 +    inst_hook mount 99 "$moddir/watchdog.sh"
433 +    inst_hook pre-pivot 00 "$moddir/watchdog.sh"
434 +    inst_hook pre-pivot 99 "$moddir/watchdog.sh"
435 +    inst_hook cleanup 00 "$moddir/watchdog.sh"
436 +    inst_hook cleanup 99 "$moddir/watchdog.sh"
437      inst_hook emergency 02 "$moddir/watchdog-stop.sh"
438      inst_multiple -o wdctl
439  }
440 diff -urpa dracut-059.orig/modules.d/10i18n/console_init.sh dracut-059/modules.d/10i18n/console_init.sh
441 --- dracut-059.orig/modules.d/10i18n/console_init.sh    2022-12-24 17:49:27.000000000 +0100
442 +++ dracut-059/modules.d/10i18n/console_init.sh 2024-04-03 01:34:16.263871644 +0200
443 @@ -1,11 +1,5 @@
444  #!/bin/sh
445  
446 -[ -n "$DRACUT_SYSTEMD" ] && exit 0
447 -
448 -if [ -x "$systemdutildir"/systemd-vconsole-setup ]; then
449 -    "$systemdutildir"/systemd-vconsole-setup "$@"
450 -fi
451 -
452  [ -e /etc/vconsole.conf ] && . /etc/vconsole.conf
453  
454  DEFAULT_FONT=eurlatgr
455 diff -urpa dracut-059.orig/modules.d/10i18n/module-setup.sh dracut-059/modules.d/10i18n/module-setup.sh
456 --- dracut-059.orig/modules.d/10i18n/module-setup.sh    2022-12-24 17:49:27.000000000 +0100
457 +++ dracut-059/modules.d/10i18n/module-setup.sh 2024-04-03 01:34:16.263871644 +0200
458 @@ -18,13 +18,6 @@ depends() {
459  install() {
460      declare -A KEYMAPS
461  
462 -    if dracut_module_included "systemd"; then
463 -        unset FONT
464 -        unset KEYMAP
465 -        # shellcheck disable=SC1090
466 -        [[ -f "$dracutsysrootdir"/etc/vconsole.conf ]] && . "$dracutsysrootdir"/etc/vconsole.conf
467 -    fi
468 -
469      KBDSUBDIRS=(consolefonts consoletrans keymaps unimaps)
470      DEFAULT_FONT="${i18n_default_font:-eurlatgr}"
471      I18N_CONF="/etc/locale.conf"
472 @@ -122,11 +115,9 @@ install() {
473      install_base() {
474          inst_multiple setfont loadkeys kbd_mode stty
475  
476 -        if ! dracut_module_included "systemd"; then
477 -            inst "${moddir}"/console_init.sh /lib/udev/console_init
478 -            inst_rules "${moddir}"/10-console.rules
479 -            inst_hook cmdline 20 "${moddir}/parse-i18n.sh"
480 -        fi
481 +        inst "${moddir}"/console_init.sh /lib/udev/console_init
482 +        inst_rules "${moddir}"/10-console.rules
483 +        inst_hook cmdline 20 "${moddir}/parse-i18n.sh"
484  
485          if [[ ${kbddir} != "/usr/share" ]]; then
486              inst_dir /usr/share
487 @@ -244,17 +235,11 @@ install() {
488              inst_simple "${kbddir}"/unimaps/"${FONT_UNIMAP}".uni
489          fi
490  
491 -        if dracut_module_included "systemd" && [[ -f $dracutsysrootdir${I18N_CONF} ]]; then
492 -            inst_simple ${I18N_CONF}
493 -        else
494 -            mksubdirs "${initdir}"${I18N_CONF}
495 -            print_vars LC_ALL LANG >> "${initdir}"${I18N_CONF}
496 -        fi
497 +        mksubdirs "${initdir}"${I18N_CONF}
498 +        print_vars LC_ALL LANG >> "${initdir}"${I18N_CONF}
499  
500 -        if ! dracut_module_included "systemd"; then
501 -            mksubdirs "${initdir}"${VCONFIG_CONF}
502 -            print_vars KEYMAP EXT_KEYMAPS UNICODE FONT FONT_MAP FONT_UNIMAP >> "${initdir}"${VCONFIG_CONF}
503 -        fi
504 +        mksubdirs "${initdir}"${VCONFIG_CONF}
505 +        print_vars KEYMAP EXT_KEYMAPS UNICODE FONT FONT_MAP FONT_UNIMAP >> "${initdir}"${VCONFIG_CONF}
506  
507          return 0
508      }
509 @@ -283,11 +268,6 @@ install() {
510      if checks; then
511          install_base
512  
513 -        # https://github.com/dracutdevs/dracut/issues/796
514 -        if dracut_module_included "systemd" && [[ -f $dracutsysrootdir${VCONFIG_CONF} ]]; then
515 -            inst_simple ${VCONFIG_CONF}
516 -        fi
517 -
518          if [[ ${hostonly} ]] && ! [[ ${i18n_install_all} == "yes" ]]; then
519              install_local_i18n || install_all_kbd
520          else
521 diff -urpa dracut-059.orig/modules.d/35network-legacy/module-setup.sh dracut-059/modules.d/35network-legacy/module-setup.sh
522 --- dracut-059.orig/modules.d/35network-legacy/module-setup.sh  2022-12-24 17:49:27.000000000 +0100
523 +++ dracut-059/modules.d/35network-legacy/module-setup.sh       2024-04-03 01:50:09.792750224 +0200
524 @@ -22,12 +22,6 @@ installkernel() {
525  install() {
526      local _arch
527  
528 -    #Adding default link
529 -    if dracut_module_included "systemd"; then
530 -        inst_multiple -o "${systemdnetwork}/99-default.link"
531 -        [[ $hostonly ]] && inst_multiple -H -o "${systemdnetworkconfdir}/*.link"
532 -    fi
533 -
534      inst_multiple ip dhclient sed awk grep pgrep tr expr
535  
536      inst_multiple -o arping arping2
537 diff -urpa dracut-059.orig/modules.d/35network-legacy/net-genrules.sh dracut-059/modules.d/35network-legacy/net-genrules.sh
538 --- dracut-059.orig/modules.d/35network-legacy/net-genrules.sh  2022-12-24 17:49:27.000000000 +0100
539 +++ dracut-059/modules.d/35network-legacy/net-genrules.sh       2024-04-03 01:34:19.367913571 +0200
540 @@ -102,11 +102,8 @@ command -v fix_bootif > /dev/null || . /
541  
542          for iface in $IFACES; do
543              if [ "$bootdev" = "$iface" ] || [ "$NEEDNET" = "1" ]; then
544 -                if [ -n "$netroot" ] && [ -n "$DRACUT_SYSTEMD" ]; then
545 -                    echo "systemctl is-active initrd-root-device.target || [ -f /tmp/net.${iface}.did-setup ]"
546 -                else
547 -                    echo "[ -f /tmp/net.${iface}.did-setup ]"
548 -                fi > "$hookdir"/initqueue/finished/wait-"$iface".sh
549 +                echo "[ -f /tmp/net.${iface}.did-setup ]"
550 +                > "$hookdir"/initqueue/finished/wait-"$iface".sh
551              fi
552          done
553      # Default: We don't know the interface to use, handle all
554 diff -urpa dracut-059.orig/modules.d/40network/module-setup.sh dracut-059/modules.d/40network/module-setup.sh
555 --- dracut-059.orig/modules.d/40network/module-setup.sh 2022-12-24 17:49:27.000000000 +0100
556 +++ dracut-059/modules.d/40network/module-setup.sh      2024-04-03 01:44:08.395869097 +0200
557 @@ -9,27 +9,7 @@ check() {
558  depends() {
559      is_qemu_virtualized && echo -n "qemu-net "
560  
561 -    for module in network-wicked connman network-manager network-legacy systemd-networkd; do
562 -        if dracut_module_included "$module"; then
563 -            network_handler="$module"
564 -            break
565 -        fi
566 -    done
567 -
568 -    if [ -z "$network_handler" ]; then
569 -        if [[ -e $dracutsysrootdir$systemdsystemunitdir/wicked.service ]]; then
570 -            network_handler="network-wicked"
571 -        elif [[ -e $dracutsysrootdir$systemdsystemunitdir/connman.service ]]; then
572 -            network_handler="connman"
573 -        elif [[ -x $dracutsysrootdir/usr/libexec/nm-initrd-generator ]] || [[ -x $dracutsysrootdir/usr/lib/nm-initrd-generator ]]; then
574 -            network_handler="network-manager"
575 -        elif [[ -x $dracutsysrootdir$systemdutildir/systemd-networkd ]]; then
576 -            network_handler="systemd-networkd"
577 -        else
578 -            network_handler="network-legacy"
579 -        fi
580 -    fi
581 -    echo "kernel-network-modules $network_handler"
582 +    echo "kernel-network-modules network-legacy"
583      return 0
584  }
585  
586 diff -urpa dracut-059.orig/modules.d/40network/net-lib.sh dracut-059/modules.d/40network/net-lib.sh
587 --- dracut-059.orig/modules.d/40network/net-lib.sh      2022-12-24 17:49:27.000000000 +0100
588 +++ dracut-059/modules.d/40network/net-lib.sh   2024-04-03 01:34:19.367913571 +0200
589 @@ -59,7 +59,7 @@ iface_name() {
590  configured_ifaces() {
591      local IFACES="" iface_id="" rv=1
592      [ -e "/tmp/net.ifaces" ] && read -r IFACES < /tmp/net.ifaces
593 -    if { pidof udevd || pidof systemd-udevd; } > /dev/null; then
594 +    if { pidof udevd; } > /dev/null; then
595          for iface_id in $IFACES; do
596              printf "%s\n" "$(iface_name "$iface_id")"
597              rv=0
598 diff -urpa dracut-059.orig/modules.d/50plymouth/module-setup.sh dracut-059/modules.d/50plymouth/module-setup.sh
599 --- dracut-059.orig/modules.d/50plymouth/module-setup.sh        2022-12-24 17:49:27.000000000 +0100
600 +++ dracut-059/modules.d/50plymouth/module-setup.sh     2024-04-03 01:34:19.367913571 +0200
601 @@ -46,8 +46,6 @@ install() {
602  
603      inst_multiple plymouthd plymouth plymouth-set-default-theme
604  
605 -    if ! dracut_module_included "systemd"; then
606 -        inst_hook pre-trigger 10 "$moddir"/plymouth-pretrigger.sh
607 -        inst_hook pre-pivot 90 "$moddir"/plymouth-newroot.sh
608 -    fi
609 +    inst_hook pre-trigger 10 "$moddir"/plymouth-pretrigger.sh
610 +    inst_hook pre-pivot 90 "$moddir"/plymouth-newroot.sh
611  }
612 diff -urpa dracut-059.orig/modules.d/80test-root/module-setup.sh dracut-059/modules.d/80test-root/module-setup.sh
613 --- dracut-059.orig/modules.d/80test-root/module-setup.sh       2022-12-24 17:49:27.000000000 +0100
614 +++ dracut-059/modules.d/80test-root/module-setup.sh    2024-04-03 01:57:03.802341909 +0200
615 @@ -22,6 +22,4 @@ install() {
616      inst_binary "${dracutbasedir}/dracut-util" "/usr/bin/dracut-util"
617      ln -s dracut-util "${initdir}/usr/bin/dracut-getarg"
618      ln -s dracut-util "${initdir}/usr/bin/dracut-getargs"
619 -
620 -    inst_multiple -o plymouth
621  }
622 diff -urpa dracut-059.orig/modules.d/90btrfs/module-setup.sh dracut-059/modules.d/90btrfs/module-setup.sh
623 --- dracut-059.orig/modules.d/90btrfs/module-setup.sh   2022-12-24 17:49:27.000000000 +0100
624 +++ dracut-059/modules.d/90btrfs/module-setup.sh        2024-04-03 01:34:19.367913571 +0200
625 @@ -43,9 +43,7 @@ install() {
626          inst_rules 64-btrfs-dm.rules
627      fi
628  
629 -    if ! dracut_module_included "systemd"; then
630 -        inst_hook initqueue/timeout 10 "$moddir/btrfs_timeout.sh"
631 -    fi
632 +    inst_hook initqueue/timeout 10 "$moddir/btrfs_timeout.sh"
633  
634      inst_multiple -o btrfsck btrfs-zero-log
635      inst "$(command -v btrfs)" /sbin/btrfs
636 diff -urpa dracut-059.orig/modules.d/90crypt/crypt-lib.sh dracut-059/modules.d/90crypt/crypt-lib.sh
637 --- dracut-059.orig/modules.d/90crypt/crypt-lib.sh      2022-12-24 17:49:27.000000000 +0100
638 +++ dracut-059/modules.d/90crypt/crypt-lib.sh   2024-04-03 01:34:19.367913571 +0200
639 @@ -105,30 +105,22 @@ ask_for_password() {
640  
641      {
642          flock -s 9
643 -        # Prompt for password with plymouth, if installed and running.
644 -        if type plymouth > /dev/null 2>&1 && plymouth --ping 2> /dev/null; then
645 -            plymouth ask-for-password \
646 -                --prompt "$ply_prompt" --number-of-tries="$ply_tries" \
647 -                --command="$ply_cmd"
648 -            ret=$?
649 -        else
650 -            if [ "$tty_echo_off" = yes ]; then
651 -                stty_orig="$(stty -g)"
652 -                stty -echo
653 -            fi
654 +        if [ "$tty_echo_off" = yes ]; then
655 +            stty_orig="$(stty -g)"
656 +            stty -echo
657 +        fi
658  
659 -            local i=1
660 -            while [ $i -le "$tty_tries" ]; do
661 -                [ -n "$tty_prompt" ] \
662 -                    && printf "%s" "$tty_prompt [$i/$tty_tries]:" >&2
663 -                eval "$tty_cmd" && ret=0 && break
664 -                ret=$?
665 -                i=$((i + 1))
666 -                [ -n "$tty_prompt" ] && printf '\n' >&2
667 -            done
668 +        local i=1
669 +        while [ $i -le "$tty_tries" ]; do
670 +            [ -n "$tty_prompt" ] \
671 +                && printf "%s" "$tty_prompt [$i/$tty_tries]:" >&2
672 +            eval "$tty_cmd" && ret=0 && break
673 +            ret=$?
674 +            i=$((i + 1))
675 +            [ -n "$tty_prompt" ] && printf '\n' >&2
676 +        done
677  
678 -            [ "$tty_echo_off" = yes ] && stty "$stty_orig"
679 -        fi
680 +        [ "$tty_echo_off" = yes ] && stty "$stty_orig"
681      } 9> /.console_lock
682  
683      [ $ret -ne 0 ] && echo "Wrong password" >&2
684 diff -urpa dracut-059.orig/modules.d/90crypt/crypt-run-generator.sh dracut-059/modules.d/90crypt/crypt-run-generator.sh
685 --- dracut-059.orig/modules.d/90crypt/crypt-run-generator.sh    2022-12-24 17:49:27.000000000 +0100
686 +++ dracut-059/modules.d/90crypt/crypt-run-generator.sh 2024-04-03 01:34:19.367913571 +0200
687 @@ -11,7 +11,7 @@ crypttab_contains "$luks" "$dev" && exit
688  allowdiscards="-"
689  
690  # parse for allow-discards
691 -if [ -n "$DRACUT_SYSTEMD" ] || strstr "$(cryptsetup --help)" "allow-discards"; then
692 +if strstr "$(cryptsetup --help)" "allow-discards"; then
693      if discarduuids=$(getargs "rd.luks.allow-discards"); then
694          discarduuids=$(str_replace "$discarduuids" 'luks-' '')
695          if strstr " $discarduuids " " ${luks##luks-}"; then
696 @@ -24,8 +24,4 @@ fi
697  
698  echo "$luks $dev - timeout=0,$allowdiscards" >> /etc/crypttab
699  
700 -if command -v systemctl > /dev/null; then
701 -    systemctl daemon-reload
702 -    systemctl start cryptsetup.target
703 -fi
704  exit 0
705 diff -urpa dracut-059.orig/modules.d/90crypt/module-setup.sh dracut-059/modules.d/90crypt/module-setup.sh
706 --- dracut-059.orig/modules.d/90crypt/module-setup.sh   2024-04-03 01:32:59.746838184 +0200
707 +++ dracut-059/modules.d/90crypt/module-setup.sh        2024-04-03 01:34:19.367913571 +0200
708 @@ -4,7 +4,7 @@
709  check() {
710      local fs
711      # if cryptsetup is not installed, then we cannot support encrypted devices.
712 -    require_any_binary "$systemdutildir"/systemd-cryptsetup cryptsetup || return 1
713 +    require_any_binary cryptsetup || return 1
714  
715      [[ $hostonly ]] || [[ $mount_needs ]] && {
716          for fs in "${host_fs_types[@]}"; do
717 @@ -20,17 +20,6 @@ check() {
718  depends() {
719      local deps
720      deps="dm rootfs-block"
721 -    if [[ $hostonly && -f "$dracutsysrootdir"/etc/crypttab ]]; then
722 -        if grep -q -e "fido2-device=" -e "fido2-cid=" "$dracutsysrootdir"/etc/crypttab; then
723 -            deps+=" fido2"
724 -        fi
725 -        if grep -q "pkcs11-uri" "$dracutsysrootdir"/etc/crypttab; then
726 -            deps+=" pkcs11"
727 -        fi
728 -        if grep -q "tpm2-device=" "$dracutsysrootdir"/etc/crypttab; then
729 -            deps+=" tpm2-tss"
730 -        fi
731 -    fi
732      echo "$deps"
733      return 0
734  }
735 @@ -96,13 +85,11 @@ install() {
736      fi
737  
738      inst_hook cmdline 30 "$moddir/parse-crypt.sh"
739 -    if ! dracut_module_included "systemd"; then
740 -        inst_multiple cryptsetup rmdir readlink umount
741 -        inst_script "$moddir"/cryptroot-ask.sh /sbin/cryptroot-ask
742 -        inst_script "$moddir"/probe-keydev.sh /sbin/probe-keydev
743 -        inst_hook cmdline 10 "$moddir/parse-keydev.sh"
744 -        inst_hook cleanup 30 "$moddir/crypt-cleanup.sh"
745 -    fi
746 +    inst_multiple cryptsetup rmdir readlink umount
747 +    inst_script "$moddir"/cryptroot-ask.sh /sbin/cryptroot-ask
748 +    inst_script "$moddir"/probe-keydev.sh /sbin/probe-keydev
749 +    inst_hook cmdline 10 "$moddir/parse-keydev.sh"
750 +    inst_hook cleanup 30 "$moddir/crypt-cleanup.sh"
751  
752      if [[ $hostonly ]] && [[ -f $dracutsysrootdir/etc/crypttab ]]; then
753          # filter /etc/crypttab for the devices we need
754 @@ -176,21 +163,5 @@ install() {
755      inst_simple "$moddir/crypt-lib.sh" "/lib/dracut-crypt-lib.sh"
756      inst_script "$moddir/crypt-run-generator.sh" "/sbin/crypt-run-generator"
757  
758 -    if dracut_module_included "systemd"; then
759 -        # the cryptsetup targets are already pulled in by 00systemd, but not
760 -        # the enablement symlinks
761 -        inst_multiple -o \
762 -            "$tmpfilesdir"/cryptsetup.conf \
763 -            "$systemdutildir"/system-generators/systemd-cryptsetup-generator \
764 -            "$systemdutildir"/systemd-cryptsetup \
765 -            "$systemdsystemunitdir"/systemd-ask-password-console.path \
766 -            "$systemdsystemunitdir"/systemd-ask-password-console.service \
767 -            "$systemdsystemunitdir"/cryptsetup.target \
768 -            "$systemdsystemunitdir"/sysinit.target.wants/cryptsetup.target \
769 -            "$systemdsystemunitdir"/remote-cryptsetup.target \
770 -            "$systemdsystemunitdir"/initrd-root-device.target.wants/remote-cryptsetup.target \
771 -            systemd-ask-password systemd-tty-ask-password-agent
772 -    fi
773 -
774      dracut_need_initqueue
775  }
776 diff -urpa dracut-059.orig/modules.d/90crypt/parse-crypt.sh dracut-059/modules.d/90crypt/parse-crypt.sh
777 --- dracut-059.orig/modules.d/90crypt/parse-crypt.sh    2022-12-24 17:49:27.000000000 +0100
778 +++ dracut-059/modules.d/90crypt/parse-crypt.sh 2024-04-03 01:40:00.012514381 +0200
779 @@ -36,12 +36,6 @@ else
780      LUKS=$(getargs rd.luks.uuid -d rd_LUKS_UUID)
781      tout=$(getarg rd.luks.key.tout)
782  
783 -    if [ -e /etc/crypttab ]; then
784 -        while read -r _ _dev _ || [ -n "$_dev" ]; do
785 -            set_systemd_timeout_for_dev "$_dev"
786 -        done < /etc/crypttab
787 -    fi
788 -
789      if [ -n "$PARTUUID" ]; then
790          for uuid in $PARTUUID; do
791  
792 @@ -58,28 +52,13 @@ else
793                  luksname="luks-$uuid"
794              fi
795  
796 -            if [ -z "$DRACUT_SYSTEMD" ]; then
797 -                {
798 -                    printf -- 'ENV{ID_PART_ENTRY_UUID}=="*%s*", ' "$uuid"
799 -                    printf -- 'RUN+="%s --settled --unique --onetime ' "$(command -v initqueue)"
800 -                    printf -- '--name cryptroot-ask-%%k %s ' "$(command -v cryptroot-ask)"
801 -                    # shellcheck disable=SC2016
802 -                    printf -- '$env{DEVNAME} %s %s %s"\n' "$luksname" "$is_keysource" "$tout"
803 -                } >> /etc/udev/rules.d/70-luks.rules.new
804 -            else
805 -                luksname=$(dev_unit_name "$luksname")
806 -                # shellcheck disable=SC1003
807 -                luksname="$(str_replace "$luksname" '\' '\\')"
808 -
809 -                if ! crypttab_contains "$uuid"; then
810 -                    {
811 -                        printf -- 'ENV{ID_PART_ENTRY_UUID}=="*%s*", ' "$uuid"
812 -                        printf -- 'RUN+="%s --settled --unique --onetime ' "$(command -v initqueue)"
813 -                        printf -- '--name systemd-cryptsetup-%%k %s start ' "$(command -v systemctl)"
814 -                        printf -- 'systemd-cryptsetup@%s.service"\n' "$luksname"
815 -                    } >> /etc/udev/rules.d/70-luks.rules.new
816 -                fi
817 -            fi
818 +            {
819 +                printf -- 'ENV{ID_PART_ENTRY_UUID}=="*%s*", ' "$uuid"
820 +                printf -- 'RUN+="%s --settled --unique --onetime ' "$(command -v initqueue)"
821 +                printf -- '--name cryptroot-ask-%%k %s ' "$(command -v cryptroot-ask)"
822 +                # shellcheck disable=SC2016
823 +                printf -- '$env{DEVNAME} %s %s %s"\n' "$luksname" "$is_keysource" "$tout"
824 +            } >> /etc/udev/rules.d/70-luks.rules.new
825          done
826  
827      elif [ -n "$SERIAL" ]; then
828 @@ -98,28 +77,13 @@ else
829                  luksname="luks-$serialid"
830              fi
831  
832 -            if [ -z "$DRACUT_SYSTEMD" ]; then
833 -                {
834 -                    printf -- 'ENV{ID_SERIAL_SHORT}=="*%s*", ' "$serialid"
835 -                    printf -- 'RUN+="%s --settled --unique --onetime ' "$(command -v initqueue)"
836 -                    printf -- '--name cryptroot-ask-%%k %s ' "$(command -v cryptroot-ask)"
837 -                    # shellcheck disable=SC2016
838 -                    printf -- '$env{DEVNAME} %s %s %s"\n' "$luksname" "$is_keysource" "$tout"
839 -                } >> /etc/udev/rules.d/70-luks.rules.new
840 -            else
841 -                luksname=$(dev_unit_name "$luksname")
842 -                # shellcheck disable=SC1003
843 -                luksname="$(str_replace "$luksname" '\' '\\')"
844 -
845 -                if ! crypttab_contains "$serialid"; then
846 -                    {
847 -                        printf -- 'ENV{ID_SERIAL_SHORT}=="*%s*", ' "$serialid"
848 -                        printf -- 'RUN+="%s --settled --unique --onetime ' "$(command -v initqueue)"
849 -                        printf -- '--name systemd-cryptsetup-%%k %s start ' "$(command -v systemctl)"
850 -                        printf -- 'systemd-cryptsetup@%s.service"\n' "$luksname"
851 -                    } >> /etc/udev/rules.d/70-luks.rules.new
852 -                fi
853 -            fi
854 +            {
855 +                printf -- 'ENV{ID_SERIAL_SHORT}=="*%s*", ' "$serialid"
856 +                printf -- 'RUN+="%s --settled --unique --onetime ' "$(command -v initqueue)"
857 +                printf -- '--name cryptroot-ask-%%k %s ' "$(command -v cryptroot-ask)"
858 +                # shellcheck disable=SC2016
859 +                printf -- '$env{DEVNAME} %s %s %s"\n' "$luksname" "$is_keysource" "$tout"
860 +            } >> /etc/udev/rules.d/70-luks.rules.new
861          done
862  
863      elif [ -n "$LUKS" ]; then
864 @@ -138,30 +102,14 @@ else
865                  luksname="luks-$luksid"
866              fi
867  
868 -            if [ -z "$DRACUT_SYSTEMD" ]; then
869 -                {
870 -                    printf -- 'ENV{ID_FS_TYPE}=="crypto_LUKS", '
871 -                    printf -- 'ENV{ID_FS_UUID}=="*%s*", ' "$luksid"
872 -                    printf -- 'RUN+="%s --settled --unique --onetime ' "$(command -v initqueue)"
873 -                    printf -- '--name cryptroot-ask-%%k %s ' "$(command -v cryptroot-ask)"
874 -                    # shellcheck disable=SC2016
875 -                    printf -- '$env{DEVNAME} %s %s %s"\n' "$luksname" "$is_keysource" "$tout"
876 -                } >> /etc/udev/rules.d/70-luks.rules.new
877 -            else
878 -                luksname=$(dev_unit_name "$luksname")
879 -                # shellcheck disable=SC1003
880 -                luksname="$(str_replace "$luksname" '\' '\\')"
881 -
882 -                if ! crypttab_contains "$luksid"; then
883 -                    {
884 -                        printf -- 'ENV{ID_FS_TYPE}=="crypto_LUKS", '
885 -                        printf -- 'ENV{ID_FS_UUID}=="*%s*", ' "$luksid"
886 -                        printf -- 'RUN+="%s --settled --unique --onetime ' "$(command -v initqueue)"
887 -                        printf -- '--name systemd-cryptsetup-%%k %s start ' "$(command -v systemctl)"
888 -                        printf -- 'systemd-cryptsetup@%s.service"\n' "$luksname"
889 -                    } >> /etc/udev/rules.d/70-luks.rules.new
890 -                fi
891 -            fi
892 +            {
893 +                printf -- 'ENV{ID_FS_TYPE}=="crypto_LUKS", '
894 +                printf -- 'ENV{ID_FS_UUID}=="*%s*", ' "$luksid"
895 +                printf -- 'RUN+="%s --settled --unique --onetime ' "$(command -v initqueue)"
896 +                printf -- '--name cryptroot-ask-%%k %s ' "$(command -v cryptroot-ask)"
897 +                # shellcheck disable=SC2016
898 +                printf -- '$env{DEVNAME} %s %s %s"\n' "$luksname" "$is_keysource" "$tout"
899 +            } >> /etc/udev/rules.d/70-luks.rules.new
900  
901              if [ $is_keysource -eq 0 ]; then
902                  uuid=$luksid
903 @@ -175,21 +123,12 @@ else
904              fi
905          done
906      elif getargbool 0 rd.auto; then
907 -        if [ -z "$DRACUT_SYSTEMD" ]; then
908 -            {
909 -                printf -- 'ENV{ID_FS_TYPE}=="crypto_LUKS", RUN+="%s ' "$(command -v initqueue)"
910 -                printf -- '--unique --settled --onetime --name cryptroot-ask-%%k '
911 -                # shellcheck disable=SC2016
912 -                printf -- '%s $env{DEVNAME} luks-$env{ID_FS_UUID} 0 %s"\n' "$(command -v cryptroot-ask)" "$tout"
913 -            } >> /etc/udev/rules.d/70-luks.rules.new
914 -        else
915 -            {
916 -                printf -- 'ENV{ID_FS_TYPE}=="crypto_LUKS", RUN+="%s ' "$(command -v initqueue)"
917 -                printf -- '--unique --settled --onetime --name crypt-run-generator-%%k '
918 -                # shellcheck disable=SC2016
919 -                printf -- '%s $env{DEVNAME} luks-$env{ID_FS_UUID}"\n' "$(command -v crypt-run-generator)"
920 -            } >> /etc/udev/rules.d/70-luks.rules.new
921 -        fi
922 +        {
923 +            printf -- 'ENV{ID_FS_TYPE}=="crypto_LUKS", RUN+="%s ' "$(command -v initqueue)"
924 +            printf -- '--unique --settled --onetime --name crypt-run-generator-%%k '
925 +            # shellcheck disable=SC2016
926 +            printf -- '%s $env{DEVNAME} luks-$env{ID_FS_UUID}"\n' "$(command -v crypt-run-generator)"
927 +        } >> /etc/udev/rules.d/70-luks.rules.new
928      fi
929  
930      echo 'LABEL="luks_end"' >> /etc/udev/rules.d/70-luks.rules.new
931 diff -urpa dracut-059.orig/modules.d/90dmsquash-live/dmsquash-live-root.sh dracut-059/modules.d/90dmsquash-live/dmsquash-live-root.sh
932 --- dracut-059.orig/modules.d/90dmsquash-live/dmsquash-live-root.sh     2022-12-24 17:49:27.000000000 +0100
933 +++ dracut-059/modules.d/90dmsquash-live/dmsquash-live-root.sh  2024-04-03 01:47:30.930604587 +0200
934 @@ -67,18 +67,11 @@ if [ "$fs" = "iso9660" -o "$fs" = "udf"
935  fi
936  getarg rd.live.check -d check || check=""
937  if [ -n "$check" ]; then
938 -    type plymouth > /dev/null 2>&1 && plymouth --hide-splash
939 -    if [ -n "$DRACUT_SYSTEMD" ]; then
940 -        p=$(dev_unit_name "$check_dev")
941 -        systemctl start checkisomd5@"${p}".service
942 -    else
943 -        checkisomd5 --verbose "$check_dev"
944 -    fi
945 +    checkisomd5 --verbose "$check_dev"
946      if [ $? -eq 1 ]; then
947          die "CD check failed!"
948          exit 1
949      fi
950 -    type plymouth > /dev/null 2>&1 && plymouth --show-splash
951  fi
952  
953  ln -s "$livedev" /run/initramfs/livedev
954 @@ -168,7 +161,6 @@ do_live_overlay() {
955                  fi
956                  if [ -n "$overlayfs" ]; then
957                      unset -v overlayfs
958 -                    [ -n "$DRACUT_SYSTEMD" ] && reloadsysrootmountunit=":>/xor_overlayfs;"
959                  fi
960                  setup="yes"
961              else
962 @@ -177,9 +169,6 @@ do_live_overlay() {
963                      && [ -d /run/initramfs/overlayfs/ovlwork ]; then
964                      ln -s /run/initramfs/overlayfs/overlayfs /run/overlayfs${readonly_overlay:+-r}
965                      ln -s /run/initramfs/overlayfs/ovlwork /run/ovlwork${readonly_overlay:+-r}
966 -                    if [ -z "$overlayfs" ] && [ -n "$DRACUT_SYSTEMD" ]; then
967 -                        reloadsysrootmountunit=":>/xor_overlayfs;"
968 -                    fi
969                      overlayfs="required"
970                      setup="yes"
971                  fi
972 @@ -188,9 +177,6 @@ do_live_overlay() {
973              && [ -d /run/initramfs/overlayfs$pathspec/../ovlwork ]; then
974              ln -s /run/initramfs/overlayfs$pathspec /run/overlayfs${readonly_overlay:+-r}
975              ln -s /run/initramfs/overlayfs$pathspec/../ovlwork /run/ovlwork${readonly_overlay:+-r}
976 -            if [ -z "$overlayfs" ] && [ -n "$DRACUT_SYSTEMD" ]; then
977 -                reloadsysrootmountunit=":>/xor_overlayfs;"
978 -            fi
979              overlayfs="required"
980              setup="yes"
981          fi
982 @@ -201,7 +187,6 @@ do_live_overlay() {
983                  die "OverlayFS is required but not available."
984                  exit 1
985              fi
986 -            [ -n "$DRACUT_SYSTEMD" ] && reloadsysrootmountunit=":>/xor_overlayfs;"
987              m='OverlayFS is not available; using temporary Device-mapper overlay.'
988              info "$m"
989              unset -v overlayfs setup
990 @@ -218,40 +203,13 @@ do_live_overlay() {
991        All root filesystem changes will be lost on shutdown.
992           Press [Enter] to continue.'
993              printf "\n\n\n\n%s\n\n\n" "${m}" > /dev/kmsg
994 -            if [ -n "$DRACUT_SYSTEMD" ]; then
995 -                if type plymouth > /dev/null 2>&1 && plymouth --ping; then
996 -                    if getargbool 0 rhgb || getargbool 0 splash; then
997 -                        m='>>>
998 ->>>
999 ->>>
1000 -
1001 -
1002 -'"$m"
1003 -                        m="${m%n.*}"'n.
1004 -
1005 -
1006 -<<<
1007 -<<<
1008 -<<<'
1009 -                        plymouth display-message --text="${m}"
1010 -                    else
1011 -                        plymouth ask-question --prompt="${m}" --command=true
1012 -                    fi
1013 -                else
1014 -                    m=">>>$(printf '%s' "$m" | tr -d '\n')  <<<"
1015 -                    systemd-ask-password --timeout=0 "${m}"
1016 -                fi
1017 -            else
1018 -                type plymouth > /dev/null 2>&1 && plymouth --ping && plymouth --quit
1019 -                printf '\n\n%s' "$m"
1020 -                read -r _
1021 -            fi
1022 +            printf '\n\n%s' "$m"
1023 +            read -r _
1024          fi
1025          if [ -n "$overlayfs" ]; then
1026              if [ -n "$readonly_overlay" ] && ! [ -h /run/overlayfs-r ]; then
1027                  info "No persistent overlay found."
1028                  unset -v readonly_overlay
1029 -                [ -n "$DRACUT_SYSTEMD" ] && reloadsysrootmountunit="${reloadsysrootmountunit}:>/xor_readonly;"
1030              fi
1031          else
1032              dd if=/dev/null of=/overlay bs=1024 count=1 seek=$((overlay_size * 1024)) 2> /dev/null
1033 @@ -334,9 +292,6 @@ if [ -e "$SQUASHED" ]; then
1034          fi
1035      elif [ -d /run/initramfs/squashfs/proc ]; then
1036          FSIMG=$SQUASHED
1037 -        if [ -z "$overlayfs" ] && [ -n "$DRACUT_SYSTEMD" ]; then
1038 -            reloadsysrootmountunit=":>/xor_overlayfs;"
1039 -        fi
1040          overlayfs="required"
1041      else
1042          die "Failed to find a root filesystem in $SQUASHED."
1043 @@ -411,10 +366,8 @@ if [ -n "$overlayfs" ]; then
1044          ln -sf /run/initramfs/live /run/rootfsbase
1045      fi
1046  else
1047 -    if [ -z "$DRACUT_SYSTEMD" ]; then
1048 -        [ -n "$ROOTFLAGS" ] && ROOTFLAGS="-o $ROOTFLAGS"
1049 -        printf 'mount %s /dev/mapper/live-rw %s\n' "$ROOTFLAGS" "$NEWROOT" > "$hookdir"/mount/01-$$-live.sh
1050 -    fi
1051 +    [ -n "$ROOTFLAGS" ] && ROOTFLAGS="-o $ROOTFLAGS"
1052 +    printf 'mount %s /dev/mapper/live-rw %s\n' "$ROOTFLAGS" "$NEWROOT" > "$hookdir"/mount/01-$$-live.sh
1053  fi
1054  [ -e "$SQUASHED" ] && umount -l /run/initramfs/squashfs
1055  
1056 diff -urpa dracut-059.orig/modules.d/90dmsquash-live/module-setup.sh dracut-059/modules.d/90dmsquash-live/module-setup.sh
1057 --- dracut-059.orig/modules.d/90dmsquash-live/module-setup.sh   2022-12-24 17:49:27.000000000 +0100
1058 +++ dracut-059/modules.d/90dmsquash-live/module-setup.sh        2024-04-03 01:44:29.724157165 +0200
1059 @@ -31,9 +31,5 @@ install() {
1060      inst_hook pre-pivot 20 "$moddir/apply-live-updates.sh"
1061      inst_script "$moddir/dmsquash-live-root.sh" "/sbin/dmsquash-live-root"
1062      inst_script "$moddir/iso-scan.sh" "/sbin/iso-scan"
1063 -    if dracut_module_included "systemd-initrd"; then
1064 -        inst_script "$moddir/dmsquash-generator.sh" "$systemdutildir"/system-generators/dracut-dmsquash-generator
1065 -        inst_simple "$moddir/checkisomd5@.service" "/etc/systemd/system/checkisomd5@.service"
1066 -    fi
1067      dracut_need_initqueue
1068  }
1069 diff -urpa dracut-059.orig/modules.d/90kernel-modules/module-setup.sh dracut-059/modules.d/90kernel-modules/module-setup.sh
1070 --- dracut-059.orig/modules.d/90kernel-modules/module-setup.sh  2022-12-24 17:49:27.000000000 +0100
1071 +++ dracut-059/modules.d/90kernel-modules/module-setup.sh       2024-04-03 01:34:19.367913571 +0200
1072 @@ -144,9 +144,7 @@ install() {
1073      [[ -d /lib/modprobe.d ]] && inst_multiple -o "/lib/modprobe.d/*.conf"
1074      [[ -d /usr/lib/modprobe.d ]] && inst_multiple -o "/usr/lib/modprobe.d/*.conf"
1075      [[ $hostonly ]] && inst_multiple -H -o /etc/modprobe.d/*.conf /etc/modprobe.conf
1076 -    if ! dracut_module_included "systemd"; then
1077 -        inst_hook cmdline 01 "$moddir/parse-kernel.sh"
1078 -    fi
1079 +    inst_hook cmdline 01 "$moddir/parse-kernel.sh"
1080      inst_simple "$moddir/insmodpost.sh" /sbin/insmodpost.sh
1081      inst_multiple -o sysctl
1082  }
1083 diff -urpa dracut-059.orig/modules.d/90livenet/module-setup.sh dracut-059/modules.d/90livenet/module-setup.sh
1084 --- dracut-059.orig/modules.d/90livenet/module-setup.sh 2022-12-24 17:49:27.000000000 +0100
1085 +++ dracut-059/modules.d/90livenet/module-setup.sh      2024-04-03 01:34:19.367913571 +0200
1086 @@ -17,8 +17,5 @@ install() {
1087      inst_hook cmdline 29 "$moddir/parse-livenet.sh"
1088      inst_hook initqueue/online 95 "$moddir/fetch-liveupdate.sh"
1089      inst_script "$moddir/livenetroot.sh" "/sbin/livenetroot"
1090 -    if dracut_module_included "systemd-initrd"; then
1091 -        inst_script "$moddir/livenet-generator.sh" "$systemdutildir"/system-generators/dracut-livenet-generator
1092 -    fi
1093      dracut_need_initqueue
1094  }
1095 diff -urpa dracut-059.orig/modules.d/90mdraid/module-setup.sh dracut-059/modules.d/90mdraid/module-setup.sh
1096 --- dracut-059.orig/modules.d/90mdraid/module-setup.sh  2022-12-24 17:49:27.000000000 +0100
1097 +++ dracut-059/modules.d/90mdraid/module-setup.sh       2024-04-03 01:34:19.367913571 +0200
1098 @@ -121,20 +121,6 @@ install() {
1099      inst_hook shutdown 30 "$moddir/md-shutdown.sh"
1100      inst_script "$moddir/mdraid-cleanup.sh" /sbin/mdraid-cleanup
1101      inst_script "$moddir/mdraid_start.sh" /sbin/mdraid_start
1102 -    if dracut_module_included "systemd"; then
1103 -        if [[ -e $dracutsysrootdir$systemdsystemunitdir/mdmon@.service ]]; then
1104 -            inst_simple "$systemdsystemunitdir"/mdmon@.service
1105 -        fi
1106 -        if [[ -e $dracutsysrootdir$systemdsystemunitdir/mdadm-last-resort@.service ]]; then
1107 -            inst_simple "$systemdsystemunitdir"/mdadm-last-resort@.service
1108 -        fi
1109 -        if [[ -e $dracutsysrootdir$systemdsystemunitdir/mdadm-last-resort@.timer ]]; then
1110 -            inst_simple "$systemdsystemunitdir"/mdadm-last-resort@.timer
1111 -        fi
1112 -        if [[ -e $dracutsysrootdir$systemdsystemunitdir/mdadm-grow-continue@.service ]]; then
1113 -            inst_simple "$systemdsystemunitdir"/mdadm-grow-continue@.service
1114 -        fi
1115 -    fi
1116      inst_hook pre-shutdown 30 "$moddir/mdmon-pre-shutdown.sh"
1117      dracut_need_initqueue
1118  }
1119 diff -urpa dracut-059.orig/modules.d/90multipath/module-setup.sh dracut-059/modules.d/90multipath/module-setup.sh
1120 --- dracut-059.orig/modules.d/90multipath/module-setup.sh       2022-12-24 17:49:27.000000000 +0100
1121 +++ dracut-059/modules.d/90multipath/module-setup.sh    2024-04-03 01:39:20.659982879 +0200
1122 @@ -132,18 +132,8 @@ install() {
1123          [[ $_conf ]] && echo "$_conf" >> "${initdir}/etc/cmdline.d/90multipath.conf"
1124      fi
1125  
1126 -    if dracut_module_included "systemd"; then
1127 -        if mpathconf_installed; then
1128 -            inst_simple "${moddir}/multipathd-configure.service" "${systemdsystemunitdir}/multipathd-configure.service"
1129 -            $SYSTEMCTL -q --root "$initdir" enable multipathd-configure.service
1130 -        fi
1131 -        inst_simple "${systemdsystemunitdir}/multipathd.socket"
1132 -        inst_simple "${moddir}/multipathd.service" "${systemdsystemunitdir}/multipathd.service"
1133 -        $SYSTEMCTL -q --root "$initdir" enable multipathd.service
1134 -    else
1135 -        inst_hook pre-trigger 02 "$moddir/multipathd.sh"
1136 -        inst_hook cleanup 02 "$moddir/multipathd-stop.sh"
1137 -    fi
1138 +    inst_hook pre-trigger 02 "$moddir/multipathd.sh"
1139 +    inst_hook cleanup 02 "$moddir/multipathd-stop.sh"
1140  
1141      inst_hook cleanup 80 "$moddir/multipathd-needshutdown.sh"
1142      inst_hook shutdown 20 "$moddir/multipath-shutdown.sh"
1143 diff -urpa dracut-059.orig/modules.d/91zipl/install_zipl_cmdline.sh dracut-059/modules.d/91zipl/install_zipl_cmdline.sh
1144 --- dracut-059.orig/modules.d/91zipl/install_zipl_cmdline.sh    2022-12-24 17:49:27.000000000 +0100
1145 +++ dracut-059/modules.d/91zipl/install_zipl_cmdline.sh 2024-04-03 01:34:19.367913571 +0200
1146 @@ -30,10 +30,6 @@ fi
1147  
1148  umount ${MNT}
1149  
1150 -if [ -f /etc/cmdline.d/99zipl.conf ]; then
1151 -    systemctl restart dracut-cmdline.service
1152 -    systemctl restart systemd-udev-trigger.service
1153 -fi
1154  : > /tmp/install.zipl.cmdline-done
1155  
1156  exit 0
1157 diff -urpa dracut-059.orig/modules.d/95debug/module-setup.sh dracut-059/modules.d/95debug/module-setup.sh
1158 --- dracut-059.orig/modules.d/95debug/module-setup.sh   2022-12-24 17:49:27.000000000 +0100
1159 +++ dracut-059/modules.d/95debug/module-setup.sh        2024-04-03 01:40:31.656941777 +0200
1160 @@ -15,7 +15,7 @@ depends() {
1161  install() {
1162      inst_multiple -o ls ps grep more cat rm strace free showmount df du lsblk \
1163          ping netstat rpcinfo vi scp ping6 ssh find chroot \
1164 -        tcpdump cp dd less hostname mkdir systemd-analyze \
1165 +        tcpdump cp dd less hostname mkdir \
1166          fsck fsck.ext2 fsck.ext4 fsck.ext3 fsck.ext4dev fsck.f2fs fsck.vfat e2fsck
1167  
1168      grep '^tcpdump:' "$dracutsysrootdir"/etc/passwd 2> /dev/null >> "$initdir/etc/passwd"
1169 diff -urpa dracut-059.orig/modules.d/95fcoe/cleanup-fcoe.sh dracut-059/modules.d/95fcoe/cleanup-fcoe.sh
1170 --- dracut-059.orig/modules.d/95fcoe/cleanup-fcoe.sh    2022-12-24 17:49:27.000000000 +0100
1171 +++ dracut-059/modules.d/95fcoe/cleanup-fcoe.sh 2024-04-03 01:34:19.399914002 +0200
1172 @@ -6,10 +6,8 @@ if [ -e /var/run/lldpad.pid ]; then
1173      lldpad -k
1174      # with systemd version 230, this is not necessary anymore
1175      # systemd commit cacf980ed44a28e276a6cc7f8fc41f991e2ab354
1176 -    if [ -z "$DRACUT_SYSTEMD" ]; then
1177 -        # shellcheck disable=SC2174
1178 -        mkdir -m 0755 -p /run/initramfs/state/dev/shm
1179 -        cp /dev/shm/lldpad.state /run/initramfs/state/dev/shm/ > /dev/null 2>&1
1180 -        echo "files /dev/shm/lldpad.state" >> /run/initramfs/rwtab
1181 -    fi
1182 +    # shellcheck disable=SC2174
1183 +    mkdir -m 0755 -p /run/initramfs/state/dev/shm
1184 +    cp /dev/shm/lldpad.state /run/initramfs/state/dev/shm/ > /dev/null 2>&1
1185 +    echo "files /dev/shm/lldpad.state" >> /run/initramfs/rwtab
1186  fi
1187 diff -urpa dracut-059.orig/modules.d/95fstab-sys/mount-sys.sh dracut-059/modules.d/95fstab-sys/mount-sys.sh
1188 --- dracut-059.orig/modules.d/95fstab-sys/mount-sys.sh  2022-12-24 17:49:27.000000000 +0100
1189 +++ dracut-059/modules.d/95fstab-sys/mount-sys.sh       2024-04-03 01:34:19.399914002 +0200
1190 @@ -27,9 +27,7 @@ fstab_mount() {
1191  
1192  # systemd will mount and run fsck from /etc/fstab and we don't want to
1193  # run into a race condition.
1194 -if [ -z "$DRACUT_SYSTEMD" ]; then
1195 -    [ -f /etc/fstab ] && fstab_mount /etc/fstab
1196 -fi
1197 +[ -f /etc/fstab ] && fstab_mount /etc/fstab
1198  
1199  # prefer $NEWROOT/etc/fstab.sys over local /etc/fstab.sys
1200  if [ -f "$NEWROOT"/etc/fstab.sys ]; then
1201 diff -urpa dracut-059.orig/modules.d/95iscsi/cleanup-iscsi.sh dracut-059/modules.d/95iscsi/cleanup-iscsi.sh
1202 --- dracut-059.orig/modules.d/95iscsi/cleanup-iscsi.sh  2022-12-24 17:49:27.000000000 +0100
1203 +++ dracut-059/modules.d/95iscsi/cleanup-iscsi.sh       2024-04-03 01:34:19.399914002 +0200
1204 @@ -1,5 +1,5 @@
1205  #!/bin/sh
1206  
1207 -if [ -z "${DRACUT_SYSTEMD}" ] && { [ -e /sys/module/bnx2i ] || [ -e /sys/module/qedi ]; }; then
1208 +if { [ -e /sys/module/bnx2i ] || [ -e /sys/module/qedi ]; }; then
1209      killproc iscsiuio
1210  fi
1211 diff -urpa dracut-059.orig/modules.d/95iscsi/iscsiroot.sh dracut-059/modules.d/95iscsi/iscsiroot.sh
1212 --- dracut-059.orig/modules.d/95iscsi/iscsiroot.sh      2022-12-24 17:49:27.000000000 +0100
1213 +++ dracut-059/modules.d/95iscsi/iscsiroot.sh   2024-04-03 01:34:19.399914002 +0200
1214 @@ -37,8 +37,7 @@ iroot=${iroot#:}
1215  modprobe crc32c 2> /dev/null
1216  
1217  # start iscsiuio if needed
1218 -if [ -z "${DRACUT_SYSTEMD}" ] \
1219 -    && { [ -e /sys/module/bnx2i ] || [ -e /sys/module/qedi ]; } \
1220 +if { [ -e /sys/module/bnx2i ] || [ -e /sys/module/qedi ]; } \
1221      && ! [ -e /tmp/iscsiuio-started ]; then
1222      iscsiuio
1223      : > /tmp/iscsiuio-started
1224 @@ -150,11 +149,6 @@ handle_netroot() {
1225          mkdir -p /etc/iscsi
1226          ln -fs /run/initiatorname.iscsi /etc/iscsi/initiatorname.iscsi
1227          : > /tmp/iscsi_set_initiator
1228 -        if [ -n "$DRACUT_SYSTEMD" ]; then
1229 -            systemctl try-restart iscsid
1230 -            # FIXME: iscsid is not yet ready, when the service is :-/
1231 -            sleep 1
1232 -        fi
1233      fi
1234  
1235      if [ -z "$iscsi_initiator" ]; then
1236 @@ -171,11 +165,6 @@ handle_netroot() {
1237          mkdir -p /etc/iscsi
1238          ln -fs /run/initiatorname.iscsi /etc/iscsi/initiatorname.iscsi
1239          : > /tmp/iscsi_set_initiator
1240 -        if [ -n "$DRACUT_SYSTEMD" ]; then
1241 -            systemctl try-restart iscsid
1242 -            # FIXME: iscsid is not yet ready, when the service is :-/
1243 -            sleep 1
1244 -        fi
1245      fi
1246  
1247      if [ -z "$iscsi_target_port" ]; then
1248 @@ -195,17 +184,10 @@ handle_netroot() {
1249      if ! [ -e /etc/iscsi/initiatorname.iscsi ]; then
1250          mkdir -p /etc/iscsi
1251          ln -fs /run/initiatorname.iscsi /etc/iscsi/initiatorname.iscsi
1252 -        if [ -n "$DRACUT_SYSTEMD" ]; then
1253 -            systemctl try-restart iscsid
1254 -            # FIXME: iscsid is not yet ready, when the service is :-/
1255 -            sleep 1
1256 -        fi
1257      fi
1258  
1259 -    if [ -z "$DRACUT_SYSTEMD" ]; then
1260 -        iscsid
1261 -        sleep 2
1262 -    fi
1263 +    iscsid
1264 +    sleep 2
1265  
1266      # FIXME $iscsi_protocol??
1267  
1268 @@ -217,8 +199,7 @@ handle_netroot() {
1269          wait_for_dev -n /dev/root
1270  
1271          # install mount script
1272 -        [ -z "$DRACUT_SYSTEMD" ] \
1273 -            && echo "iscsi_lun=$iscsi_lun . /bin/mount-lun.sh " > "$hookdir"/mount/01-$$-iscsi.sh
1274 +        echo "iscsi_lun=$iscsi_lun . /bin/mount-lun.sh " > "$hookdir"/mount/01-$$-iscsi.sh
1275      fi
1276  
1277      if strglobin "$iscsi_target_ip" '*:*:*' && ! strglobin "$iscsi_target_ip" '['; then
1278 diff -urpa dracut-059.orig/modules.d/95iscsi/module-setup.sh dracut-059/modules.d/95iscsi/module-setup.sh
1279 --- dracut-059.orig/modules.d/95iscsi/module-setup.sh   2022-12-24 17:49:27.000000000 +0100
1280 +++ dracut-059/modules.d/95iscsi/module-setup.sh        2024-04-03 01:34:19.399914002 +0200
1281 @@ -190,14 +190,6 @@ install() {
1282      inst_multiple umount iscsi-iname iscsiadm iscsid
1283      inst_binary sort
1284  
1285 -    inst_multiple -o \
1286 -        "$systemdsystemunitdir"/iscsid.socket \
1287 -        "$systemdsystemunitdir"/iscsid.service \
1288 -        "$systemdsystemunitdir"/iscsiuio.service \
1289 -        "$systemdsystemunitdir"/iscsiuio.socket \
1290 -        "$systemdsystemunitdir"/sockets.target.wants/iscsid.socket \
1291 -        "$systemdsystemunitdir"/sockets.target.wants/iscsiuio.socket
1292 -
1293      if [[ $hostonly ]]; then
1294          local -a _filenames
1295  
1296 @@ -218,74 +210,7 @@ install() {
1297      inst_hook cmdline 90 "$moddir/parse-iscsiroot.sh"
1298      inst_hook cleanup 90 "$moddir/cleanup-iscsi.sh"
1299      inst "$moddir/iscsiroot.sh" "/sbin/iscsiroot"
1300 -
1301 -    if ! dracut_module_included "systemd"; then
1302 -        inst "$moddir/mount-lun.sh" "/bin/mount-lun.sh"
1303 -    else
1304 -        inst_multiple -o \
1305 -            "$systemdsystemunitdir"/iscsi.service \
1306 -            "$systemdsystemunitdir"/iscsi-init.service \
1307 -            "$systemdsystemunitdir"/iscsid.service \
1308 -            "$systemdsystemunitdir"/iscsid.socket \
1309 -            "$systemdsystemunitdir"/iscsiuio.service \
1310 -            "$systemdsystemunitdir"/iscsiuio.socket \
1311 -            iscsiadm iscsid
1312 -
1313 -        for i in \
1314 -            iscsid.socket \
1315 -            iscsiuio.socket; do
1316 -            $SYSTEMCTL -q --root "$initdir" enable "$i"
1317 -        done
1318 -
1319 -        mkdir -p "${initdir}/$systemdsystemunitdir/iscsid.service.d"
1320 -        {
1321 -            echo "[Unit]"
1322 -            echo "DefaultDependencies=no"
1323 -            echo "Conflicts=shutdown.target"
1324 -            echo "Before=shutdown.target"
1325 -        } > "${initdir}/$systemdsystemunitdir/iscsid.service.d/dracut.conf"
1326 -
1327 -        mkdir -p "${initdir}/$systemdsystemunitdir/iscsid.socket.d"
1328 -        {
1329 -            echo "[Unit]"
1330 -            echo "DefaultDependencies=no"
1331 -            echo "Conflicts=shutdown.target"
1332 -            echo "Before=shutdown.target sockets.target"
1333 -        } > "${initdir}/$systemdsystemunitdir/iscsid.socket.d/dracut.conf"
1334 -
1335 -        mkdir -p "${initdir}/$systemdsystemunitdir/iscsiuio.service.d"
1336 -        {
1337 -            echo "[Unit]"
1338 -            echo "DefaultDependencies=no"
1339 -            echo "Conflicts=shutdown.target"
1340 -            echo "Before=shutdown.target"
1341 -        } > "${initdir}/$systemdsystemunitdir/iscsiuio.service.d/dracut.conf"
1342 -
1343 -        mkdir -p "${initdir}/$systemdsystemunitdir/iscsiuio.socket.d"
1344 -        {
1345 -            echo "[Unit]"
1346 -            echo "DefaultDependencies=no"
1347 -            echo "Conflicts=shutdown.target"
1348 -            echo "Before=shutdown.target sockets.target"
1349 -        } > "${initdir}/$systemdsystemunitdir/iscsiuio.socket.d/dracut.conf"
1350 -
1351 -        # Fedora 34 iscsid requires iscsi-shutdown.service
1352 -        # which would terminate all iSCSI connections on switch root
1353 -        cat > "${initdir}/$systemdsystemunitdir/iscsi-shutdown.service" << EOF
1354 -[Unit]
1355 -Description=Dummy iscsi-shutdown.service for the initrd
1356 -Documentation=man:iscsid(8) man:iscsiadm(8)
1357 -DefaultDependencies=no
1358 -Conflicts=shutdown.target
1359 -After=systemd-remount-fs.service network.target iscsid.service iscsiuio.service
1360 -Before=remote-fs-pre.target
1361 -
1362 -[Service]
1363 -Type=oneshot
1364 -RemainAfterExit=false
1365 -ExecStart=-/usr/bin/true
1366 -EOF
1367 -    fi
1368 +    inst "$moddir/mount-lun.sh" "/bin/mount-lun.sh"
1369      inst_dir /var/lib/iscsi
1370      mkdir -p "${initdir}/var/lib/iscsi/nodes"
1371      # Fedora 34 iscsid wants a non-empty /var/lib/iscsi/nodes directory
1372 diff -urpa dracut-059.orig/modules.d/95iscsi/parse-iscsiroot.sh dracut-059/modules.d/95iscsi/parse-iscsiroot.sh
1373 --- dracut-059.orig/modules.d/95iscsi/parse-iscsiroot.sh        2022-12-24 17:49:27.000000000 +0100
1374 +++ dracut-059/modules.d/95iscsi/parse-iscsiroot.sh     2024-04-03 01:34:19.399914002 +0200
1375 @@ -41,7 +41,6 @@ if [ "${root%%:*}" = "iscsi" ]; then
1376      netroot=$root
1377      # if root is not specified try to mount the whole iSCSI LUN
1378      printf 'ENV{DEVTYPE}!="partition", SYMLINK=="disk/by-path/*-iscsi-*-*", SYMLINK+="root"\n' >> /etc/udev/rules.d/99-iscsi-root.rules
1379 -    [ -n "$DRACUT_SYSTEMD" ] && systemctl is-active systemd-udevd && udevadm control --reload-rules
1380      root=/dev/root
1381  
1382      write_fs_tab /dev/root
1383 @@ -58,7 +57,6 @@ done
1384  if [ "${root}" = "/dev/root" ] && getarg "netroot=dhcp"; then
1385      # if root is not specified try to mount the whole iSCSI LUN
1386      printf 'ENV{DEVTYPE}!="partition", SYMLINK=="disk/by-path/*-iscsi-*-*", SYMLINK+="root"\n' >> /etc/udev/rules.d/99-iscsi-root.rules
1387 -    [ -n "$DRACUT_SYSTEMD" ] && systemctl is-active systemd-udevd && udevadm control --reload-rules
1388  fi
1389  
1390  if [ -n "$iscsiroot" ]; then
1391 @@ -84,7 +82,7 @@ if [ -n "$iscsi_firmware" ]; then
1392      modprobe -b -q iscsi_boot_sysfs 2> /dev/null
1393      modprobe -b -q iscsi_ibft
1394      # if no ip= is given, but firmware
1395 -    echo "${DRACUT_SYSTEMD+systemctl is-active initrd-root-device.target || }[ -f '/tmp/iscsistarted-firmware' ]" > "$hookdir"/initqueue/finished/iscsi_started.sh
1396 +    echo "[ -f '/tmp/iscsistarted-firmware' ]" > "$hookdir"/initqueue/finished/iscsi_started.sh
1397      initqueue --unique --online /sbin/iscsiroot online "iscsi:" "$NEWROOT"
1398      initqueue --unique --onetime --timeout /sbin/iscsiroot timeout "iscsi:" "$NEWROOT"
1399      initqueue --unique --onetime --settled /sbin/iscsiroot online "iscsi:" "'$NEWROOT'"
1400 @@ -110,11 +108,6 @@ if arg=$(getarg rd.iscsi.initiator -d is
1401      rm -f /etc/iscsi/initiatorname.iscsi
1402      mkdir -p /etc/iscsi
1403      ln -fs /run/initiatorname.iscsi /etc/iscsi/initiatorname.iscsi
1404 -    if [ -n "$DRACUT_SYSTEMD" ]; then
1405 -        systemctl try-restart iscsid
1406 -        # FIXME: iscsid is not yet ready, when the service is :-/
1407 -        sleep 1
1408 -    fi
1409  fi
1410  
1411  # If not given on the cmdline and initiator-name available via iBFT
1412 @@ -126,11 +119,6 @@ if [ -z "$iscsi_initiator" ] && [ -f /sy
1413          mkdir -p /etc/iscsi
1414          ln -fs /run/initiatorname.iscsi /etc/iscsi/initiatorname.iscsi
1415          : > /tmp/iscsi_set_initiator
1416 -        if [ -n "$DRACUT_SYSTEMD" ]; then
1417 -            systemctl try-restart iscsid
1418 -            # FIXME: iscsid is not yet ready, when the service is :-/
1419 -            sleep 1
1420 -        fi
1421      fi
1422  fi
1423  
1424 @@ -145,7 +133,7 @@ for nroot in $(getargs netroot); do
1425      type parse_iscsi_root > /dev/null 2>&1 || . /lib/net-lib.sh
1426      parse_iscsi_root "$nroot" || return 1
1427      netroot_enc=$(str_replace "$nroot" '/' '\2f')
1428 -    echo "${DRACUT_SYSTEMD+systemctl is-active initrd-root-device.target || }[ -f '/tmp/iscsistarted-$netroot_enc' ]" > "$hookdir"/initqueue/finished/iscsi_started.sh
1429 +    echo "[ -f '/tmp/iscsistarted-$netroot_enc' ]" > "$hookdir"/initqueue/finished/iscsi_started.sh
1430  done
1431  
1432  # Done, all good!
1433 diff -urpa dracut-059.orig/modules.d/95nbd/module-setup.sh dracut-059/modules.d/95nbd/module-setup.sh
1434 --- dracut-059.orig/modules.d/95nbd/module-setup.sh     2022-12-24 17:49:27.000000000 +0100
1435 +++ dracut-059/modules.d/95nbd/module-setup.sh  2024-04-03 01:34:19.399914002 +0200
1436 @@ -32,8 +32,5 @@ install() {
1437      inst nbd-client
1438      inst_hook cmdline 90 "$moddir/parse-nbdroot.sh"
1439      inst_script "$moddir/nbdroot.sh" "/sbin/nbdroot"
1440 -    if dracut_module_included "systemd-initrd"; then
1441 -        inst_script "$moddir/nbd-generator.sh" "$systemdutildir"/system-generators/dracut-nbd-generator
1442 -    fi
1443      dracut_need_initqueue
1444  }
1445 diff -urpa dracut-059.orig/modules.d/95nbd/nbdroot.sh dracut-059/modules.d/95nbd/nbdroot.sh
1446 --- dracut-059.orig/modules.d/95nbd/nbdroot.sh  2022-12-24 17:49:27.000000000 +0100
1447 +++ dracut-059/modules.d/95nbd/nbdroot.sh       2024-04-03 01:34:19.399914002 +0200
1448 @@ -101,27 +101,13 @@ if [ "$root" = "block:/dev/root" -o "$ro
1449      udevadm control --reload
1450      wait_for_dev -n /dev/root
1451  
1452 -    if [ -z "$DRACUT_SYSTEMD" ]; then
1453 -        type write_fs_tab > /dev/null 2>&1 || . /lib/fs-lib.sh
1454 +    type write_fs_tab > /dev/null 2>&1 || . /lib/fs-lib.sh
1455  
1456 -        write_fs_tab /dev/root "$nbdfstype" "$fsopts"
1457 +    write_fs_tab /dev/root "$nbdfstype" "$fsopts"
1458  
1459 -        printf '/bin/mount %s\n' \
1460 -            "$NEWROOT" \
1461 -            > "$hookdir"/mount/01-$$-nbd.sh
1462 -    else
1463 -        mkdir -p /run/systemd/system/sysroot.mount.d
1464 -        cat << EOF > /run/systemd/system/sysroot.mount.d/dhcp.conf
1465 -[Mount]
1466 -Where=/sysroot
1467 -What=/dev/root
1468 -Type=$nbdfstype
1469 -Options=$fsopts
1470 -EOF
1471 -        systemctl --no-block daemon-reload
1472 -    fi
1473 -    # if we're on systemd, use the nbd-generator script
1474 -    # to create the /sysroot mount.
1475 +    printf '/bin/mount %s\n' \
1476 +        "$NEWROOT" \
1477 +        > "$hookdir"/mount/01-$$-nbd.sh
1478  fi
1479  
1480  if ! [ "$nbdport" -gt 0 ] 2> /dev/null; then
1481 diff -urpa dracut-059.orig/modules.d/95resume/module-setup.sh dracut-059/modules.d/95resume/module-setup.sh
1482 --- dracut-059.orig/modules.d/95resume/module-setup.sh  2024-04-03 01:28:29.775191905 +0200
1483 +++ dracut-059/modules.d/95resume/module-setup.sh       2024-04-03 01:34:19.399914002 +0200
1484 @@ -40,15 +40,6 @@ install() {
1485          [[ $_resumeconf ]] && printf "%s\n" "$_resumeconf" >> "${initdir}/etc/cmdline.d/95resume.conf"
1486      fi
1487  
1488 -    # if systemd is included and has the hibernate-resume tool, use it and nothing else
1489 -    if dracut_module_included "systemd" && [[ -x $dracutsysrootdir$systemdutildir/systemd-hibernate-resume ]]; then
1490 -        inst_multiple -o \
1491 -            "$systemdutildir"/system-generators/systemd-hibernate-resume-generator \
1492 -            "$systemdsystemunitdir"/systemd-hibernate-resume@.service \
1493 -            "$systemdutildir"/systemd-hibernate-resume
1494 -        return 0
1495 -    fi
1496 -
1497      # Optional uswsusp support
1498      for _bin in /usr/sbin/resume /usr/@lib@/suspend/resume /usr/@lib@/uswsusp/resume; do
1499          [[ -x $dracutsysrootdir${_bin} ]] && {
1500 @@ -58,11 +49,7 @@ install() {
1501          }
1502      done
1503  
1504 -    if ! dracut_module_included "systemd"; then
1505 -        inst_hook cmdline 10 "$moddir/parse-resume.sh"
1506 -    else
1507 -        inst_script "$moddir/parse-resume.sh" /lib/dracut/parse-resume.sh
1508 -    fi
1509 +    inst_hook cmdline 10 "$moddir/parse-resume.sh"
1510  
1511      inst_script "$moddir/resume.sh" /lib/dracut/resume.sh
1512  }
1513 diff -urpa dracut-059.orig/modules.d/95rootfs-block/module-setup.sh dracut-059/modules.d/95rootfs-block/module-setup.sh
1514 --- dracut-059.orig/modules.d/95rootfs-block/module-setup.sh    2022-12-24 17:49:27.000000000 +0100
1515 +++ dracut-059/modules.d/95rootfs-block/module-setup.sh 2024-04-03 01:34:19.399914002 +0200
1516 @@ -82,11 +82,9 @@ install() {
1517  
1518      inst_multiple umount
1519      inst_multiple tr
1520 -    if ! dracut_module_included "systemd"; then
1521 -        inst_hook cmdline 95 "$moddir/parse-block.sh"
1522 -        inst_hook pre-udev 30 "$moddir/block-genrules.sh"
1523 -        inst_hook mount 99 "$moddir/mount-root.sh"
1524 -    fi
1525 +    inst_hook cmdline 95 "$moddir/parse-block.sh"
1526 +    inst_hook pre-udev 30 "$moddir/block-genrules.sh"
1527 +    inst_hook mount 99 "$moddir/mount-root.sh"
1528  
1529      inst_hook initqueue/timeout 99 "$moddir/rootfallback.sh"
1530  }
1531 diff -urpa dracut-059.orig/modules.d/95udev-rules/module-setup.sh dracut-059/modules.d/95udev-rules/module-setup.sh
1532 --- dracut-059.orig/modules.d/95udev-rules/module-setup.sh      2022-12-24 17:49:27.000000000 +0100
1533 +++ dracut-059/modules.d/95udev-rules/module-setup.sh   2024-04-03 01:34:19.399914002 +0200
1534 @@ -11,18 +11,13 @@ install() {
1535      inst_dir /etc/udev
1536      inst_multiple -o /etc/udev/udev.conf
1537  
1538 -    [[ -d ${initdir}/$systemdutildir ]] || mkdir -p "${initdir}/$systemdutildir"
1539 -    for _i in "${systemdutildir}"/systemd-udevd "${udevdir}"/udevd /sbin/udevd; do
1540 +    for _i in /sbin/udevd; do
1541          [[ -x $dracutsysrootdir$_i ]] || continue
1542          inst "$_i"
1543 -
1544 -        if ! [[ -f ${initdir}${systemdutildir}/systemd-udevd ]]; then
1545 -            ln -fs "$_i" "${initdir}${systemdutildir}"/systemd-udevd
1546 -        fi
1547          break
1548      done
1549 -    if ! [[ -e ${initdir}${systemdutildir}/systemd-udevd ]]; then
1550 -        derror "Cannot find [systemd-]udevd binary!"
1551 +    if ! [[ -e /sbin/udevd ]]; then
1552 +        derror "Cannot find udevd binary!"
1553          exit 1
1554      fi
1555  
1556 diff -urpa dracut-059.orig/modules.d/98usrmount/module-setup.sh dracut-059/modules.d/98usrmount/module-setup.sh
1557 --- dracut-059.orig/modules.d/98usrmount/module-setup.sh        2022-12-24 17:49:27.000000000 +0100
1558 +++ dracut-059/modules.d/98usrmount/module-setup.sh     2024-04-03 01:34:19.399914002 +0200
1559 @@ -13,8 +13,6 @@ depends() {
1560  
1561  # called by dracut
1562  install() {
1563 -    if ! dracut_module_included "systemd"; then
1564 -        inst_hook pre-pivot 50 "$moddir/mount-usr.sh"
1565 -    fi
1566 +    inst_hook pre-pivot 50 "$moddir/mount-usr.sh"
1567      :
1568  }
1569 diff -urpa dracut-059.orig/modules.d/99base/dracut-dev-lib.sh dracut-059/modules.d/99base/dracut-dev-lib.sh
1570 --- dracut-059.orig/modules.d/99base/dracut-dev-lib.sh  2022-12-24 17:49:27.000000000 +0100
1571 +++ dracut-059/modules.d/99base/dracut-dev-lib.sh       2024-04-03 01:34:19.399914002 +0200
1572 @@ -25,11 +25,6 @@ str_replace() {
1573  dev_unit_name() {
1574      local dev="$1"
1575  
1576 -    if command -v systemd-escape > /dev/null; then
1577 -        systemd-escape -p -- "$dev"
1578 -        return $?
1579 -    fi
1580 -
1581      if [ "$dev" = "/" -o -z "$dev" ]; then
1582          printf -- "-"
1583          return 0
1584 @@ -48,53 +43,6 @@ dev_unit_name() {
1585      printf -- "%s" "$dev"
1586  }
1587  
1588 -# set_systemd_timeout_for_dev [-n] <dev> [<timeout>]
1589 -# Set 'rd.timeout' as the systemd timeout for <dev>
1590 -set_systemd_timeout_for_dev() {
1591 -    local _name
1592 -    local _needreload
1593 -    local _noreload
1594 -    local _timeout
1595 -
1596 -    [ -z "$DRACUT_SYSTEMD" ] && return 0
1597 -
1598 -    if [ "$1" = "-n" ]; then
1599 -        _noreload=1
1600 -        shift
1601 -    fi
1602 -
1603 -    if [ -n "$2" ]; then
1604 -        _timeout="$2"
1605 -    else
1606 -        _timeout=$(getarg rd.timeout)
1607 -    fi
1608 -
1609 -    _timeout=${_timeout:-0}
1610 -
1611 -    _name=$(dev_unit_name "$1")
1612 -    if ! [ -L "${PREFIX}/etc/systemd/system/initrd.target.wants/${_name}.device" ]; then
1613 -        [ -d "${PREFIX}"/etc/systemd/system/initrd.target.wants ] || mkdir -p "${PREFIX}"/etc/systemd/system/initrd.target.wants
1614 -        ln -s ../"${_name}".device "${PREFIX}/etc/systemd/system/initrd.target.wants/${_name}.device"
1615 -        type mark_hostonly > /dev/null 2>&1 && mark_hostonly /etc/systemd/system/initrd.target.wants/"${_name}".device
1616 -        _needreload=1
1617 -    fi
1618 -
1619 -    if ! [ -f "${PREFIX}/etc/systemd/system/${_name}.device.d/timeout.conf" ]; then
1620 -        mkdir -p "${PREFIX}/etc/systemd/system/${_name}.device.d"
1621 -        {
1622 -            echo "[Unit]"
1623 -            echo "JobTimeoutSec=$_timeout"
1624 -            echo "JobRunningTimeoutSec=$_timeout"
1625 -        } > "${PREFIX}/etc/systemd/system/${_name}.device.d/timeout.conf"
1626 -        type mark_hostonly > /dev/null 2>&1 && mark_hostonly /etc/systemd/system/"${_name}".device.d/timeout.conf
1627 -        _needreload=1
1628 -    fi
1629 -
1630 -    if [ -z "$PREFIX" ] && [ "$_needreload" = 1 ] && [ -z "$_noreload" ]; then
1631 -        /sbin/initqueue --onetime --unique --name daemon-reload systemctl daemon-reload
1632 -    fi
1633 -}
1634 -
1635  # wait_for_dev <dev> [<timeout>]
1636  #
1637  # Installs a initqueue-finished script,
1638 @@ -122,7 +70,6 @@ wait_for_dev() {
1639          printf 'warn "\"%s\" does not exist"\n' "$1"
1640      } >> "${PREFIX}$hookdir/emergency/80-${_name}.sh"
1641  
1642 -    set_systemd_timeout_for_dev $_noreload "$@"
1643  }
1644  
1645  cancel_wait_for_dev() {
1646 @@ -130,10 +77,4 @@ cancel_wait_for_dev() {
1647      _name="$(str_replace "$1" '/' '\x2f')"
1648      rm -f -- "$hookdir/initqueue/finished/devexists-${_name}.sh"
1649      rm -f -- "$hookdir/emergency/80-${_name}.sh"
1650 -    if [ -n "$DRACUT_SYSTEMD" ]; then
1651 -        _name=$(dev_unit_name "$1")
1652 -        rm -f -- "${PREFIX}/etc/systemd/system/initrd.target.wants/${_name}.device"
1653 -        rm -f -- "${PREFIX}/etc/systemd/system/${_name}.device.d/timeout.conf"
1654 -        /sbin/initqueue --onetime --unique --name daemon-reload systemctl daemon-reload
1655 -    fi
1656  }
1657 diff -urpa dracut-059.orig/modules.d/99base/dracut-lib.sh dracut-059/modules.d/99base/dracut-lib.sh
1658 --- dracut-059.orig/modules.d/99base/dracut-lib.sh      2024-04-03 01:31:54.785960810 +0200
1659 +++ dracut-059/modules.d/99base/dracut-lib.sh   2024-04-03 01:49:20.168079971 +0200
1660 @@ -2,7 +2,6 @@
1661  
1662  type wait_for_dev > /dev/null 2>&1 || . /lib/dracut-dev-lib.sh
1663  
1664 -export DRACUT_SYSTEMD
1665  export NEWROOT
1666  if [ -n "$NEWROOT" ]; then
1667      [ -d "$NEWROOT" ] || mkdir -p -m 0755 "$NEWROOT"
1668 @@ -63,33 +62,19 @@ trim() {
1669      printf "%s" "$var"
1670  }
1671  
1672 -if [ -z "$DRACUT_SYSTEMD" ]; then
1673 -
1674 -    warn() {
1675 -        check_quiet
1676 -        echo "<28>dracut Warning: $*" > /dev/kmsg
1677 -        echo "dracut Warning: $*" >&2
1678 -    }
1679 -
1680 -    info() {
1681 -        check_quiet
1682 -        echo "<30>dracut: $*" > /dev/kmsg
1683 -        if [ "$DRACUT_QUIET" != "yes" ]; then
1684 -            echo "dracut: $*" >&2
1685 -        fi
1686 -    }
1687 -
1688 -else
1689 -
1690 -    warn() {
1691 -        echo "Warning: $*" >&2
1692 -    }
1693 -
1694 -    info() {
1695 -        echo "$*"
1696 -    }
1697 +warn() {
1698 +    check_quiet
1699 +    echo "<28>dracut Warning: $*" > /dev/kmsg
1700 +    echo "dracut Warning: $*" >&2
1701 +}
1702  
1703 -fi
1704 +info() {
1705 +    check_quiet
1706 +    echo "<30>dracut: $*" > /dev/kmsg
1707 +    if [ "$DRACUT_QUIET" != "yes" ]; then
1708 +        echo "dracut: $*" >&2
1709 +    fi
1710 +}
1711  
1712  vwarn() {
1713      while read -r line || [ -n "$line" ]; do
1714 @@ -444,10 +429,6 @@ die() {
1715          source_hook "shutdown-emergency"
1716      fi
1717  
1718 -    if [ -n "$DRACUT_SYSTEMD" ]; then
1719 -        systemctl --no-block --force halt
1720 -    fi
1721 -
1722      exit 1
1723  }
1724  
1725 @@ -904,43 +885,35 @@ fi
1726  
1727  _emergency_shell() {
1728      local _name="$1"
1729 -    if [ -n "$DRACUT_SYSTEMD" ]; then
1730 -        : > /.console_lock
1731 -        echo "PS1=\"$_name:\\\${PWD}# \"" > /etc/profile
1732 -        systemctl start dracut-emergency.service
1733 -        rm -f -- /etc/profile
1734 -        rm -f -- /.console_lock
1735 -    else
1736 -        debug_off
1737 -        source_hook "$hook"
1738 -        echo
1739 -        /sbin/rdsosreport
1740 -        echo 'You might want to save "/run/initramfs/rdsosreport.txt" to a USB stick or /boot'
1741 -        echo 'after mounting them and attach it to a bug report.'
1742 -        if ! RD_DEBUG='' getargbool 0 rd.debug -d -y rdinitdebug -d -y rdnetdebug; then
1743 -            echo
1744 -            echo 'To get more debug information in the report,'
1745 -            echo 'reboot with "rd.debug" added to the kernel command line.'
1746 -        fi
1747 -        echo
1748 -        echo 'Dropping to debug shell.'
1749 +    debug_off
1750 +    source_hook "$hook"
1751 +    echo
1752 +    /sbin/rdsosreport
1753 +    echo 'You might want to save "/run/initramfs/rdsosreport.txt" to a USB stick or /boot'
1754 +    echo 'after mounting them and attach it to a bug report.'
1755 +    if ! RD_DEBUG='' getargbool 0 rd.debug -d -y rdinitdebug -d -y rdnetdebug; then
1756          echo
1757 -        export PS1="$_name:\${PWD}# "
1758 -        [ -e /.profile ] || : > /.profile
1759 -
1760 -        _ctty="$(RD_DEBUG='' getarg rd.ctty=)" && _ctty="/dev/${_ctty##*/}"
1761 -        if [ -z "$_ctty" ]; then
1762 -            _ctty=console
1763 -            while [ -f /sys/class/tty/$_ctty/active ]; do
1764 -                read -r _ctty < /sys/class/tty/$_ctty/active
1765 -                _ctty=${_ctty##* } # last one in the list
1766 -            done
1767 -            _ctty=/dev/$_ctty
1768 -        fi
1769 -        [ -c "$_ctty" ] || _ctty=/dev/tty1
1770 -        case "$(/usr/bin/setsid --help 2>&1)" in *--ctty*) CTTY="--ctty" ;; esac
1771 -        setsid $CTTY /bin/sh -i -l 0<> $_ctty 1<> $_ctty 2<> $_ctty
1772 +        echo 'To get more debug information in the report,'
1773 +        echo 'reboot with "rd.debug" added to the kernel command line.'
1774 +    fi
1775 +    echo
1776 +    echo 'Dropping to debug shell.'
1777 +    echo
1778 +    export PS1="$_name:\${PWD}# "
1779 +    [ -e /.profile ] || : > /.profile
1780 +
1781 +    _ctty="$(RD_DEBUG='' getarg rd.ctty=)" && _ctty="/dev/${_ctty##*/}"
1782 +    if [ -z "$_ctty" ]; then
1783 +        _ctty=console
1784 +        while [ -f /sys/class/tty/$_ctty/active ]; do
1785 +            read -r _ctty < /sys/class/tty/$_ctty/active
1786 +            _ctty=${_ctty##* } # last one in the list
1787 +        done
1788 +        _ctty=/dev/$_ctty
1789      fi
1790 +    [ -c "$_ctty" ] || _ctty=/dev/tty1
1791 +    case "$(/usr/bin/setsid --help 2>&1)" in *--ctty*) CTTY="--ctty" ;; esac
1792 +    setsid $CTTY /bin/sh -i -l 0<> $_ctty 1<> $_ctty 2<> $_ctty
1793  }
1794  
1795  emergency_shell() {
1796 diff -urpa dracut-059.orig/modules.d/99base/init.sh dracut-059/modules.d/99base/init.sh
1797 --- dracut-059.orig/modules.d/99base/init.sh    2024-04-03 01:31:54.785960810 +0200
1798 +++ dracut-059/modules.d/99base/init.sh 2024-04-03 01:34:19.399914002 +0200
1799 @@ -141,7 +141,7 @@ getargbool 0 rd.udev.info -d -y rdudevin
1800  getargbool 0 rd.udev.debug -d -y rdudevdebug && UDEV_LOG=debug
1801  
1802  # start up udev and trigger cold plugs
1803 -UDEV_LOG=$UDEV_LOG "$systemdutildir"/systemd-udevd --daemon --resolve-names=never
1804 +UDEV_LOG=$UDEV_LOG /sbin/udevd --daemon --resolve-names=never
1805  
1806  UDEV_QUEUE_EMPTY="udevadm settle --timeout=0"
1807  
1808 diff -urpa dracut-059.orig/modules.d/99base/module-setup.sh dracut-059/modules.d/99base/module-setup.sh
1809 --- dracut-059.orig/modules.d/99base/module-setup.sh    2024-04-03 01:31:54.785960810 +0200
1810 +++ dracut-059/modules.d/99base/module-setup.sh 2024-04-03 01:48:14.915198647 +0200
1811 @@ -53,10 +53,8 @@ install() {
1812      inst_simple "$moddir/dracut-dev-lib.sh" "/lib/dracut-dev-lib.sh"
1813      mkdir -p "${initdir}"/var
1814  
1815 -    if ! dracut_module_included "systemd"; then
1816 -        inst_multiple switch_root || dfatal "Failed to install switch_root"
1817 -        inst_hook cmdline 10 "$moddir/parse-root-opts.sh"
1818 -    fi
1819 +    inst_multiple switch_root || dfatal "Failed to install switch_root"
1820 +    inst_hook cmdline 10 "$moddir/parse-root-opts.sh"
1821  
1822      if [[ $realinitpath ]]; then
1823          for i in $realinitpath; do
1824 @@ -108,11 +106,8 @@ install() {
1825          if [[ -n ${host_devs[*]} ]]; then
1826              dracut_need_initqueue
1827          fi
1828 -        if [[ -f $initdir/lib/dracut/need-initqueue ]] || ! dracut_module_included "systemd"; then
1829 +        if [[ -f $initdir/lib/dracut/need-initqueue ]]; then
1830              (
1831 -                if dracut_module_included "systemd"; then
1832 -                    export DRACUT_SYSTEMD=1
1833 -                fi
1834                  export PREFIX="$initdir"
1835                  export hookdir=/lib/dracut/hooks
1836  
1837 diff -urpa dracut-059.orig/modules.d/99shutdown/shutdown.sh dracut-059/modules.d/99shutdown/shutdown.sh
1838 --- dracut-059.orig/modules.d/99shutdown/shutdown.sh    2022-12-24 17:49:27.000000000 +0100
1839 +++ dracut-059/modules.d/99shutdown/shutdown.sh 2024-04-03 01:56:30.249888736 +0200
1840 @@ -149,12 +149,6 @@ while [ $_cnt -le 40 ]; do
1841  done
1842  [ $_cnt -ge 40 ] && _check_shutdown final
1843  
1844 -if type plymouth > /dev/null 2>&1; then
1845 -    plymouth --hide-splash
1846 -elif [ -x /oldroot/bin/plymouth ]; then
1847 -    /oldroot/bin/plymouth --hide-splash
1848 -fi
1849 -
1850  getarg 'rd.break=shutdown' && emergency_shell --shutdown shutdown "Break before shutdown"
1851  
1852  case "$ACTION" in