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