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
13 - [[ $vm == "qemu" ]] && return 0
14 - [[ $vm == "kvm" ]] && return 0
15 - [[ $vm == "bochs" ]] && return 0
18 for i in /sys/class/dmi/id/*_vendor; do
19 [[ -f $i ]] || continue
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() {
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"
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.
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
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!!"
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
61 abs_outfile=$(readlink -f "$outfile") && outfile="$abs_outfile"
63 -[[ -d $dracutsysrootdir$systemdutildir ]] \
64 - || systemdutildir=$(pkg-config systemd --variable=systemdutildir 2> /dev/null)
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
71 -[[ -d $dracutsysrootdir$systemdutilconfdir ]] \
72 - || systemdutilconfdir=$(pkg-config systemd --variable=systemdutilconfdir 2> /dev/null)
74 -[[ -d $dracutsysrootdir$systemdutilconfdir ]] || systemdutilconfdir=/etc/systemd
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
82 if ! [[ -s $uefi_stub ]]; then
83 - uefi_stub="$dracutsysrootdir${systemdutildir}/boot/efi/linux${EFI_MACHINE_TYPE_NAME}.efi.stub"
86 - if ! [[ -s $uefi_stub ]]; then
87 dfatal "Can't find a uefi stub '$uefi_stub' to create a UEFI executable"
90 @@ -1597,66 +1573,6 @@ for dev in "${!host_fs_types[@]}"; do
94 -[[ -d $dracutsysrootdir$dbus ]] \
95 - || dbus=$(pkg-config dbus --variable=dbus 2> /dev/null)
97 -[[ -d $dracutsysrootdir$dbus ]] || dbus=/usr/share/dbus-1
99 -[[ -d $dracutsysrootdir$dbusconfdir ]] \
100 - || dbusconfdir=$(pkg-config dbus --variable=dbusconfdir 2> /dev/null)
102 -[[ -d $dracutsysrootdir$dbusconfdir ]] || dbusconfdir=/etc/dbus-1
104 -[[ -d $dracutsysrootdir$dbusinterfaces ]] \
105 - || dbusinterfaces=$(pkg-config dbus --variable=dbusinterfaces 2> /dev/null)
107 -[[ -d $dracutsysrootdir$dbusinterfaces ]] || dbusinterfaces=${dbus}/interfaces
109 -[[ -d $dracutsysrootdir$dbusinterfacesconfdir ]] \
110 - || dbusinterfacesconfdir=$(pkg-config dbus --variable=dbusinterfacesconfdir 2> /dev/null)
112 -[[ -d $dracutsysrootdir$dbusinterfacesconfdir ]] || dbusinterfacesconfdir=${dbusconfdir}/interfaces
114 -[[ -d $dracutsysrootdir$dbusservices ]] \
115 - || dbusservices=$(pkg-config dbus --variable=dbusservices 2> /dev/null)
117 -[[ -d $dracutsysrootdir$dbusservices ]] || dbusservices=${dbus}/services
119 -[[ -d $dracutsysrootdir$dbusservicesconfdir ]] \
120 - || dbusservicesconfdir=$(pkg-config dbus --variable=dbusservicesconfdir 2> /dev/null)
122 -[[ -d $dracutsysrootdir$dbusservicesconfdir ]] || dbusservicesconfdir=${dbusconfdir}/services
124 -[[ -d $dracutsysrootdir$dbussession ]] \
125 - || dbussession=$(pkg-config dbus --variable=dbussession 2> /dev/null)
127 -[[ -d $dracutsysrootdir$dbussession ]] || dbussession=${dbus}/session.d
129 -[[ -d $dracutsysrootdir$dbussessionconfdir ]] \
130 - || dbussessionconfdir=$(pkg-config dbus --variable=dbussessionconfdir 2> /dev/null)
132 -[[ -d $dracutsysrootdir$dbussessionconfdir ]] || dbussessionconfdir=${dbusconfdir}/session.d
134 -[[ -d $dracutsysrootdir$dbussystem ]] \
135 - || dbussystem=$(pkg-config dbus --variable=dbussystem 2> /dev/null)
137 -[[ -d $dracutsysrootdir$dbussystem ]] || dbussystem=${dbus}/system.d
139 -[[ -d $dracutsysrootdir$dbussystemconfdir ]] \
140 - || dbussystemconfdir=$(pkg-config dbus --variable=dbussystemconfdir 2> /dev/null)
142 -[[ -d $dracutsysrootdir$dbussystemconfdir ]] || dbussystemconfdir=${dbusconfdir}/system.d
144 -[[ -d $dracutsysrootdir$dbussystemservices ]] \
145 - || dbussystemservices=$(pkg-config dbus --variable=dbussystemservices 2> /dev/null)
147 -[[ -d $dracutsysrootdir$dbussystemservices ]] || dbussystemservices=${dbus}/system-services
149 -[[ -d $dracutsysrootdir$dbussystemservicesconfdir ]] \
150 - || dbussystemservicesconfdir=$(pkg-config dbus --variable=dbussystemservicesconfdir 2> /dev/null)
152 -[[ -d $dracutsysrootdir$dbussystemservicesconfdir ]] || dbussystemservicesconfdir=${dbusconfdir}/system-services
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
159 [[ -d $dracutsysrootdir$udevrulesconfdir ]] || udevrulesconfdir=${udevconfdir}/rules.d
161 -[[ -d $dracutsysrootdir$sysctld ]] \
162 - || sysctld=$(pkg-config systemd --variable=sysctld 2> /dev/null)
164 [[ -d $dracutsysrootdir$sysctld ]] || sysctld=/usr/lib/sysctl.d
166 -[[ -d $dracutsysrootdir$sysctlconfdir ]] \
167 - || sysctlconfdir=$(pkg-config systemd --variable=sysctlconfdir 2> /dev/null)
169 [[ -d $dracutsysrootdir$sysctlconfdir ]] || sysctlconfdir=/etc/sysctl.d
171 -[[ -d $dracutsysrootdir$environment ]] \
172 - || environment=$(pkg-config systemd --variable=environment 2> /dev/null)
174 [[ -d $dracutsysrootdir$environment ]] || environment=/usr/lib/environment.d
176 -[[ -d $dracutsysrootdir$environmentconfdir ]] \
177 - || environmentconfdir=$(pkg-config systemd --variable=environmentconfdir 2> /dev/null)
179 [[ -d $dracutsysrootdir$environmentconfdir ]] || environmentconfdir=/etc/environment.d
181 -[[ -d $dracutsysrootdir$systemdcatalog ]] \
182 - || systemdcatalog=$(pkg-config systemd --variable=systemdcatalog 2> /dev/null)
184 -[[ -d $dracutsysrootdir$systemdcatalog ]] || systemdcatalog=${systemdutildir}/catalog
186 -[[ -d $dracutsysrootdir$modulesload ]] \
187 - || modulesload=$(pkg-config systemd --variable=modulesload 2> /dev/null)
189 [[ -d $dracutsysrootdir$modulesload ]] || modulesload=/usr/lib/modules-load.d
191 -[[ -d $dracutsysrootdir$modulesloadconfdir ]] \
192 - || modulesloadconfdir=$(pkg-config systemd --variable=modulesloadconfdir 2> /dev/null)
194 [[ -d $dracutsysrootdir$modulesloadconfdir ]] || modulesloadconfdir=/etc/modules-load.d
196 -[[ -d $dracutsysrootdir$systemdnetwork ]] \
197 - || systemdnetwork=$(pkg-config systemd --variable=systemdnetwork 2> /dev/null)
199 -[[ -d $dracutsysrootdir$systemdnetwork ]] || systemdnetwork=${systemdutildir}/network
201 -[[ -d $dracutsysrootdir$systemdnetworkconfdir ]] \
202 - || systemdnetworkconfdir=$(pkg-config systemd --variable=systemdnetworkconfdir 2> /dev/null)
204 -[[ -d $dracutsysrootdir$systemdnetworkconfdir ]] || systemdnetworkconfdir=${systemdsystemconfdir}/network
206 -[[ -d $dracutsysrootdir$systemdntpunits ]] \
207 - || systemdntpunits=$(pkg-config systemd --variable=systemdntpunits 2> /dev/null)
209 -[[ -d $dracutsysrootdir$systemdntpunits ]] || systemdntpunits=${systemdutildir}/ntp-units.d
211 -[[ -d $dracutsysrootdir$systemdntpunitsconfdir ]] \
212 - || systemdntpunitsconfdir=$(pkg-config systemd --variable=systemdntpunitsconfdir 2> /dev/null)
214 -[[ -d $dracutsysrootdir$systemdntpunitsconfdir ]] || systemdntpunitsconfdir=${systemdsystemconfdir}/ntp-units.d
216 -[[ -d $dracutsysrootdir$systemdportable ]] \
217 - || systemdportable=$(pkg-config systemd --variable=systemdportable 2> /dev/null)
219 -[[ -d $dracutsysrootdir$systemdportable ]] || systemdportable=${systemdutildir}/portable
221 -[[ -d $dracutsysrootdir$systemdportableconfdir ]] \
222 - || systemdportableconfdir=$(pkg-config systemd --variable=systemdportableconfdir 2> /dev/null)
224 -[[ -d "$dracutsysrootdir$systemdportableconfdir" ]] || systemdportableconfdir=${systemdsystemconfdir}/portable
226 -[[ -d $dracutsysrootdir$systemdsystemunitdir ]] \
227 - || systemdsystemunitdir=$(pkg-config systemd --variable=systemdsystemunitdir 2> /dev/null)
229 -[[ -d "$dracutsysrootdir$systemdsystemunitdir" ]] || systemdsystemunitdir=${systemdutildir}/system
231 -[[ -d $dracutsysrootdir$systemduser ]] \
232 - || systemduser=$(pkg-config systemd --variable=systemduser 2> /dev/null)
234 -[[ -d $dracutsysrootdir$systemduser ]] || systemduser=${systemdutildir}/user
236 -[[ -d $dracutsysrootdir$systemduserconfdir ]] \
237 - || systemduserconfdir=$(pkg-config systemd --variable=systemduserconfdir 2> /dev/null)
239 -[[ -d $dracutsysrootdir$systemduserconfdir ]] || systemduserconfdir=${systemdsystemconfdir}/user
241 -[[ -d $dracutsysrootdir$systemdsystemconfdir ]] \
242 - || systemdsystemconfdir=$(pkg-config systemd --variable=systemdsystemconfdir 2> /dev/null)
244 -[[ -d $dracutsysrootdir$systemdsystemconfdir ]] || systemdsystemconfdir=/etc/systemd/system
246 -[[ -d $dracutsysrootdir$sysusers ]] \
247 - || sysusers=$(pkg-config systemd --variable=sysusers 2> /dev/null)
249 [[ -d $dracutsysrootdir$sysusers ]] || sysusers=/usr/lib/sysusers.d
251 -[[ -d $dracutsysrootdir$sysusersconfdir ]] \
252 - || sysusersconfdir=$(pkg-config systemd --variable=sysusersconfdir 2> /dev/null)
254 [[ -d $dracutsysrootdir$sysusersconfdir ]] || sysusersconfdir=/etc/sysusers.d
256 -[[ -d $dracutsysrootdir$tmpfilesdir ]] \
257 - || tmpfilesdir=$(pkg-config systemd --variable=tmpfilesdir 2> /dev/null)
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
264 -[[ -d $dracutsysrootdir$tmpfilesconfdir ]] \
265 - || tmpfilesconfdir=$(pkg-config systemd --variable=tmpfilesconfdir 2> /dev/null)
267 -[[ -d $dracutsysrootdir$tmpfilesconfdir ]] || tmpfilesconfdir=/etc/tmpfiles.d
269 [[ -d $dracutsysrootdir$depmodd ]] \
270 || sysctld=$(pkg-config libkmod --variable=depmodd 2> /dev/null)
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 \
286 + hostonly_cmdline loginstall depmodd depmodconfdir
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"
294 - if [[ $dracutsysrootdir$systemdutildir ]]; then
295 - if [[ -d ${initdir}/$systemdutildir ]]; then
296 - mkdir -p "${initdir}"/etc/conf.d
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
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() {
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"
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")"
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
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
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() {
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
369 - dwarning "caps: does not work with systemd in the initramfs"
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
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() {
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"
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
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
417 -[ -n "$DRACUT_SYSTEMD" ] && exit 0
419 -if [ -x "$systemdutildir"/systemd-vconsole-setup ]; then
420 - "$systemdutildir"/systemd-vconsole-setup "$@"
423 [ -e /etc/vconsole.conf ] && . /etc/vconsole.conf
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() {
433 - if dracut_module_included "systemd"; then
436 - # shellcheck disable=SC1090
437 - [[ -f "$dracutsysrootdir"/etc/vconsole.conf ]] && . "$dracutsysrootdir"/etc/vconsole.conf
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() {
445 inst_multiple setfont loadkeys kbd_mode stty
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"
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"
456 if [[ ${kbddir} != "/usr/share" ]]; then
458 @@ -239,17 +230,11 @@ install() {
459 inst_simple "${kbddir}"/unimaps/"${FONT_UNIMAP}".uni
462 - if dracut_module_included "systemd" && [[ -f $dracutsysrootdir${I18N_CONF} ]]; then
463 - inst_simple ${I18N_CONF}
465 - mksubdirs "${initdir}"${I18N_CONF}
466 - print_vars LC_ALL LANG >> "${initdir}"${I18N_CONF}
468 + mksubdirs "${initdir}"${I18N_CONF}
469 + print_vars LC_ALL LANG >> "${initdir}"${I18N_CONF}
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}
475 + mksubdirs "${initdir}"${VCONFIG_CONF}
476 + print_vars KEYMAP EXT_KEYMAPS UNICODE FONT FONT_MAP FONT_UNIMAP >> "${initdir}"${VCONFIG_CONF}
480 @@ -278,11 +263,6 @@ install() {
484 - # https://github.com/dracutdevs/dracut/issues/796
485 - if dracut_module_included "systemd" && [[ -f $dracutsysrootdir${VCONFIG_CONF} ]]; then
486 - inst_simple ${VCONFIG_CONF}
489 if [[ ${hostonly} ]] && ! [[ ${i18n_install_all} == "yes" ]]; then
490 install_local_i18n || install_all_kbd
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() {
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"
505 inst_multiple ip dhclient sed awk grep pgrep tr expr
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 || . /
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 ]"
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
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() {
530 is_qemu_virtualized && echo -n "qemu-net "
532 - for module in network-wicked network-manager network-legacy systemd-networkd; do
533 - if dracut_module_included "$module"; then
534 - network_handler="$module"
538 + if dracut_module_included "network-legacy"; then
539 + network_handler="$module"
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"
550 - network_handler="network-legacy"
552 + network_handler="network-legacy"
554 echo "kernel-network-modules $network_handler"
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")"
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() {
573 inst_multiple plymouthd plymouth plymouth-set-default-theme
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
579 + inst_hook pre-trigger 10 "$moddir"/plymouth-pretrigger.sh
580 + inst_hook pre-pivot 90 "$moddir"/plymouth-newroot.sh
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
589 - if ! dracut_module_included "systemd"; then
590 - inst_hook initqueue/timeout 10 "$moddir/btrfs_timeout.sh"
592 + inst_hook initqueue/timeout 10 "$moddir/btrfs_timeout.sh"
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() {
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"
610 - if [ "$tty_echo_off" = yes ]; then
611 - stty_orig="$(stty -g)"
614 + if [ "$tty_echo_off" = yes ]; then
615 + stty_orig="$(stty -g)"
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
626 - [ -n "$tty_prompt" ] && printf '\n' >&2
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
635 + [ -n "$tty_prompt" ] && printf '\n' >&2
638 - [ "$tty_echo_off" = yes ] && stty "$stty_orig"
640 + [ "$tty_echo_off" = yes ] && stty "$stty_orig"
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
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
658 echo "$luks $dev - timeout=0,$allowdiscards" >> /etc/crypttab
660 -if command -v systemctl > /dev/null; then
661 - systemctl daemon-reload
662 - systemctl start cryptsetup.target
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
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
675 [[ $hostonly ]] || [[ $mount_needs ]] && {
676 for fs in "${host_fs_types[@]}"; do
677 @@ -20,17 +20,6 @@ check() {
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
685 - if grep -q "pkcs11-uri" "$dracutsysrootdir"/etc/crypttab; then
688 - if grep -q "tpm2-device=" "$dracutsysrootdir"/etc/crypttab; then
695 @@ -96,13 +85,11 @@ install() {
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"
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"
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"
718 - if dracut_module_included "systemd"; then
719 - # the cryptsetup targets are already pulled in by 00systemd, but not
720 - # the enablement symlinks
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
734 dracut_need_initqueue
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)
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
749 if [ -n "$PARTUUID" ]; then
750 for uuid in $PARTUUID; do
752 @@ -58,28 +52,13 @@ else
753 luksname="luks-$uuid"
756 - if [ -z "$DRACUT_SYSTEMD" ]; then
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
765 - luksname=$(dev_unit_name "$luksname")
766 - # shellcheck disable=SC1003
767 - luksname="$(str_replace "$luksname" '\' '\\')"
769 - if ! crypttab_contains "$uuid"; then
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
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
787 elif [ -n "$SERIAL" ]; then
788 @@ -98,28 +77,13 @@ else
789 luksname="luks-$serialid"
792 - if [ -z "$DRACUT_SYSTEMD" ]; then
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
801 - luksname=$(dev_unit_name "$luksname")
802 - # shellcheck disable=SC1003
803 - luksname="$(str_replace "$luksname" '\' '\\')"
805 - if ! crypttab_contains "$serialid"; then
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
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
823 elif [ -n "$LUKS" ]; then
824 @@ -138,30 +102,14 @@ else
825 luksname="luks-$luksid"
828 - if [ -z "$DRACUT_SYSTEMD" ]; then
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
838 - luksname=$(dev_unit_name "$luksname")
839 - # shellcheck disable=SC1003
840 - luksname="$(str_replace "$luksname" '\' '\\')"
842 - if ! crypttab_contains "$luksid"; then
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
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
861 if [ $is_keysource -eq 0 ]; then
863 @@ -175,21 +123,12 @@ else
866 elif getargbool 0 rd.auto; then
867 - if [ -z "$DRACUT_SYSTEMD" ]; then
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
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
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
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"
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
903 - checkisomd5 --verbose "$livedev"
905 + checkisomd5 --verbose "$livedev"
906 if [ $? -eq 1 ]; then
907 die "CD check failed!"
910 - type plymouth > /dev/null 2>&1 && plymouth --show-splash
913 ln -s "$livedev" /run/initramfs/livedev
914 @@ -142,7 +135,6 @@ do_live_overlay() {
916 if [ -n "$overlayfs" ]; then
918 - [ -n "$DRACUT_SYSTEMD" ] && reloadsysrootmountunit=":>/xor_overlayfs;"
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;"
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;"
942 @@ -175,7 +161,6 @@ do_live_overlay() {
943 die "OverlayFS is required but not available."
946 - [ -n "$DRACUT_SYSTEMD" ] && reloadsysrootmountunit=":>/xor_overlayfs;"
947 m='OverlayFS is not available; using temporary Device-mapper overlay.'
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}"
961 - plymouth ask-question --prompt="${m}" --command=true
964 - m=">>>${m//.[[:space:]]/.} <<<"
965 - systemd-ask-password --timeout=0 "${m}"
968 - type plymouth > /dev/null 2>&1 && plymouth --ping && plymouth --quit
969 - read -s -r -p $'\n\n'"${m}" -n 1 _
971 + read -s -r -p $'\n\n'"${m}" -n 1 _
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;"
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
983 elif [ -d /run/initramfs/squashfs/proc ]; then
985 - if [ -z "$overlayfs" ] && [ -n "$DRACUT_SYSTEMD" ]; then
986 - reloadsysrootmountunit=":>/xor_overlayfs;"
990 die "Failed to find a root filesystem in $SQUASHED."
991 @@ -384,16 +349,12 @@ if [ -n "$overlayfs" ]; then
993 ovlfs=lowerdir=/run/rootfsbase
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
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
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
1008 + [ -n "$ROOTFLAGS" ] && ROOTFLAGS="-o $ROOTFLAGS"
1009 + printf 'mount %s /dev/mapper/live-rw %s\n' "$ROOTFLAGS" "$NEWROOT" > "$hookdir"/mount/01-$$-live.sh
1011 [ -e "$SQUASHED" ] && umount -l /run/initramfs/squashfs
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"
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"
1037 + inst_hook cmdline 01 "$moddir/parse-kernel.sh"
1038 inst_simple "$moddir/insmodpost.sh" /sbin/insmodpost.sh
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
1050 dracut_need_initqueue
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
1063 - if [[ -e $dracutsysrootdir$systemdsystemunitdir/mdadm-last-resort@.service ]]; then
1064 - inst_simple "$systemdsystemunitdir"/mdadm-last-resort@.service
1066 - if [[ -e $dracutsysrootdir$systemdsystemunitdir/mdadm-last-resort@.timer ]]; then
1067 - inst_simple "$systemdsystemunitdir"/mdadm-last-resort@.timer
1069 - if [[ -e $dracutsysrootdir$systemdsystemunitdir/mdadm-grow-continue@.service ]]; then
1070 - inst_simple "$systemdsystemunitdir"/mdadm-grow-continue@.service
1073 inst_hook pre-shutdown 30 "$moddir/mdmon-pre-shutdown.sh"
1074 dracut_need_initqueue
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"
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
1088 - inst_simple "${moddir}/multipathd.service" "${systemdsystemunitdir}/multipathd.service"
1089 - $SYSTEMCTL -q --root "$initdir" enable multipathd.service
1091 - inst_hook pre-trigger 02 "$moddir/multipathd.sh"
1092 - inst_hook cleanup 02 "$moddir/multipathd-stop.sh"
1094 + inst_hook pre-trigger 02 "$moddir/multipathd.sh"
1095 + inst_hook cleanup 02 "$moddir/multipathd-stop.sh"
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
1106 -if [ -f /etc/cmdline.d/99zipl.conf ]; then
1107 - systemctl restart dracut-cmdline.service
1108 - systemctl restart systemd-udev-trigger.service
1110 : > /tmp/install.zipl.cmdline-done
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() {
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
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
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
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
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() {
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
1153 +[ -f /etc/fstab ] && fstab_mount /etc/fstab
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
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
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
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
1179 : > /tmp/iscsiuio-started
1180 @@ -159,11 +158,6 @@ handle_netroot() {
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 :-/
1191 if [ -z "$iscsi_initiator" ]; then
1192 @@ -180,11 +174,6 @@ handle_netroot() {
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 :-/
1203 if [ -z "$iscsi_target_port" ]; then
1204 @@ -204,17 +193,10 @@ handle_netroot() {
1205 if ! [ -e /etc/iscsi/initiatorname.iscsi ]; then
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 :-/
1215 - if [ -z "$DRACUT_SYSTEMD" ]; then
1222 # FIXME $iscsi_protocol??
1224 @@ -226,8 +208,7 @@ handle_netroot() {
1225 wait_for_dev -n /dev/root
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
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
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
1249 if [[ $hostonly ]]; then
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"
1257 - if ! dracut_module_included "systemd"; then
1258 - inst "$moddir/mount-lun.sh" "/bin/mount-lun.sh"
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 \
1271 - iscsiuio.socket; do
1272 - $SYSTEMCTL -q --root "$initdir" enable "$i"
1275 - mkdir -p "${initdir}/$systemdsystemunitdir/iscsid.service.d"
1278 - echo "DefaultDependencies=no"
1279 - echo "Conflicts=shutdown.target"
1280 - echo "Before=shutdown.target"
1281 - } > "${initdir}/$systemdsystemunitdir/iscsid.service.d/dracut.conf"
1283 - mkdir -p "${initdir}/$systemdsystemunitdir/iscsid.socket.d"
1286 - echo "DefaultDependencies=no"
1287 - echo "Conflicts=shutdown.target"
1288 - echo "Before=shutdown.target sockets.target"
1289 - } > "${initdir}/$systemdsystemunitdir/iscsid.socket.d/dracut.conf"
1291 - mkdir -p "${initdir}/$systemdsystemunitdir/iscsiuio.service.d"
1294 - echo "DefaultDependencies=no"
1295 - echo "Conflicts=shutdown.target"
1296 - echo "Before=shutdown.target"
1297 - } > "${initdir}/$systemdsystemunitdir/iscsiuio.service.d/dracut.conf"
1299 - mkdir -p "${initdir}/$systemdsystemunitdir/iscsiuio.socket.d"
1302 - echo "DefaultDependencies=no"
1303 - echo "Conflicts=shutdown.target"
1304 - echo "Before=shutdown.target sockets.target"
1305 - } > "${initdir}/$systemdsystemunitdir/iscsiuio.socket.d/dracut.conf"
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
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
1320 -RemainAfterExit=false
1321 -ExecStart=-/usr/bin/true
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
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
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
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
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 :-/
1367 # If not given on the cmdline and initiator-name available via iBFT
1368 @@ -126,11 +119,6 @@ if [ -z "$iscsi_initiator" ] && [ -f /sy
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 :-/
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
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() {
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
1399 dracut_need_initqueue
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
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
1412 - write_fs_tab /dev/root "$nbdfstype" "$fsopts"
1413 + write_fs_tab /dev/root "$nbdfstype" "$fsopts"
1415 - printf '/bin/mount %s\n' \
1417 - > "$hookdir"/mount/01-$$-nbd.sh
1419 - mkdir -p /run/systemd/system/sysroot.mount.d
1420 - cat << EOF > /run/systemd/system/sysroot.mount.d/dhcp.conf
1427 - systemctl --no-block daemon-reload
1429 - # if we're on systemd, use the nbd-generator script
1430 - # to create the /sysroot mount.
1431 + printf '/bin/mount %s\n' \
1433 + > "$hookdir"/mount/01-$$-nbd.sh
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"
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
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() {
1460 - if ! dracut_module_included "systemd"; then
1461 - inst_hook cmdline 10 "$moddir/parse-resume.sh"
1463 - inst_script "$moddir/parse-resume.sh" /lib/dracut/parse-resume.sh
1465 + inst_hook cmdline 10 "$moddir/parse-resume.sh"
1467 inst_script "$moddir/resume.sh" /lib/dracut/resume.sh
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() {
1474 inst_multiple umount
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"
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"
1485 inst_hook initqueue/timeout 99 "$moddir/rootfallback.sh"
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() {
1492 inst_multiple -o /etc/udev/udev.conf
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
1500 - if ! [[ -f ${initdir}${systemdutildir}/systemd-udevd ]]; then
1501 - ln -fs "$_i" "${initdir}${systemdutildir}"/systemd-udevd
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!"
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() {
1519 - if ! dracut_module_included "systemd"; then
1520 - inst_hook pre-pivot 50 "$moddir/mount-usr.sh"
1522 + inst_hook pre-pivot 50 "$moddir/mount-usr.sh"
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() {
1532 - if command -v systemd-escape > /dev/null; then
1533 - systemd-escape -p -- "$dev"
1537 if [ "$dev" = "/" -o -z "$dev" ]; then
1540 @@ -48,53 +43,6 @@ dev_unit_name() {
1541 printf -- "%s" "$dev"
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() {
1552 - [ -z "$DRACUT_SYSTEMD" ] && return 0
1554 - if [ "$1" = "-n" ]; then
1559 - if [ -n "$2" ]; then
1562 - _timeout=$(getarg rd.timeout)
1565 - _timeout=${_timeout:-0}
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
1575 - if ! [ -f "${PREFIX}/etc/systemd/system/${_name}.device.d/timeout.conf" ]; then
1576 - mkdir -p "${PREFIX}/etc/systemd/system/${_name}.device.d"
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
1586 - if [ -z "$PREFIX" ] && [ "$_needreload" = 1 ] && [ -z "$_noreload" ]; then
1587 - /sbin/initqueue --onetime --unique --name daemon-reload systemctl daemon-reload
1591 # wait_for_dev <dev> [<timeout>]
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"
1598 - set_systemd_timeout_for_dev $_noreload "$@"
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
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
1618 type wait_for_dev > /dev/null 2>&1 || . /lib/dracut-dev-lib.sh
1620 -export DRACUT_SYSTEMD
1622 if [ -n "$NEWROOT" ]; then
1623 [ -d "$NEWROOT" ] || mkdir -p -m 0755 "$NEWROOT"
1624 @@ -63,33 +62,19 @@ trim() {
1628 -if [ -z "$DRACUT_SYSTEMD" ]; then
1632 - echo "<28>dracut Warning: $*" > /dev/kmsg
1633 - echo "dracut Warning: $*" >&2
1638 - echo "<30>dracut: $*" > /dev/kmsg
1639 - if [ "$DRACUT_QUIET" != "yes" ]; then
1640 - echo "dracut: $*" >&2
1647 - echo "Warning: $*" >&2
1655 + echo "<28>dracut Warning: $*" > /dev/kmsg
1656 + echo "dracut Warning: $*" >&2
1662 + echo "<30>dracut: $*" > /dev/kmsg
1663 + if [ "$DRACUT_QUIET" != "yes" ]; then
1664 + echo "dracut: $*" >&2
1669 while read -r line || [ -n "$line" ]; do
1670 @@ -464,10 +449,6 @@ die() {
1671 source_hook "shutdown-emergency"
1674 - if [ -n "$DRACUT_SYSTEMD" ]; then
1675 - systemctl --no-block --force halt
1681 @@ -924,43 +905,34 @@ fi
1683 _emergency_shell() {
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
1693 - source_hook "$hook"
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
1700 - echo 'To get more debug information in the report,'
1701 - echo 'reboot with "rd.debug" added to the kernel command line.'
1704 - echo 'Dropping to debug shell.'
1706 + source_hook "$hook"
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
1713 - export PS1="$_name:\${PWD}# "
1714 - [ -e /.profile ] || : > /.profile
1716 + echo 'To get more debug information in the report,'
1717 + echo 'reboot with "rd.debug" added to the kernel command line.'
1720 + echo 'Dropping to debug shell.'
1722 + export PS1="$_name:\${PWD}# "
1723 + [ -e /.profile ] || : > /.profile
1724 _ctty="$(RD_DEBUG='' getarg rd.ctty=)" && _ctty="/dev/${_ctty##*/}"
1725 - if [ -z "$_ctty" ]; then
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
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
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
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
1750 @@ -976,11 +948,6 @@ emergency_shell() {
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
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
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
1772 UDEV_QUEUE_EMPTY="udevadm settle --timeout=0"
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
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
1786 + inst_multiple switch_root || dfatal "Failed to install switch_root"
1787 + inst_hook cmdline 10 "$moddir/parse-root-opts.sh"
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
1795 - if [[ -f $initdir/lib/dracut/need-initqueue ]] || ! dracut_module_included "systemd"; then
1796 + if [[ -f $initdir/lib/dracut/need-initqueue ]]; then
1798 - if dracut_module_included "systemd"; then
1799 - export DRACUT_SYSTEMD=1
1801 export PREFIX="$initdir"
1802 export hookdir=/lib/dracut/hooks