1 diff -urpa dracut-048.orig/dracut-logger.sh dracut-048/dracut-logger.sh
2 --- dracut-048.orig/dracut-logger.sh 2018-07-06 08:37:51.000000000 +0000
3 +++ dracut-048/dracut-logger.sh 2018-07-21 21:00:11.629092688 +0000
4 @@ -144,16 +144,7 @@ dlog_init() {
7 if (( $sysloglvl > 0 )); then
8 - if [[ -d /run/systemd/journal ]] \
9 - && type -P systemd-cat &>/dev/null \
10 - && systemctl --quiet is-active systemd-journald.socket &>/dev/null \
11 - && { echo "dracut-$DRACUT_VERSION" | systemd-cat -t 'dracut' &>/dev/null; } ; then
12 - readonly _systemdcatfile="$DRACUT_TMPDIR/systemd-cat"
13 - mkfifo "$_systemdcatfile"
15 - systemd-cat -t 'dracut' --level-prefix=true <"$_systemdcatfile" &
16 - exec 15>"$_systemdcatfile"
17 - elif ! [ -S /dev/log -a -w /dev/log ] || ! command -v logger >/dev/null; then
18 + if ! [ -S /dev/log -a -w /dev/log ] || ! command -v logger >/dev/null; then
19 # We cannot log to syslog, so turn this facility off.
22 diff -urpa dracut-048.orig/dracut.sh dracut-048/dracut.sh
23 --- dracut-048.orig/dracut.sh 2018-07-21 20:59:45.490094246 +0000
24 +++ dracut-048/dracut.sh 2018-07-21 21:00:11.630092687 +0000
25 @@ -1077,8 +1077,7 @@ if [[ ! $print_cmdline ]]; then
27 if ! [[ -s $uefi_stub ]]; then
29 - "${systemdutildir}/boot/efi/linux${EFI_MACHINE_TYPE_NAME}.efi.stub" \
30 - "/usr/lib/gummiboot/linux${EFI_MACHINE_TYPE_NAME}.efi.stub"; do
31 + "/usr/lib/gummiboot/linux${EFI_MACHINE_TYPE_NAME}.efi.stub"; do
32 [[ -s $uefi_stub ]] || continue
35 @@ -1319,32 +1318,6 @@ if ! [[ -d "$udevdir" ]]; then
36 [[ -e /usr/lib/udev/collect ]] && udevdir=/usr/lib/udev
39 -[[ -d $systemdutildir ]] \
40 - || systemdutildir=$(pkg-config systemd --variable=systemdutildir 2>/dev/null)
42 -if ! [[ -d "$systemdutildir" ]]; then
43 - [[ -e /lib/systemd/systemd-udevd ]] && systemdutildir=/lib/systemd
44 - [[ -e /usr/lib/systemd/systemd-udevd ]] && systemdutildir=/usr/lib/systemd
47 -[[ -d $systemdsystemunitdir ]] \
48 - || systemdsystemunitdir=$(pkg-config systemd --variable=systemdsystemunitdir 2>/dev/null)
50 -[[ -d "$systemdsystemunitdir" ]] || systemdsystemunitdir=${systemdutildir}/system
52 -[[ -d $systemdsystemconfdir ]] \
53 - || systemdsystemconfdir=$(pkg-config systemd --variable=systemdsystemconfdir 2>/dev/null)
55 -[[ -d "$systemdsystemconfdir" ]] || systemdsystemconfdir=/etc/systemd/system
57 -[[ -d $tmpfilesdir ]] \
58 - || tmpfilesdir=$(pkg-config systemd --variable=tmpfilesdir 2>/dev/null)
60 -if ! [[ -d "$tmpfilesdir" ]]; then
61 - [[ -d /lib/tmpfiles.d ]] && tmpfilesdir=/lib/tmpfiles.d
62 - [[ -d /usr/lib/tmpfiles.d ]] && tmpfilesdir=/usr/lib/tmpfiles.d
65 export initdir dracutbasedir \
66 dracutmodules force_add_dracutmodules add_dracutmodules omit_dracutmodules \
68 @@ -1354,9 +1327,7 @@ export initdir dracutbasedir \
69 stdloglvl sysloglvl fileloglvl kmsgloglvl logfile \
70 debug host_fs_types host_devs swap_devs sshkey add_fstab \
71 DRACUT_VERSION udevdir prefix filesystems drivers \
72 - systemdutildir systemdsystemunitdir systemdsystemconfdir \
73 - hostonly_cmdline loginstall \
75 + hostonly_cmdline loginstall
78 # check all our modules to see if they should be sourced.
79 @@ -1558,17 +1529,6 @@ if [[ $kernel_only != yes ]]; then
80 cat "$f" >> "${initdir}/etc/fstab"
83 - if [[ $systemdutildir ]]; then
84 - if [ -d ${initdir}/$systemdutildir ]; then
85 - mkdir -p ${initdir}/etc/conf.d
87 - printf "%s\n" "systemdutildir=\"$systemdutildir\""
88 - printf "%s\n" "systemdsystemunitdir=\"$systemdsystemunitdir\""
89 - printf "%s\n" "systemdsystemconfdir=\"$systemdsystemconfdir\""
90 - } > ${initdir}/etc/conf.d/systemd.conf
94 if [[ $DRACUT_RESOLVE_LAZY ]] && [[ $DRACUT_INSTALL ]]; then
95 dinfo "*** Resolving executable dependencies ***"
96 find "$initdir" -type f -perm /0111 -not -path '*.ko' -print0 \
97 @@ -1849,23 +1809,4 @@ fi
99 command -v restorecon &>/dev/null && restorecon -- "$outfile"
101 -# We sync/fsfreeze only if we're operating on a live booted system.
102 -# It's possible for e.g. `kernel` to be installed as an RPM BuildRequires or equivalent,
103 -# and there's no reason to sync, and *definitely* no reason to fsfreeze.
104 -# Another case where this happens is rpm-ostree, which performs its own sync/fsfreeze
105 -# globally. See e.g. https://github.com/ostreedev/ostree/commit/8642ef5ab3fec3ac8eb8f193054852f83a8bc4d0
106 -if test -d /run/systemd/system; then
107 - if ! sync "$outfile" 2> /dev/null; then
108 - dinfo "dracut: sync operation on newly created initramfs $outfile failed"
112 - # use fsfreeze only if we're not writing to /
113 - if [[ "$(stat -c %m -- "$outfile")" != "/" && "$(stat -f -c %T -- "$outfile")" != "msdos" ]]; then
114 - if ! $(fsfreeze -f $(dirname "$outfile") 2>/dev/null && fsfreeze -u $(dirname "$outfile") 2>/dev/null); then
115 - dinfo "dracut: warning: could not fsfreeze $(dirname "$outfile")"
121 diff -urpa dracut-048.orig/modules.d/02caps/module-setup.sh dracut-048/modules.d/02caps/module-setup.sh
122 --- dracut-048.orig/modules.d/02caps/module-setup.sh 2018-07-06 08:37:51.000000000 +0000
123 +++ dracut-048/modules.d/02caps/module-setup.sh 2018-07-21 21:00:11.630092687 +0000
124 @@ -13,13 +13,9 @@ depends() {
128 - if ! dracut_module_included "systemd"; then
129 - inst_hook pre-pivot 00 "$moddir/caps.sh"
130 - inst $(type -P capsh 2>/dev/null) /usr/sbin/capsh
131 - # capsh wants bash and we need bash also
134 - dwarning "caps: does not work with systemd in the initramfs"
136 + inst_hook pre-pivot 00 "$moddir/caps.sh"
137 + inst $(type -P capsh 2>/dev/null) /usr/sbin/capsh
138 + # capsh wants bash and we need bash also
142 diff -urpa dracut-048.orig/modules.d/04watchdog/module-setup.sh dracut-048/modules.d/04watchdog/module-setup.sh
143 --- dracut-048.orig/modules.d/04watchdog/module-setup.sh 2018-07-06 08:37:51.000000000 +0000
144 +++ dracut-048/modules.d/04watchdog/module-setup.sh 2018-07-21 21:00:11.630092687 +0000
145 @@ -12,21 +12,17 @@ depends() {
149 - # Do not add watchdog hooks if systemd module is included
150 - # In that case, systemd will manage watchdog kick
151 - if ! dracut_module_included "systemd"; then
152 - inst_hook cmdline 00 "$moddir/watchdog.sh"
153 - inst_hook cmdline 50 "$moddir/watchdog.sh"
154 - inst_hook pre-trigger 00 "$moddir/watchdog.sh"
155 - inst_hook initqueue 00 "$moddir/watchdog.sh"
156 - inst_hook mount 00 "$moddir/watchdog.sh"
157 - inst_hook mount 50 "$moddir/watchdog.sh"
158 - inst_hook mount 99 "$moddir/watchdog.sh"
159 - inst_hook pre-pivot 00 "$moddir/watchdog.sh"
160 - inst_hook pre-pivot 99 "$moddir/watchdog.sh"
161 - inst_hook cleanup 00 "$moddir/watchdog.sh"
162 - inst_hook cleanup 99 "$moddir/watchdog.sh"
164 + inst_hook cmdline 00 "$moddir/watchdog.sh"
165 + inst_hook cmdline 50 "$moddir/watchdog.sh"
166 + inst_hook pre-trigger 00 "$moddir/watchdog.sh"
167 + inst_hook initqueue 00 "$moddir/watchdog.sh"
168 + inst_hook mount 00 "$moddir/watchdog.sh"
169 + inst_hook mount 50 "$moddir/watchdog.sh"
170 + inst_hook mount 99 "$moddir/watchdog.sh"
171 + inst_hook pre-pivot 00 "$moddir/watchdog.sh"
172 + inst_hook pre-pivot 99 "$moddir/watchdog.sh"
173 + inst_hook cleanup 00 "$moddir/watchdog.sh"
174 + inst_hook cleanup 99 "$moddir/watchdog.sh"
175 inst_hook emergency 02 "$moddir/watchdog-stop.sh"
176 inst_multiple -o wdctl
178 diff -urpa dracut-048.orig/modules.d/10i18n/console_init.sh dracut-048/modules.d/10i18n/console_init.sh
179 --- dracut-048.orig/modules.d/10i18n/console_init.sh 2018-07-06 08:37:51.000000000 +0000
180 +++ dracut-048/modules.d/10i18n/console_init.sh 2018-07-21 21:00:11.630092687 +0000
184 -[ -n "$DRACUT_SYSTEMD" ] && exit 0
186 -if [ -x $systemdutildir/systemd-vconsole-setup ]; then
187 - $systemdutildir/systemd-vconsole-setup "$@"
190 [ -e /etc/vconsole.conf ] && . /etc/vconsole.conf
192 DEFAULT_FONT=LatArCyrHeb-16
193 diff -urpa dracut-048.orig/modules.d/10i18n/module-setup.sh dracut-048/modules.d/10i18n/module-setup.sh
194 --- dracut-048.orig/modules.d/10i18n/module-setup.sh 2018-07-06 08:37:51.000000000 +0000
195 +++ dracut-048/modules.d/10i18n/module-setup.sh 2018-07-21 21:00:11.630092687 +0000
196 @@ -16,12 +16,6 @@ depends() {
200 - if dracut_module_included "systemd"; then
203 - [[ -f /etc/vconsole.conf ]] && . /etc/vconsole.conf
206 KBDSUBDIRS=consolefonts,consoletrans,keymaps,unimaps
207 DEFAULT_FONT="${i18n_default_font:-LatArCyrHeb-16}"
208 I18N_CONF="/etc/locale.conf"
209 @@ -99,11 +93,9 @@ install() {
211 inst_multiple setfont loadkeys kbd_mode stty
213 - if ! dracut_module_included "systemd"; then
214 - inst ${moddir}/console_init.sh /lib/udev/console_init
215 - inst_rules ${moddir}/10-console.rules
216 - inst_hook cmdline 20 "${moddir}/parse-i18n.sh"
218 + inst ${moddir}/console_init.sh /lib/udev/console_init
219 + inst_rules ${moddir}/10-console.rules
220 + inst_hook cmdline 20 "${moddir}/parse-i18n.sh"
222 if [[ ${kbddir} != "/usr/share" ]]; then
224 @@ -222,19 +214,11 @@ install() {
225 inst_simple ${kbddir}/unimaps/${FONT_UNIMAP}.uni
228 - if dracut_module_included "systemd" && [[ -f ${I18N_CONF} ]]; then
229 - inst_simple ${I18N_CONF}
231 - mksubdirs ${initdir}${I18N_CONF}
232 - print_vars LC_ALL LANG >> ${initdir}${I18N_CONF}
234 + mksubdirs ${initdir}${I18N_CONF}
235 + print_vars LC_ALL LANG >> ${initdir}${I18N_CONF}
237 - if dracut_module_included "systemd" && [[ -f ${VCONFIG_CONF} ]]; then
238 - inst_simple ${VCONFIG_CONF}
240 - mksubdirs ${initdir}${VCONFIG_CONF}
241 - print_vars KEYMAP EXT_KEYMAPS UNICODE FONT FONT_MAP FONT_UNIMAP >> ${initdir}${VCONFIG_CONF}
243 + mksubdirs ${initdir}${VCONFIG_CONF}
244 + print_vars KEYMAP EXT_KEYMAPS UNICODE FONT FONT_MAP FONT_UNIMAP >> ${initdir}${VCONFIG_CONF}
248 diff -urpa dracut-048.orig/modules.d/40network/net-lib.sh dracut-048/modules.d/40network/net-lib.sh
249 --- dracut-048.orig/modules.d/40network/net-lib.sh 2018-07-06 08:37:51.000000000 +0000
250 +++ dracut-048/modules.d/40network/net-lib.sh 2018-07-21 21:00:11.630092687 +0000
251 @@ -52,7 +52,7 @@ iface_name() {
252 configured_ifaces() {
253 local IFACES="" iface_id="" rv=1
254 [ -e "/tmp/net.ifaces" ] && read IFACES < /tmp/net.ifaces
255 - if { pidof udevd || pidof systemd-udevd; } > /dev/null; then
256 + if { pidof udevd; } > /dev/null; then
257 for iface_id in $IFACES; do
258 echo $(iface_name $iface_id)
260 diff -urpa dracut-048.orig/modules.d/50plymouth/module-setup.sh dracut-048/modules.d/50plymouth/module-setup.sh
261 --- dracut-048.orig/modules.d/50plymouth/module-setup.sh 2018-07-06 08:37:51.000000000 +0000
262 +++ dracut-048/modules.d/50plymouth/module-setup.sh 2018-07-21 21:00:11.631092687 +0000
263 @@ -41,9 +41,7 @@ install() {
265 inst_multiple readlink
267 - if ! dracut_module_included "systemd"; then
268 - inst_hook pre-trigger 10 "$moddir"/plymouth-pretrigger.sh
269 - inst_hook pre-pivot 90 "$moddir"/plymouth-newroot.sh
271 + inst_hook pre-trigger 10 "$moddir"/plymouth-pretrigger.sh
272 + inst_hook pre-pivot 90 "$moddir"/plymouth-newroot.sh
275 diff -urpa dracut-048.orig/modules.d/50plymouth/plymouth-newroot.sh dracut-048/modules.d/50plymouth/plymouth-newroot.sh
276 --- dracut-048.orig/modules.d/50plymouth/plymouth-newroot.sh 2018-07-06 08:37:51.000000000 +0000
277 +++ dracut-048/modules.d/50plymouth/plymouth-newroot.sh 2018-07-21 21:00:11.631092687 +0000
281 -if type plymouth >/dev/null 2>&1 && [ -z "$DRACUT_SYSTEMD" ]; then
282 +if type plymouth >/dev/null 2>&1; then
283 plymouth --newroot=$NEWROOT
285 diff -urpa dracut-048.orig/modules.d/50plymouth/plymouth-pretrigger.sh dracut-048/modules.d/50plymouth/plymouth-pretrigger.sh
286 --- dracut-048.orig/modules.d/50plymouth/plymouth-pretrigger.sh 2018-07-06 08:37:51.000000000 +0000
287 +++ dracut-048/modules.d/50plymouth/plymouth-pretrigger.sh 2018-07-21 21:00:11.631092687 +0000
291 -if type plymouthd >/dev/null 2>&1 && [ -z "$DRACUT_SYSTEMD" ]; then
292 +if type plymouthd >/dev/null 2>&1; then
293 if getargbool 1 plymouth.enable && getargbool 1 rd.plymouth -d -n rd_NO_PLYMOUTH; then
294 # first trigger graphics subsystem
295 udevadm trigger --action=add --attr-match=class=0x030000 >/dev/null 2>&1
296 diff -urpa dracut-048.orig/modules.d/90btrfs/module-setup.sh dracut-048/modules.d/90btrfs/module-setup.sh
297 --- dracut-048.orig/modules.d/90btrfs/module-setup.sh 2018-07-06 08:37:51.000000000 +0000
298 +++ dracut-048/modules.d/90btrfs/module-setup.sh 2018-07-21 21:00:11.631092687 +0000
299 @@ -42,9 +42,7 @@ install() {
303 - if ! dracut_module_included "systemd"; then
304 - inst_hook initqueue/timeout 10 "$moddir/btrfs_timeout.sh"
306 + inst_hook initqueue/timeout 10 "$moddir/btrfs_timeout.sh"
308 inst_multiple -o btrfsck btrfs-zero-log
309 inst $(command -v btrfs) /sbin/btrfs
310 diff -urpa dracut-048.orig/modules.d/90crypt/crypt-run-generator.sh dracut-048/modules.d/90crypt/crypt-run-generator.sh
311 --- dracut-048.orig/modules.d/90crypt/crypt-run-generator.sh 2018-07-06 08:37:51.000000000 +0000
312 +++ dracut-048/modules.d/90crypt/crypt-run-generator.sh 2018-07-21 21:00:11.631092687 +0000
315 echo "$luks $dev - timeout=0,$allowdiscards" >> /etc/crypttab
317 -if command -v systemctl >/dev/null; then
318 - systemctl daemon-reload
319 - systemctl start cryptsetup.target
322 diff -urpa dracut-048.orig/modules.d/90crypt/module-setup.sh dracut-048/modules.d/90crypt/module-setup.sh
323 --- dracut-048.orig/modules.d/90crypt/module-setup.sh 2018-07-21 20:59:45.494094245 +0000
324 +++ dracut-048/modules.d/90crypt/module-setup.sh 2018-07-21 21:00:11.631092687 +0000
328 # if cryptsetup is not installed, then we cannot support encrypted devices.
329 - require_any_binary $systemdutildir/systemd-cryptsetup cryptsetup || return 1
330 + require_any_binary cryptsetup || return 1
332 [[ $hostonly ]] || [[ $mount_needs ]] && {
333 for fs in "${host_fs_types[@]}"; do
334 @@ -59,13 +59,11 @@ install() {
337 inst_hook cmdline 30 "$moddir/parse-crypt.sh"
338 - if ! dracut_module_included "systemd"; then
339 - inst_multiple cryptsetup rmdir readlink umount
340 - inst_script "$moddir"/cryptroot-ask.sh /sbin/cryptroot-ask
341 - inst_script "$moddir"/probe-keydev.sh /sbin/probe-keydev
342 - inst_hook cmdline 10 "$moddir/parse-keydev.sh"
343 - inst_hook cleanup 30 "$moddir/crypt-cleanup.sh"
345 + inst_multiple cryptsetup rmdir readlink umount
346 + inst_script "$moddir"/cryptroot-ask.sh /sbin/cryptroot-ask
347 + inst_script "$moddir"/probe-keydev.sh /sbin/probe-keydev
348 + inst_hook cmdline 10 "$moddir/parse-keydev.sh"
349 + inst_hook cleanup 30 "$moddir/crypt-cleanup.sh"
351 if [[ $hostonly ]] && [[ -f /etc/crypttab ]]; then
352 # filter /etc/crypttab for the devices we need
353 @@ -135,17 +133,5 @@ install() {
355 inst_simple "$moddir/crypt-lib.sh" "/lib/dracut-crypt-lib.sh"
357 - if dracut_module_included "systemd"; then
359 - $systemdutildir/system-generators/systemd-cryptsetup-generator \
360 - $systemdutildir/systemd-cryptsetup \
361 - $systemdsystemunitdir/systemd-ask-password-console.path \
362 - $systemdsystemunitdir/systemd-ask-password-console.service \
363 - $systemdsystemunitdir/cryptsetup.target \
364 - $systemdsystemunitdir/sysinit.target.wants/cryptsetup.target \
365 - systemd-ask-password systemd-tty-ask-password-agent
366 - inst_script "$moddir"/crypt-run-generator.sh /sbin/crypt-run-generator
369 dracut_need_initqueue
371 diff -urpa dracut-048.orig/modules.d/90crypt/parse-crypt.sh dracut-048/modules.d/90crypt/parse-crypt.sh
372 --- dracut-048.orig/modules.d/90crypt/parse-crypt.sh 2018-07-06 08:37:51.000000000 +0000
373 +++ dracut-048/modules.d/90crypt/parse-crypt.sh 2018-07-21 21:00:11.631092687 +0000
374 @@ -40,12 +40,6 @@ else
375 LUKS=$(getargs rd.luks.uuid -d rd_LUKS_UUID)
376 tout=$(getarg rd.luks.key.tout)
378 - if [ -e /etc/crypttab ]; then
379 - while read -r _ _dev _ || [ -n "$_dev" ]; do
380 - set_systemd_timeout_for_dev "$_dev"
381 - done < /etc/crypttab
384 if [ -n "$PARTUUID" ]; then
385 for uuid in $PARTUUID; do
387 @@ -56,26 +50,12 @@ else
388 luksname="luks-$uuid"
391 - if [ -z "$DRACUT_SYSTEMD" ]; then
393 - printf -- 'ENV{ID_PART_ENTRY_UUID}=="*%s*", ' "$uuid"
394 - printf -- 'RUN+="%s --settled --unique --onetime ' "$(command -v initqueue)"
395 - printf -- '--name cryptroot-ask-%%k %s ' "$(command -v cryptroot-ask)"
396 - printf -- '$env{DEVNAME} %s %s"\n' "$luksname" "$tout"
397 - } >> /etc/udev/rules.d/70-luks.rules.new
399 - luksname=$(dev_unit_name "$luksname")
400 - luksname="$(str_replace "$luksname" '\' '\\')"
402 - if ! crypttab_contains "$uuid"; then
404 - printf -- 'ENV{ID_PART_ENTRY_UUID}=="*%s*", ' "$uuid"
405 - printf -- 'RUN+="%s --settled --unique --onetime ' "$(command -v initqueue)"
406 - printf -- '--name systemd-cryptsetup-%%k %s start ' "$(command -v systemctl)"
407 - printf -- 'systemd-cryptsetup@%s.service"\n' "$luksname"
408 - } >> /etc/udev/rules.d/70-luks.rules.new
412 + printf -- 'ENV{ID_PART_ENTRY_UUID}=="*%s*", ' "$uuid"
413 + printf -- 'RUN+="%s --settled --unique --onetime ' "$(command -v initqueue)"
414 + printf -- '--name cryptroot-ask-%%k %s ' "$(command -v cryptroot-ask)"
415 + printf -- '$env{DEVNAME} %s %s"\n' "$luksname" "$tout"
416 + } >> /etc/udev/rules.d/70-luks.rules.new
419 elif [ -n "$SERIAL" ]; then
420 @@ -88,26 +68,12 @@ else
421 luksname="luks-$serialid"
424 - if [ -z "$DRACUT_SYSTEMD" ]; then
426 - printf -- 'ENV{ID_SERIAL_SHORT}=="*%s*", ' "$serialid"
427 - printf -- 'RUN+="%s --settled --unique --onetime ' "$(command -v initqueue)"
428 - printf -- '--name cryptroot-ask-%%k %s ' "$(command -v cryptroot-ask)"
429 - printf -- '$env{DEVNAME} %s %s"\n' "$luksname" "$tout"
430 - } >> /etc/udev/rules.d/70-luks.rules.new
432 - luksname=$(dev_unit_name "$luksname")
433 - luksname="$(str_replace "$luksname" '\' '\\')"
435 - if ! crypttab_contains "$serialid"; then
437 - printf -- 'ENV{ID_SERIAL_SHORT}=="*%s*", ' "$serialid"
438 - printf -- 'RUN+="%s --settled --unique --onetime ' "$(command -v initqueue)"
439 - printf -- '--name systemd-cryptsetup-%%k %s start ' "$(command -v systemctl)"
440 - printf -- 'systemd-cryptsetup@%s.service"\n' "$luksname"
441 - } >> /etc/udev/rules.d/70-luks.rules.new
445 + printf -- 'ENV{ID_SERIAL_SHORT}=="*%s*", ' "$serialid"
446 + printf -- 'RUN+="%s --settled --unique --onetime ' "$(command -v initqueue)"
447 + printf -- '--name cryptroot-ask-%%k %s ' "$(command -v cryptroot-ask)"
448 + printf -- '$env{DEVNAME} %s %s"\n' "$luksname" "$tout"
449 + } >> /etc/udev/rules.d/70-luks.rules.new
452 elif [ -n "$LUKS" ]; then
453 @@ -120,28 +86,13 @@ else
454 luksname="luks-$luksid"
457 - if [ -z "$DRACUT_SYSTEMD" ]; then
459 - printf -- 'ENV{ID_FS_TYPE}=="crypto_LUKS", '
460 - printf -- 'ENV{ID_FS_UUID}=="*%s*", ' "$luksid"
461 - printf -- 'RUN+="%s --settled --unique --onetime ' "$(command -v initqueue)"
462 - printf -- '--name cryptroot-ask-%%k %s ' "$(command -v cryptroot-ask)"
463 - printf -- '$env{DEVNAME} %s %s"\n' "$luksname" "$tout"
464 - } >> /etc/udev/rules.d/70-luks.rules.new
466 - luksname=$(dev_unit_name "$luksname")
467 - luksname="$(str_replace "$luksname" '\' '\\')"
469 - if ! crypttab_contains "$luksid"; then
471 - printf -- 'ENV{ID_FS_TYPE}=="crypto_LUKS", '
472 - printf -- 'ENV{ID_FS_UUID}=="*%s*", ' "$luksid"
473 - printf -- 'RUN+="%s --settled --unique --onetime ' "$(command -v initqueue)"
474 - printf -- '--name systemd-cryptsetup-%%k %s start ' "$(command -v systemctl)"
475 - printf -- 'systemd-cryptsetup@%s.service"\n' "$luksname"
476 - } >> /etc/udev/rules.d/70-luks.rules.new
480 + printf -- 'ENV{ID_FS_TYPE}=="crypto_LUKS", '
481 + printf -- 'ENV{ID_FS_UUID}=="*%s*", ' "$luksid"
482 + printf -- 'RUN+="%s --settled --unique --onetime ' "$(command -v initqueue)"
483 + printf -- '--name cryptroot-ask-%%k %s ' "$(command -v cryptroot-ask)"
484 + printf -- '$env{DEVNAME} %s %s"\n' "$luksname" "$tout"
485 + } >> /etc/udev/rules.d/70-luks.rules.new
488 while [ "$uuid" != "${uuid#*-}" ]; do uuid=${uuid%%-*}${uuid#*-}; done
489 @@ -154,19 +105,11 @@ else
490 } >> "$hookdir/emergency/90-crypt.sh"
492 elif getargbool 0 rd.auto; then
493 - if [ -z "$DRACUT_SYSTEMD" ]; then
495 - printf -- 'ENV{ID_FS_TYPE}=="crypto_LUKS", RUN+="%s ' "$(command -v initqueue)"
496 - printf -- '--unique --settled --onetime --name cryptroot-ask-%%k '
497 - printf -- '%s $env{DEVNAME} luks-$env{ID_FS_UUID} %s"\n' "$(command -v cryptroot-ask)" "$tout"
498 - } >> /etc/udev/rules.d/70-luks.rules.new
501 - printf -- 'ENV{ID_FS_TYPE}=="crypto_LUKS", RUN+="%s ' "$(command -v initqueue)"
502 - printf -- '--unique --settled --onetime --name crypt-run-generator-%%k '
503 - printf -- '%s $env{DEVNAME} luks-$env{ID_FS_UUID}"\n' "$(command -v crypt-run-generator)"
504 - } >> /etc/udev/rules.d/70-luks.rules.new
507 + printf -- 'ENV{ID_FS_TYPE}=="crypto_LUKS", RUN+="%s ' "$(command -v initqueue)"
508 + printf -- '--unique --settled --onetime --name cryptroot-ask-%%k '
509 + printf -- '%s $env{DEVNAME} luks-$env{ID_FS_UUID} %s"\n' "$(command -v cryptroot-ask)" "$tout"
510 + } >> /etc/udev/rules.d/70-luks.rules.new
513 echo 'LABEL="luks_end"' >> /etc/udev/rules.d/70-luks.rules.new
514 diff -urpa dracut-048.orig/modules.d/90dmsquash-live/dmsquash-live-root.sh dracut-048/modules.d/90dmsquash-live/dmsquash-live-root.sh
515 --- dracut-048.orig/modules.d/90dmsquash-live/dmsquash-live-root.sh 2018-07-06 08:37:51.000000000 +0000
516 +++ dracut-048/modules.d/90dmsquash-live/dmsquash-live-root.sh 2018-07-21 21:00:11.632092687 +0000
517 @@ -41,12 +41,7 @@ fi
518 getarg rd.live.check -d check || check=""
519 if [ -n "$check" ]; then
520 type plymouth >/dev/null 2>&1 && plymouth --hide-splash
521 - if [ -n "$DRACUT_SYSTEMD" ]; then
522 - p=$(dev_unit_name "$livedev")
523 - systemctl start checkisomd5@${p}.service
525 - checkisomd5 --verbose $livedev
527 + checkisomd5 --verbose $livedev
528 if [ $? -eq 1 ]; then
529 die "CD check failed!"
531 @@ -81,9 +76,6 @@ else
532 if [ "$(blkid -o value -s TYPE $livedev)" != "ntfs" ]; then
533 mount -n -t $fstype -o ${liverw:-ro} $livedev /run/initramfs/live
535 - # Symlinking /usr/bin/ntfs-3g as /sbin/mount.ntfs seems to boot
536 - # at the first glance, but ends with lots and lots of squashfs
537 - # errors, because systemd attempts to kill the ntfs-3g process?!
538 if [ -x "/usr/bin/ntfs-3g" ]; then
539 ( exec -a @ntfs-3g ntfs-3g -o ${liverw:-ro} $livedev /run/initramfs/live ) | vwarn
541 @@ -137,7 +129,6 @@ do_live_overlay() {
543 if [ -n "$overlayfs" ]; then
545 - [ -n "$DRACUT_SYSTEMD" ] && reloadsysrootmountunit="yes"
549 @@ -148,7 +139,6 @@ do_live_overlay() {
550 ln -s /run/initramfs/overlayfs/ovlwork /run/ovlwork$opt
551 if [ -z "$overlayfs" ]; then
553 - [ -n "$DRACUT_SYSTEMD" ] && reloadsysrootmountunit="yes"
557 @@ -159,7 +149,6 @@ do_live_overlay() {
558 ln -s /run/initramfs/overlayfs$pathspec/../ovlwork /run/ovlwork$opt
559 if [ -z "$overlayfs" ]; then
561 - [ -n "$DRACUT_SYSTEMD" ] && reloadsysrootmountunit="yes"
565 @@ -169,7 +158,6 @@ do_live_overlay() {
567 m='OverlayFS is not available; using temporary Device-mapper overlay.'
568 unset -v overlayfs setup
569 - [ -n "$reloadsysrootmountunit" ] && unset -v reloadsysrootmountunit
573 @@ -182,23 +170,8 @@ do_live_overlay() {
574 m="$m"$'\n All root filesystem changes will be lost on shutdown.'
575 m="$m"$'\n Press [Enter] to continue.'
576 echo -e "\n\n\n\n${m}\n\n\n" > /dev/kmsg
577 - if [ -n "$DRACUT_SYSTEMD" ]; then
578 - if type plymouth >/dev/null 2>&1 && plymouth --ping ; then
579 - if getargbool 0 rhgb || getargbool 0 splash ; then
580 - m='>>>'$'\n''>>>'$'\n''>>>'$'\n\n\n'"$m"
581 - m="${m%n.*}"$'n.\n\n\n''<<<'$'\n''<<<'$'\n''<<<'
582 - plymouth display-message --text="${m}"
584 - plymouth ask-question --prompt="${m}" --command=true
587 - m=">>>${m//.[[:space:]]/.} <<<"
588 - systemd-ask-password --timeout=0 "${m}"
591 - type plymouth >/dev/null 2>&1 && plymouth --ping && plymouth --quit
592 - read -s -r -p $'\n\n'"${m}" -n 1 reply
594 + type plymouth >/dev/null 2>&1 && plymouth --ping && plymouth --quit
595 + read -s -r -p $'\n\n'"${m}" -n 1 reply
597 if [ -n "$overlayfs" ]; then
598 mkdir -m 0755 /run/overlayfs
599 @@ -354,11 +327,6 @@ if [ -b "$OSMIN_LOOPDEV" ]; then
600 echo "0 $sz snapshot $BASE_LOOPDEV $OSMIN_LOOPDEV P 8" | dmsetup create --readonly live-osimg-min
603 -if [ -n "$reloadsysrootmountunit" ]; then
605 - systemctl daemon-reload
608 ROOTFLAGS="$(getarg rootflags)"
610 if [ -n "$overlayfs" ]; then
611 @@ -375,18 +343,14 @@ if [ -n "$overlayfs" ]; then
613 mount -r $FSIMG /run/rootfsbase
615 - if [ -z "$DRACUT_SYSTEMD" ]; then
616 - #FIXME What to link to /dev/root? Is it even needed?
617 - printf 'mount -t overlay LiveOS_rootfs -o%s,%s %s\n' "$ROOTFLAGS" \
618 - 'lowerdir=/run/rootfsbase,upperdir=/run/overlayfs,workdir=/run/ovlwork' \
619 - "$NEWROOT" > $hookdir/mount/01-$$-live.sh
621 + #FIXME What to link to /dev/root? Is it even needed?
622 + printf 'mount -t overlay LiveOS_rootfs -o%s,%s %s\n' "$ROOTFLAGS" \
623 + 'lowerdir=/run/rootfsbase,upperdir=/run/overlayfs,workdir=/run/ovlwork' \
624 + "$NEWROOT" > $hookdir/mount/01-$$-live.sh
626 ln -s /dev/mapper/live-rw /dev/root
627 - if [ -z "$DRACUT_SYSTEMD" ]; then
628 - [ -n "$ROOTFLAGS" ] && ROOTFLAGS="-o $ROOTFLAGS"
629 - printf 'mount %s /dev/mapper/live-rw %s\n' "$ROOTFLAGS" "$NEWROOT" > $hookdir/mount/01-$$-live.sh
631 + [ -n "$ROOTFLAGS" ] && ROOTFLAGS="-o $ROOTFLAGS"
632 + printf 'mount %s /dev/mapper/live-rw %s\n' "$ROOTFLAGS" "$NEWROOT" > $hookdir/mount/01-$$-live.sh
633 ln -s $BASE_LOOPDEV /run/rootfsbase
636 diff -urpa dracut-048.orig/modules.d/90dmsquash-live/iso-scan.sh dracut-048/modules.d/90dmsquash-live/iso-scan.sh
637 --- dracut-048.orig/modules.d/90dmsquash-live/iso-scan.sh 2018-07-06 08:37:51.000000000 +0000
638 +++ dracut-048/modules.d/90dmsquash-live/iso-scan.sh 2018-07-21 21:00:11.632092687 +0000
639 @@ -16,7 +16,7 @@ do_iso_scan() {
642 for dev in /dev/disk/by-uuid/*; do
643 - _name=$(dev_unit_name "$dev")
645 [ -e /tmp/isoscan-${_name} ] && continue
646 > /tmp/isoscan-${_name}
647 mount -t auto -o ro "$dev" "/run/initramfs/isoscan" || continue
648 diff -urpa dracut-048.orig/modules.d/90dmsquash-live/module-setup.sh dracut-048/modules.d/90dmsquash-live/module-setup.sh
649 --- dracut-048.orig/modules.d/90dmsquash-live/module-setup.sh 2018-07-06 08:37:51.000000000 +0000
650 +++ dracut-048/modules.d/90dmsquash-live/module-setup.sh 2018-07-21 21:00:11.632092687 +0000
651 @@ -31,9 +31,7 @@ install() {
652 inst_hook pre-pivot 20 "$moddir/apply-live-updates.sh"
653 inst_script "$moddir/dmsquash-live-root.sh" "/sbin/dmsquash-live-root"
654 inst_script "$moddir/iso-scan.sh" "/sbin/iso-scan"
655 - inst_script "$moddir/dmsquash-generator.sh" $systemdutildir/system-generators/dracut-dmsquash-generator
656 # should probably just be generally included
657 inst_rules 60-cdrom_id.rules
658 - inst_simple "$moddir/checkisomd5@.service" "/etc/systemd/system/checkisomd5@.service"
659 dracut_need_initqueue
661 diff -urpa dracut-048.orig/modules.d/90kernel-modules/module-setup.sh dracut-048/modules.d/90kernel-modules/module-setup.sh
662 --- dracut-048.orig/modules.d/90kernel-modules/module-setup.sh 2018-07-06 08:37:51.000000000 +0000
663 +++ dracut-048/modules.d/90kernel-modules/module-setup.sh 2018-07-21 21:00:11.632092687 +0000
664 @@ -92,8 +92,6 @@ installkernel() {
666 inst_multiple -o /lib/modprobe.d/*.conf
667 [[ $hostonly ]] && inst_multiple -H -o /etc/modprobe.d/*.conf /etc/modprobe.conf
668 - if ! dracut_module_included "systemd"; then
669 - inst_hook cmdline 01 "$moddir/parse-kernel.sh"
671 + inst_hook cmdline 01 "$moddir/parse-kernel.sh"
672 inst_simple "$moddir/insmodpost.sh" /sbin/insmodpost.sh
674 diff -urpa dracut-048.orig/modules.d/90livenet/module-setup.sh dracut-048/modules.d/90livenet/module-setup.sh
675 --- dracut-048.orig/modules.d/90livenet/module-setup.sh 2018-07-06 08:37:51.000000000 +0000
676 +++ dracut-048/modules.d/90livenet/module-setup.sh 2018-07-21 21:00:11.632092687 +0000
677 @@ -17,8 +17,5 @@ install() {
678 inst_hook cmdline 29 "$moddir/parse-livenet.sh"
679 inst_hook initqueue/online 95 "$moddir/fetch-liveupdate.sh"
680 inst_script "$moddir/livenetroot.sh" "/sbin/livenetroot"
681 - if dracut_module_included "systemd-initrd"; then
682 - inst_script "$moddir/livenet-generator.sh" $systemdutildir/system-generators/dracut-livenet-generator
684 dracut_need_initqueue
686 diff -urpa dracut-048.orig/modules.d/90lvm/module-setup.sh dracut-048/modules.d/90lvm/module-setup.sh
687 --- dracut-048.orig/modules.d/90lvm/module-setup.sh 2018-07-21 20:59:45.491094245 +0000
688 +++ dracut-048/modules.d/90lvm/module-setup.sh 2018-07-21 21:00:11.632092687 +0000
689 @@ -97,15 +97,8 @@ install() {
691 # Do not run lvmetad update via pvscan in udev rule - lvmetad is not running yet in dracut!
692 if [[ -f ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules ]]; then
693 - if grep -q SYSTEMD_WANTS ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules; then
694 - sed -i -e 's/^ENV{SYSTEMD_ALIAS}=.*/# No LVM pvscan in dracut - lvmetad is not running yet/' \
695 - ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules
696 - sed -i -e 's/^ENV{ID_MODEL}=.*//' ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules
697 - sed -i -e 's/^ENV{SYSTEMD_WANTS}=.*//' ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules
699 - sed -i -e 's/.*lvm pvscan.*/# No LVM pvscan for in dracut - lvmetad is not running yet/' \
700 - ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules
702 + sed -i -e 's/.*lvm pvscan.*/# No LVM pvscan for in dracut - lvmetad is not running yet/' \
703 + ${initdir}/lib/udev/rules.d/69-dm-lvm-metad.rules
706 # Gentoo ebuild for LVM2 prior to 2.02.63-r1 doesn't install above rules
707 diff -urpa dracut-048.orig/modules.d/90mdraid/module-setup.sh dracut-048/modules.d/90mdraid/module-setup.sh
708 --- dracut-048.orig/modules.d/90mdraid/module-setup.sh 2018-07-06 08:37:51.000000000 +0000
709 +++ dracut-048/modules.d/90mdraid/module-setup.sh 2018-07-21 21:00:11.633092687 +0000
710 @@ -126,17 +126,6 @@ install() {
711 inst_hook shutdown 30 "$moddir/md-shutdown.sh"
712 inst_script "$moddir/mdraid-cleanup.sh" /sbin/mdraid-cleanup
713 inst_script "$moddir/mdraid_start.sh" /sbin/mdraid_start
714 - if dracut_module_included "systemd"; then
715 - if [ -e $systemdsystemunitdir/mdmon@.service ]; then
716 - inst_simple $systemdsystemunitdir/mdmon@.service
718 - if [ -e $systemdsystemunitdir/mdadm-last-resort@.service ]; then
719 - inst_simple $systemdsystemunitdir/mdadm-last-resort@.service
721 - if [ -e $systemdsystemunitdir/mdadm-last-resort@.timer ]; then
722 - inst_simple $systemdsystemunitdir/mdadm-last-resort@.timer
725 inst_hook pre-shutdown 30 "$moddir/mdmon-pre-shutdown.sh"
726 dracut_need_initqueue
728 diff -urpa dracut-048.orig/modules.d/90multipath/module-setup.sh dracut-048/modules.d/90multipath/module-setup.sh
729 --- dracut-048.orig/modules.d/90multipath/module-setup.sh 2018-07-06 08:37:51.000000000 +0000
730 +++ dracut-048/modules.d/90multipath/module-setup.sh 2018-07-21 21:00:11.633092687 +0000
731 @@ -107,14 +107,8 @@ install() {
732 [[ $_conf ]] && echo "$_conf" >> "${initdir}/etc/cmdline.d/90multipath.conf"
735 - if dracut_module_included "systemd"; then
736 - inst_simple "${moddir}/multipathd.service" "${systemdsystemunitdir}/multipathd.service"
737 - mkdir -p "${initdir}${systemdsystemunitdir}/sysinit.target.wants"
738 - ln -rfs "${initdir}${systemdsystemunitdir}/multipathd.service" "${initdir}${systemdsystemunitdir}/sysinit.target.wants/multipathd.service"
740 - inst_hook pre-trigger 02 "$moddir/multipathd.sh"
741 - inst_hook cleanup 02 "$moddir/multipathd-stop.sh"
743 + inst_hook pre-trigger 02 "$moddir/multipathd.sh"
744 + inst_hook cleanup 02 "$moddir/multipathd-stop.sh"
746 inst_hook cleanup 80 "$moddir/multipathd-needshutdown.sh"
747 inst_hook shutdown 20 "$moddir/multipath-shutdown.sh"
748 diff -urpa dracut-048.orig/modules.d/90qemu/module-setup.sh dracut-048/modules.d/90qemu/module-setup.sh
749 --- dracut-048.orig/modules.d/90qemu/module-setup.sh 2018-07-06 08:37:51.000000000 +0000
750 +++ dracut-048/modules.d/90qemu/module-setup.sh 2018-07-21 21:00:11.633092687 +0000
754 if [[ $hostonly ]] || [[ $mount_needs ]]; then
755 - if type -P systemd-detect-virt >/dev/null 2>&1; then
756 - vm=$(systemd-detect-virt --vm 2>/dev/null)
757 - (($? != 0)) && return 255
758 - [[ $vm = "qemu" ]] && return 0
759 - [[ $vm = "kvm" ]] && return 0
760 - [[ $vm = "bochs" ]] && return 0
763 for i in /sys/class/dmi/id/*_vendor; do
764 [[ -f $i ]] || continue
766 diff -urpa dracut-048.orig/modules.d/90qemu-net/module-setup.sh dracut-048/modules.d/90qemu-net/module-setup.sh
767 --- dracut-048.orig/modules.d/90qemu-net/module-setup.sh 2018-07-06 08:37:51.000000000 +0000
768 +++ dracut-048/modules.d/90qemu-net/module-setup.sh 2018-07-21 21:00:11.633092687 +0000
772 if [[ $hostonly ]] || [[ $mount_needs ]]; then
773 - if type -P systemd-detect-virt >/dev/null 2>&1; then
774 - vm=$(systemd-detect-virt --vm >/dev/null 2>&1)
775 - (($? != 0)) && return 255
776 - [[ $vm = "qemu" ]] && return 0
777 - [[ $vm = "kvm" ]] && return 0
778 - [[ $vm = "bochs" ]] && return 0
781 for i in /sys/class/dmi/id/*_vendor; do
782 [[ -f $i ]] || continue
784 diff -urpa dracut-048.orig/modules.d/90stratis/module-setup.sh dracut-048/modules.d/90stratis/module-setup.sh
785 --- dracut-048.orig/modules.d/90stratis/module-setup.sh 2018-07-06 08:37:51.000000000 +0000
786 +++ dracut-048/modules.d/90stratis/module-setup.sh 2018-07-21 21:00:11.633092687 +0000
787 @@ -22,13 +22,7 @@ install() {
789 inst_multiple stratisd-init thin_check thin_repair
791 - if dracut_module_included "systemd"; then
792 - inst_simple "${moddir}/stratisd-init.service" "${systemdsystemunitdir}/stratisd-init.service"
793 - mkdir -p "${initdir}${systemdsystemunitdir}/sysinit.target.wants"
794 - ln -rfs "${initdir}${systemdsystemunitdir}/stratisd-init.service" "${initdir}${systemdsystemunitdir}/sysinit.target.wants/stratisd-init.service"
796 - inst_hook cmdline 25 "$moddir/stratisd-start.sh"
797 - inst_hook cleanup 25 "$moddir/stratisd-stop.sh"
799 + inst_hook cmdline 25 "$moddir/stratisd-start.sh"
800 + inst_hook cleanup 25 "$moddir/stratisd-stop.sh"
803 diff -urpa dracut-048.orig/modules.d/95debug/module-setup.sh dracut-048/modules.d/95debug/module-setup.sh
804 --- dracut-048.orig/modules.d/95debug/module-setup.sh 2018-07-06 08:37:51.000000000 +0000
805 +++ dracut-048/modules.d/95debug/module-setup.sh 2018-07-21 21:00:11.633092687 +0000
806 @@ -15,7 +15,7 @@ depends() {
808 inst_multiple -o cat ls ps grep more cat rm strace free showmount \
809 ping netstat rpcinfo vi scp ping6 ssh find vi \
810 - tcpdump cp less hostname mkdir systemd-analyze \
811 + tcpdump cp less hostname mkdir \
812 fsck fsck.ext2 fsck.ext4 fsck.ext3 fsck.ext4dev fsck.f2fs fsck.vfat e2fsck
814 grep '^tcpdump:' /etc/passwd 2>/dev/null >> "$initdir/etc/passwd"
815 diff -urpa dracut-048.orig/modules.d/95fcoe/cleanup-fcoe.sh dracut-048/modules.d/95fcoe/cleanup-fcoe.sh
816 --- dracut-048.orig/modules.d/95fcoe/cleanup-fcoe.sh 2018-07-06 08:37:51.000000000 +0000
817 +++ dracut-048/modules.d/95fcoe/cleanup-fcoe.sh 2018-07-21 21:00:11.633092687 +0000
820 if [ -e /var/run/lldpad.pid ]; then
822 - # with systemd version 230, this is not necessary anymore
823 - # systemd commit cacf980ed44a28e276a6cc7f8fc41f991e2ab354
824 - if [ -z "$DRACUT_SYSTEMD" ]; then
825 - mkdir -m 0755 -p /run/initramfs/state/dev/shm
826 - cp /dev/shm/lldpad.state /run/initramfs/state/dev/shm/ > /dev/null 2>&1
827 - echo "files /dev/shm/lldpad.state" >> /run/initramfs/rwtab
829 + mkdir -m 0755 -p /run/initramfs/state/dev/shm
830 + cp /dev/shm/lldpad.state /run/initramfs/state/dev/shm/ > /dev/null 2>&1
831 + echo "files /dev/shm/lldpad.state" >> /run/initramfs/rwtab
833 diff -urpa dracut-048.orig/modules.d/95fstab-sys/mount-sys.sh dracut-048/modules.d/95fstab-sys/mount-sys.sh
834 --- dracut-048.orig/modules.d/95fstab-sys/mount-sys.sh 2018-07-06 08:37:51.000000000 +0000
835 +++ dracut-048/modules.d/95fstab-sys/mount-sys.sh 2018-07-21 21:00:11.633092687 +0000
836 @@ -25,11 +25,7 @@ fstab_mount() {
840 -# systemd will mount and run fsck from /etc/fstab and we don't want to
841 -# run into a race condition.
842 -if [ -z "$DRACUT_SYSTEMD" ]; then
843 - [ -f /etc/fstab ] && fstab_mount /etc/fstab
845 +[ -f /etc/fstab ] && fstab_mount /etc/fstab
847 # prefer $NEWROOT/etc/fstab.sys over local /etc/fstab.sys
848 if [ -f $NEWROOT/etc/fstab.sys ]; then
849 diff -urpa dracut-048.orig/modules.d/95iscsi/cleanup-iscsi.sh dracut-048/modules.d/95iscsi/cleanup-iscsi.sh
850 --- dracut-048.orig/modules.d/95iscsi/cleanup-iscsi.sh 2018-07-06 08:37:51.000000000 +0000
851 +++ dracut-048/modules.d/95iscsi/cleanup-iscsi.sh 2018-07-21 21:00:11.634092687 +0000
855 -[ -z "${DRACUT_SYSTEMD}" ] && [ -e /sys/module/bnx2i ] && killproc iscsiuio
856 +[ -e /sys/module/bnx2i ] && killproc iscsiuio
858 diff -urpa dracut-048.orig/modules.d/95iscsi/iscsiroot.sh dracut-048/modules.d/95iscsi/iscsiroot.sh
859 --- dracut-048.orig/modules.d/95iscsi/iscsiroot.sh 2018-07-06 08:37:51.000000000 +0000
860 +++ dracut-048/modules.d/95iscsi/iscsiroot.sh 2018-07-21 21:00:11.634092687 +0000
861 @@ -36,7 +36,7 @@ iroot=${iroot#:}
862 # figured out a way how to check whether this is built-in or not
863 modprobe crc32c 2>/dev/null
865 -if [ -z "${DRACUT_SYSTEMD}" ] && [ -e /sys/module/bnx2i ] && ! [ -e /tmp/iscsiuio-started ]; then
866 +if [ -e /sys/module/bnx2i ] && ! [ -e /tmp/iscsiuio-started ]; then
868 > /tmp/iscsiuio-started
870 @@ -142,11 +142,6 @@ handle_netroot()
872 ln -fs /run/initiatorname.iscsi /etc/iscsi/initiatorname.iscsi
873 > /tmp/iscsi_set_initiator
874 - if [ -n "$DRACUT_SYSTEMD" ]; then
875 - systemctl try-restart iscsid
876 - # FIXME: iscsid is not yet ready, when the service is :-/
881 if [ -z "$iscsi_initiator" ]; then
882 @@ -163,11 +158,6 @@ handle_netroot()
884 ln -fs /run/initiatorname.iscsi /etc/iscsi/initiatorname.iscsi
885 > /tmp/iscsi_set_initiator
886 - if [ -n "$DRACUT_SYSTEMD" ]; then
887 - systemctl try-restart iscsid
888 - # FIXME: iscsid is not yet ready, when the service is :-/
894 @@ -188,11 +178,6 @@ handle_netroot()
895 if ! [ -e /etc/iscsi/initiatorname.iscsi ]; then
897 ln -fs /run/initiatorname.iscsi /etc/iscsi/initiatorname.iscsi
898 - if [ -n "$DRACUT_SYSTEMD" ]; then
899 - systemctl try-restart iscsid
900 - # FIXME: iscsid is not yet ready, when the service is :-/
904 # FIXME $iscsi_protocol??
906 @@ -204,12 +189,9 @@ handle_netroot()
907 wait_for_dev -n /dev/root
909 # install mount script
910 - [ -z "$DRACUT_SYSTEMD" ] && \
911 - echo "iscsi_lun=$iscsi_lun . /bin/mount-lun.sh " > $hookdir/mount/01-$$-iscsi.sh
912 + echo "iscsi_lun=$iscsi_lun . /bin/mount-lun.sh " > $hookdir/mount/01-$$-iscsi.sh
915 - ### ToDo: Upstream calls systemd-run - Shall we, do we have to port this?
917 targets=$(iscsiadm -m discovery -t st -p $iscsi_target_ip:${iscsi_target_port:+$iscsi_target_port} | sed 's/^.*iqn/iqn/')
918 [ -z "$targets" ] && echo "Target discovery to $iscsi_target_ip:${iscsi_target_port:+$iscsi_target_port} failed with status $?" && exit 1
920 @@ -250,14 +232,6 @@ if [ "$netif" != "timeout" ] && getargbo
921 all_ifaces_setup || exit 0
924 -if [ "$netif" = "timeout" ] && all_ifaces_setup; then
925 - # s.th. went wrong and the timeout script hits
927 - systemctl restart iscsid
928 - # damn iscsid is not ready after unit says it's ready
932 if getargbool 0 rd.iscsi.firmware -d -y iscsi_firmware ; then
933 if [ "$netif" = "timeout" ] || [ "$netif" = "online" ] || [ "$netif" = "dummy" ]; then
934 [ -f /tmp/session-retry ] || echo 1 > /tmp/session-retry
935 diff -urpa dracut-048.orig/modules.d/95iscsi/module-setup.sh dracut-048/modules.d/95iscsi/module-setup.sh
936 --- dracut-048.orig/modules.d/95iscsi/module-setup.sh 2018-07-06 08:37:51.000000000 +0000
937 +++ dracut-048/modules.d/95iscsi/module-setup.sh 2018-07-21 21:00:11.634092687 +0000
938 @@ -208,17 +208,6 @@ install() {
939 inst_libdir_file 'libgcc_s.so*'
940 inst_multiple umount hostname iscsi-iname iscsiadm iscsid
942 - ln -sf $systemdsystemunitdir/iscsid.socket $systemdsystemunitdir/sockets.target.wants/iscsid.socket
943 - ln -sf $systemdsystemunitdir/iscsiuio.socket $systemdsystemunitdir/sockets.target.wants/iscsiuio.socket
946 - $systemdsystemunitdir/iscsid.socket \
947 - $systemdsystemunitdir/iscsid.service \
948 - $systemdsystemunitdir/iscsiuio.service \
949 - $systemdsystemunitdir/iscsiuio.socket \
950 - $systemdsystemunitdir/sockets.target.wants/iscsid.socket \
951 - $systemdsystemunitdir/sockets.target.wants/iscsiuio.socket
953 [[ -d /etc/iscsi ]] && inst_dir $(/usr/bin/find /etc/iscsi)
955 # Detect iBFT and perform mandatory steps
956 @@ -230,40 +219,7 @@ install() {
957 inst_hook cmdline 90 "$moddir/parse-iscsiroot.sh"
958 inst_hook cleanup 90 "$moddir/cleanup-iscsi.sh"
959 inst "$moddir/iscsiroot.sh" "/sbin/iscsiroot"
960 - if ! dracut_module_included "systemd"; then
961 - inst "$moddir/mount-lun.sh" "/bin/mount-lun.sh"
964 - $systemdsystemunitdir/iscsi.service \
965 - $systemdsystemunitdir/iscsid.service \
966 - $systemdsystemunitdir/iscsid.socket \
967 - $systemdsystemunitdir/iscsiuio.service \
968 - $systemdsystemunitdir/iscsiuio.socket \
971 - mkdir -p "${initdir}/$systemdsystemunitdir/sockets.target.wants"
975 - ln_r "$systemdsystemunitdir/${i}" "$systemdsystemunitdir/sockets.target.wants/${i}"
978 - mkdir -p "${initdir}/$systemdsystemunitdir/basic.target.wants"
983 - ln_r "$systemdsystemunitdir/${i}" "$systemdsystemunitdir/basic.target.wants/${i}"
986 - # Make sure iscsid is started after dracut-cmdline and ready for the initqueue
987 - mkdir -p "${initdir}/$systemdsystemunitdir/iscsid.service.d"
990 - echo "After=dracut-cmdline.service"
991 - echo "Before=dracut-initqueue.service"
992 - ) > "${initdir}/$systemdsystemunitdir/iscsid.service.d/dracut.conf"
994 + inst "$moddir/mount-lun.sh" "/bin/mount-lun.sh"
995 inst_dir /var/lib/iscsi
996 dracut_need_initqueue
998 diff -urpa dracut-048.orig/modules.d/95iscsi/parse-iscsiroot.sh dracut-048/modules.d/95iscsi/parse-iscsiroot.sh
999 --- dracut-048.orig/modules.d/95iscsi/parse-iscsiroot.sh 2018-07-06 08:37:51.000000000 +0000
1000 +++ dracut-048/modules.d/95iscsi/parse-iscsiroot.sh 2018-07-21 21:00:11.634092687 +0000
1001 @@ -41,7 +41,7 @@ if [ "${root%%:*}" = "iscsi" ] ; then
1003 # if root is not specified try to mount the whole iSCSI LUN
1004 printf 'ENV{DEVTYPE}!="partition", SYMLINK=="disk/by-path/*-iscsi-*-*", SYMLINK+="root"\n' >> /etc/udev/rules.d/99-iscsi-root.rules
1005 - [ -n "$DRACUT_SYSTEMD" ] && systemctl is-active systemd-udevd && udevadm control --reload-rules
1006 + udevadm control --reload-rules
1009 write_fs_tab /dev/root
1010 @@ -58,7 +58,7 @@ done
1011 if [ "${root}" = "/dev/root" ] && getarg "netroot=dhcp" ; then
1012 # if root is not specified try to mount the whole iSCSI LUN
1013 printf 'ENV{DEVTYPE}!="partition", SYMLINK=="disk/by-path/*-iscsi-*-*", SYMLINK+="root"\n' >> /etc/udev/rules.d/99-iscsi-root.rules
1014 - [ -n "$DRACUT_SYSTEMD" ] && systemctl is-active systemd-udevd && udevadm control --reload-rules
1015 + udevadm control --reload-rules
1018 if [ -n "$iscsiroot" ] ; then
1019 @@ -116,11 +116,6 @@ if arg=$(getarg rd.iscsi.initiator -d is
1020 if ! [ -e /etc/iscsi/initiatorname.iscsi ]; then
1022 ln -fs /run/initiatorname.iscsi /etc/iscsi/initiatorname.iscsi
1023 - if [ -n "$DRACUT_SYSTEMD" ]; then
1024 - systemctl try-restart iscsid
1025 - # FIXME: iscsid is not yet ready, when the service is :-/
1031 @@ -133,11 +128,6 @@ if [ -z $iscsi_initiator ] && [ -f /sys/
1033 ln -fs /run/initiatorname.iscsi /etc/iscsi/initiatorname.iscsi
1034 > /tmp/iscsi_set_initiator
1035 - if [ -n "$DRACUT_SYSTEMD" ]; then
1036 - systemctl try-restart iscsid
1037 - # FIXME: iscsid is not yet ready, when the service is :-/
1043 diff -urpa dracut-048.orig/modules.d/95nbd/module-setup.sh dracut-048/modules.d/95nbd/module-setup.sh
1044 --- dracut-048.orig/modules.d/95nbd/module-setup.sh 2018-07-06 08:37:51.000000000 +0000
1045 +++ dracut-048/modules.d/95nbd/module-setup.sh 2018-07-21 21:00:11.634092687 +0000
1046 @@ -34,9 +34,6 @@ install() {
1048 inst_hook cmdline 90 "$moddir/parse-nbdroot.sh"
1049 inst_script "$moddir/nbdroot.sh" "/sbin/nbdroot"
1050 - if dracut_module_included "systemd-initrd"; then
1051 - inst_script "$moddir/nbd-generator.sh" $systemdutildir/system-generators/dracut-nbd-generator
1053 dracut_need_initqueue
1056 diff -urpa dracut-048.orig/modules.d/95nbd/nbdroot.sh dracut-048/modules.d/95nbd/nbdroot.sh
1057 --- dracut-048.orig/modules.d/95nbd/nbdroot.sh 2018-07-06 08:37:51.000000000 +0000
1058 +++ dracut-048/modules.d/95nbd/nbdroot.sh 2018-07-21 21:00:11.634092687 +0000
1059 @@ -97,37 +97,15 @@ if [ "$root" = "block:/dev/root" -o "$ro
1060 write_fs_tab /dev/root "$nbdfstype" "$fsopts"
1061 wait_for_dev -n /dev/root
1063 - if [ -z "$DRACUT_SYSTEMD" ]; then
1064 - printf '/bin/mount %s\n' \
1066 - > $hookdir/mount/01-$$-nbd.sh
1070 -if strstr "$(nbd-client --help 2>&1)" "systemd-mark"; then
1071 - preopts="--systemd-mark $preopts"
1072 + printf '/bin/mount %s\n' \
1074 + > $hookdir/mount/01-$$-nbd.sh
1077 if [ "$nbdport" -gt 0 ] 2>/dev/null; then
1078 - if [ -z "$DRACUT_SYSTEMD" ]; then
1079 - nbd-client "$nbdserver" $nbdport /dev/nbd0 $preopts $opts || exit 1
1081 - systemd-run --no-block --service-type=forking --quiet \
1082 - --description="nbd nbd0" \
1083 - -p 'DefaultDependencies=no' \
1084 - -p 'KillMode=none' \
1085 - --unit="nbd0" -- nbd-client "$nbdserver" $nbdport /dev/nbd0 $preopts $opts >/dev/null 2>&1 || exit 1
1087 + nbd-client "$nbdserver" $nbdport /dev/nbd0 $preopts $opts || exit 1
1089 - if [ -z "$DRACUT_SYSTEMD" ]; then
1090 - nbd-client -name "$nbdport" "$nbdserver" /dev/nbd0 $preopts $opts || exit 1
1092 - systemd-run --no-block --service-type=forking --quiet \
1093 - --description="nbd nbd0" \
1094 - -p 'DefaultDependencies=no' \
1095 - -p 'KillMode=none' \
1096 - --unit="nbd0" -- nbd-client -name "$nbdport" "$nbdserver" /dev/nbd0 $preopts $opts >/dev/null 2>&1 || exit 1
1098 + nbd-client -name "$nbdport" "$nbdserver" /dev/nbd0 $preopts $opts || exit 1
1101 # NBD doesn't emit uevents when it gets connected, so kick it
1102 diff -urpa dracut-048.orig/modules.d/95nbd/parse-nbdroot.sh dracut-048/modules.d/95nbd/parse-nbdroot.sh
1103 --- dracut-048.orig/modules.d/95nbd/parse-nbdroot.sh 2018-07-06 08:37:51.000000000 +0000
1104 +++ dracut-048/modules.d/95nbd/parse-nbdroot.sh 2018-07-21 21:00:11.634092687 +0000
1105 @@ -46,11 +46,6 @@ fi
1106 [ "${netroot%%:*}" = "nbd" ] || return
1109 -if [ -n "${DRACUT_SYSTEMD}" ] && [ "$root" = "dhcp" ]; then
1110 - echo "root=$netroot" > /etc/cmdline.d/root.conf
1111 - systemctl --no-block daemon-reload
1114 # Check required arguments
1115 netroot_to_var $netroot
1116 [ -z "$server" ] && die "Argument server for nbdroot is missing"
1117 diff -urpa dracut-048.orig/modules.d/95nfs/module-setup.sh dracut-048/modules.d/95nfs/module-setup.sh
1118 --- dracut-048.orig/modules.d/95nfs/module-setup.sh 2018-07-06 08:37:51.000000000 +0000
1119 +++ dracut-048/modules.d/95nfs/module-setup.sh 2018-07-21 21:00:11.635092687 +0000
1120 @@ -73,7 +73,7 @@ install() {
1123 inst_multiple -o portmap rpcbind rpc.statd mount.nfs \
1124 - mount.nfs4 umount rpc.idmapd sed /etc/netconfig chmod "$tmpfilesdir/rpcbind.conf"
1125 + mount.nfs4 umount rpc.idmapd sed /etc/netconfig chmod
1126 inst_multiple /etc/services /etc/nsswitch.conf /etc/rpc /etc/protocols /etc/idmapd.conf
1128 if [[ $hostonly_cmdline == "yes" ]]; then
1129 diff -urpa dracut-048.orig/modules.d/95resume/module-setup.sh dracut-048/modules.d/95resume/module-setup.sh
1130 --- dracut-048.orig/modules.d/95resume/module-setup.sh 2018-07-21 20:59:45.488094246 +0000
1131 +++ dracut-048/modules.d/95resume/module-setup.sh 2018-07-21 21:00:11.635092687 +0000
1132 @@ -33,15 +33,6 @@ install() {
1133 [[ $_resumeconf ]] && printf "%s\n" "$_resumeconf" >> "${initdir}/etc/cmdline.d/95resume.conf"
1136 - # if systemd is included and has the hibernate-resume tool, use it and nothing else
1137 - if dracut_module_included "systemd" && [[ -x $systemdutildir/systemd-hibernate-resume ]]; then
1138 - inst_multiple -o \
1139 - $systemdutildir/system-generators/systemd-hibernate-resume-generator \
1140 - $systemdsystemunitdir/systemd-hibernate-resume@.service \
1141 - $systemdutildir/systemd-hibernate-resume
1145 # Optional uswsusp support
1146 for _bin in /usr/sbin/resume /usr/@lib@/suspend/resume /usr/@lib@/uswsusp/resume
1148 @@ -52,11 +43,7 @@ install() {
1152 - if ! dracut_module_included "systemd"; then
1153 - inst_hook cmdline 10 "$moddir/parse-resume.sh"
1155 - inst_script "$moddir/parse-resume.sh" /lib/dracut/parse-resume.sh
1157 + inst_hook cmdline 10 "$moddir/parse-resume.sh"
1159 inst_script "$moddir/resume.sh" /lib/dracut/resume.sh
1161 diff -urpa dracut-048.orig/modules.d/95rootfs-block/module-setup.sh dracut-048/modules.d/95rootfs-block/module-setup.sh
1162 --- dracut-048.orig/modules.d/95rootfs-block/module-setup.sh 2018-07-06 08:37:51.000000000 +0000
1163 +++ dracut-048/modules.d/95rootfs-block/module-setup.sh 2018-07-21 21:00:11.635092687 +0000
1164 @@ -69,11 +69,9 @@ install() {
1166 inst_multiple umount
1168 - if ! dracut_module_included "systemd"; then
1169 - inst_hook cmdline 95 "$moddir/parse-block.sh"
1170 - inst_hook pre-udev 30 "$moddir/block-genrules.sh"
1171 - inst_hook mount 99 "$moddir/mount-root.sh"
1173 + inst_hook cmdline 95 "$moddir/parse-block.sh"
1174 + inst_hook pre-udev 30 "$moddir/block-genrules.sh"
1175 + inst_hook mount 99 "$moddir/mount-root.sh"
1177 inst_hook initqueue/timeout 99 "$moddir/rootfallback.sh"
1179 diff -urpa dracut-048.orig/modules.d/95udev-rules/module-setup.sh dracut-048/modules.d/95udev-rules/module-setup.sh
1180 --- dracut-048.orig/modules.d/95udev-rules/module-setup.sh 2018-07-06 08:37:51.000000000 +0000
1181 +++ dracut-048/modules.d/95udev-rules/module-setup.sh 2018-07-21 21:00:11.635092687 +0000
1182 @@ -11,20 +11,7 @@ install() {
1184 inst_multiple -o /etc/udev/udev.conf
1186 - [ -d ${initdir}/$systemdutildir ] || mkdir -p ${initdir}/$systemdutildir
1187 - for _i in ${systemdutildir}/systemd-udevd ${udevdir}/udevd /sbin/udevd; do
1188 - [ -x "$_i" ] || continue
1191 - if ! [[ -f ${initdir}${systemdutildir}/systemd-udevd ]]; then
1192 - ln -fs "$_i" ${initdir}${systemdutildir}/systemd-udevd
1196 - if ! [[ -e ${initdir}${systemdutildir}/systemd-udevd ]]; then
1197 - derror "Cannot find [systemd-]udevd binary!"
1204 @@ -56,11 +43,6 @@ install() {
1206 inst_rules 80-drivers-modprobe.rules
1208 - if dracut_module_included "systemd"; then
1209 - inst_multiple -o ${systemdutildir}/network/*.link
1210 - [[ $hostonly ]] && inst_multiple -H -o /etc/systemd/network/*.link
1214 for i in cdrom tape dialout floppy; do
1215 if ! grep -q "^$i:" "$initdir/etc/group" 2>/dev/null; then
1216 diff -urpa dracut-048.orig/modules.d/95virtfs/module-setup.sh dracut-048/modules.d/95virtfs/module-setup.sh
1217 --- dracut-048.orig/modules.d/95virtfs/module-setup.sh 2018-07-06 08:37:51.000000000 +0000
1218 +++ dracut-048/modules.d/95virtfs/module-setup.sh 2018-07-21 21:00:11.635092687 +0000
1219 @@ -9,14 +9,6 @@ check() {
1223 - if type -P systemd-detect-virt >/dev/null 2>&1; then
1224 - vm=$(systemd-detect-virt --vm >/dev/null 2>&1)
1225 - (($? != 0)) && return 255
1226 - [[ $vm = "qemu" ]] && return 0
1227 - [[ $vm = "kvm" ]] && return 0
1228 - [[ $vm = "bochs" ]] && return 0
1231 for i in /sys/class/dmi/id/*_vendor; do
1232 [[ -f $i ]] || continue
1234 diff -urpa dracut-048.orig/modules.d/98usrmount/module-setup.sh dracut-048/modules.d/98usrmount/module-setup.sh
1235 --- dracut-048.orig/modules.d/98usrmount/module-setup.sh 2018-07-06 08:37:51.000000000 +0000
1236 +++ dracut-048/modules.d/98usrmount/module-setup.sh 2018-07-21 21:00:11.635092687 +0000
1237 @@ -13,9 +13,7 @@ depends() {
1241 - if ! dracut_module_included "systemd"; then
1242 - inst_hook pre-pivot 50 "$moddir/mount-usr.sh"
1244 + inst_hook pre-pivot 50 "$moddir/mount-usr.sh"
1248 diff -urpa dracut-048.orig/modules.d/99base/dracut-lib.sh dracut-048/modules.d/99base/dracut-lib.sh
1249 --- dracut-048.orig/modules.d/99base/dracut-lib.sh 2018-07-21 20:59:45.493094245 +0000
1250 +++ dracut-048/modules.d/99base/dracut-lib.sh 2018-07-21 21:00:11.636092687 +0000
1254 -export DRACUT_SYSTEMD
1256 if [ -n "$NEWROOT" ]; then
1257 [ -d $NEWROOT ] || mkdir -p -m 0755 $NEWROOT
1258 @@ -58,32 +57,13 @@ trim() {
1262 -if [ -z "$DRACUT_SYSTEMD" ]; then
1266 - echo "<28>dracut Warning: $*" > /dev/kmsg
1267 - echo "dracut Warning: $*" >&2
1272 - echo "<30>dracut: $*" > /dev/kmsg
1273 - [ "$DRACUT_QUIET" != "yes" ] && \
1274 - echo "dracut: $*" >&2
1280 - echo "Warning: $*" >&2
1287 + echo "Warning: $*" >&2
1296 while read line || [ -n "$line" ]; do
1297 @@ -475,10 +455,6 @@ die() {
1298 source_hook "shutdown-emergency"
1301 - if [ -n "$DRACUT_SYSTEMD" ]; then
1302 - systemctl --no-block --force halt
1308 @@ -883,77 +859,7 @@ wait_for_mount()
1309 } >> "$hookdir/emergency/90-${_name}.sh"
1312 -# get a systemd-compatible unit name from a path
1313 -# (mimicks unit_name_from_path_instance())
1318 - if command -v systemd-escape >/dev/null; then
1319 - systemd-escape -p -- "$dev"
1323 - if [ "$dev" = "/" -o -z "$dev" ]; then
1330 - dev="$(str_replace "$dev" '\' '\x5c')"
1331 - dev="$(str_replace "$dev" '-' '\x2d')"
1332 - if [ "${dev##.}" != "$dev" ]; then
1333 - dev="\x2e${dev##.}"
1335 - dev="$(str_replace "$dev" '/' '-')"
1337 - printf -- "%s" "$dev"
1340 -# set_systemd_timeout_for_dev <dev>
1341 -# Set 'rd.timeout' as the systemd timeout for <dev>
1343 -set_systemd_timeout_for_dev()
1350 - if [ "$1" = "-n" ]; then
1355 - _timeout=$(getarg rd.timeout)
1356 - _timeout=${_timeout:-0}
1358 - if [ -n "$DRACUT_SYSTEMD" ]; then
1359 - _name=$(dev_unit_name "$1")
1360 - if ! [ -L ${PREFIX}/etc/systemd/system/initrd.target.wants/${_name}.device ]; then
1361 - [ -d ${PREFIX}/etc/systemd/system/initrd.target.wants ] || mkdir -p ${PREFIX}/etc/systemd/system/initrd.target.wants
1362 - ln -s ../${_name}.device ${PREFIX}/etc/systemd/system/initrd.target.wants/${_name}.device
1363 - type mark_hostonly >/dev/null 2>&1 && mark_hostonly /etc/systemd/system/initrd.target.wants/${_name}.device
1367 - if ! [ -f ${PREFIX}/etc/systemd/system/${_name}.device.d/timeout.conf ]; then
1368 - mkdir -p ${PREFIX}/etc/systemd/system/${_name}.device.d
1371 - echo "JobTimeoutSec=$_timeout"
1372 - echo "JobRunningTimeoutSec=$_timeout"
1373 - } > ${PREFIX}/etc/systemd/system/${_name}.device.d/timeout.conf
1374 - type mark_hostonly >/dev/null 2>&1 && mark_hostonly /etc/systemd/system/${_name}.device.d/timeout.conf
1378 - if [ -z "$PREFIX" ] && [ "$_needreload" = 1 ] && [ -z "$_noreload" ]; then
1379 - /sbin/initqueue --onetime --unique --name daemon-reload systemctl daemon-reload
1383 # wait_for_dev <dev>
1385 # Installs a initqueue-finished script,
1386 @@ -981,8 +887,6 @@ wait_for_dev()
1387 printf '[ -e "%s" ] || ' $1
1388 printf 'warn "\"%s\" does not exist"\n' $1
1389 } >> "${PREFIX}$hookdir/emergency/80-${_name}.sh"
1391 - set_systemd_timeout_for_dev $_noreload $1
1394 cancel_wait_for_dev()
1395 @@ -991,12 +895,6 @@ cancel_wait_for_dev()
1396 _name="$(str_replace "$1" '/' '\x2f')"
1397 rm -f -- "$hookdir/initqueue/finished/devexists-${_name}.sh"
1398 rm -f -- "$hookdir/emergency/80-${_name}.sh"
1399 - if [ -n "$DRACUT_SYSTEMD" ]; then
1400 - _name=$(dev_unit_name "$1")
1401 - rm -f -- ${PREFIX}/etc/systemd/system/initrd.target.wants/${_name}.device
1402 - rm -f -- ${PREFIX}/etc/systemd/system/${_name}.device.d/timeout.conf
1403 - /sbin/initqueue --onetime --unique --name daemon-reload systemctl daemon-reload
1408 @@ -1081,43 +979,35 @@ fi
1412 - if [ -n "$DRACUT_SYSTEMD" ]; then
1414 - echo "PS1=\"$_name:\\\${PWD}# \"" >/etc/profile
1415 - systemctl start dracut-emergency.service
1416 - rm -f -- /etc/profile
1417 - rm -f -- /.console_lock
1420 - source_hook "$hook"
1423 - echo 'You might want to save "/run/initramfs/rdsosreport.txt" to a USB stick or /boot'
1424 - echo 'after mounting them and attach it to a bug report.'
1425 - if ! RD_DEBUG= getargbool 0 rd.debug -d -y rdinitdebug -d -y rdnetdebug; then
1427 - echo 'To get more debug information in the report,'
1428 - echo 'reboot with "rd.debug" added to the kernel command line.'
1431 - echo 'Dropping to debug shell.'
1433 + source_hook "$hook"
1436 + echo 'You might want to save "/run/initramfs/rdsosreport.txt" to a USB stick or /boot'
1437 + echo 'after mounting them and attach it to a bug report.'
1438 + if ! RD_DEBUG= getargbool 0 rd.debug -d -y rdinitdebug -d -y rdnetdebug; then
1440 - export PS1="$_name:\${PWD}# "
1441 - [ -e /.profile ] || >/.profile
1443 - _ctty="$(RD_DEBUG= getarg rd.ctty=)" && _ctty="/dev/${_ctty##*/}"
1444 - if [ -z "$_ctty" ]; then
1446 - while [ -f /sys/class/tty/$_ctty/active ]; do
1447 - _ctty=$(cat /sys/class/tty/$_ctty/active)
1448 - _ctty=${_ctty##* } # last one in the list
1452 - [ -c "$_ctty" ] || _ctty=/dev/tty1
1453 - case "$(/usr/bin/setsid --help 2>&1)" in *--ctty*) CTTY="--ctty";; esac
1454 - setsid $CTTY /bin/sh -i -l 0<>$_ctty 1<>$_ctty 2<>$_ctty
1455 + echo 'To get more debug information in the report,'
1456 + echo 'reboot with "rd.debug" added to the kernel command line.'
1459 + echo 'Dropping to debug shell.'
1461 + export PS1="$_name:\${PWD}# "
1462 + [ -e /.profile ] || >/.profile
1464 + _ctty="$(RD_DEBUG= getarg rd.ctty=)" && _ctty="/dev/${_ctty##*/}"
1465 + if [ -z "$_ctty" ]; then
1467 + while [ -f /sys/class/tty/$_ctty/active ]; do
1468 + _ctty=$(cat /sys/class/tty/$_ctty/active)
1469 + _ctty=${_ctty##* } # last one in the list
1473 + [ -c "$_ctty" ] || _ctty=/dev/tty1
1474 + case "$(/usr/bin/setsid --help 2>&1)" in *--ctty*) CTTY="--ctty";; esac
1475 + setsid $CTTY /bin/sh -i -l 0<>$_ctty 1<>$_ctty 2<>$_ctty
1479 diff -urpa dracut-048.orig/modules.d/99base/init.sh dracut-048/modules.d/99base/init.sh
1480 --- dracut-048.orig/modules.d/99base/init.sh 2018-07-21 20:59:45.493094245 +0000
1481 +++ dracut-048/modules.d/99base/init.sh 2018-07-21 21:00:11.636092687 +0000
1482 @@ -150,7 +150,7 @@ getargbool 0 rd.udev.info -d -y rdudevin
1483 getargbool 0 rd.udev.debug -d -y rdudevdebug && UDEV_LOG=debug
1485 # start up udev and trigger cold plugs
1486 -UDEV_LOG=$UDEV_LOG $systemdutildir/systemd-udevd --daemon --resolve-names=never
1487 +UDEV_LOG=$UDEV_LOG /sbin/udevd --daemon --resolve-names=never
1489 UDEV_QUEUE_EMPTY="udevadm settle --timeout=0"
1491 diff -urpa dracut-048.orig/modules.d/99base/memtrace-ko.sh dracut-048/modules.d/99base/memtrace-ko.sh
1492 --- dracut-048.orig/modules.d/99base/memtrace-ko.sh 2018-07-06 08:37:51.000000000 +0000
1493 +++ dracut-048/modules.d/99base/memtrace-ko.sh 2018-07-21 21:00:11.636092687 +0000
1494 @@ -23,7 +23,7 @@ get_want_events() {
1497 get_event_filter() {
1498 - echo "comm == systemd-udevd || comm == modprobe || comm == insmod"
1499 + echo "comm == udevd || comm == modprobe || comm == insmod"
1503 @@ -63,7 +63,7 @@ prepare_trace() {
1504 echo "$(get_want_events)" > $trace_base/tracing/set_event
1506 # There are three kinds of known applications for module loading:
1507 - # "systemd-udevd", "modprobe" and "insmod".
1508 + # "udevd", "modprobe" and "insmod".
1509 # Set them as the global events filter.
1510 # NOTE: Some kernel may not support this format of filter, anyway
1511 # the operation will fail and it doesn't matter.
1512 diff -urpa dracut-048.orig/modules.d/99base/module-setup.sh dracut-048/modules.d/99base/module-setup.sh
1513 --- dracut-048.orig/modules.d/99base/module-setup.sh 2018-07-21 20:59:45.493094245 +0000
1514 +++ dracut-048/modules.d/99base/module-setup.sh 2018-07-21 21:00:11.636092687 +0000
1515 @@ -46,11 +46,8 @@ install() {
1516 inst_simple "$moddir/dracut-lib.sh" "/lib/dracut-lib.sh"
1517 mkdir -p "${initdir}/var"
1519 - if ! dracut_module_included "systemd"; then
1520 - inst_multiple switch_root || dfatal "Failed to install switch_root"
1521 - inst_hook cmdline 10 "$moddir/parse-root-opts.sh"
1522 - inst_multiple -o $systemdutildir/systemd-timestamp
1524 + inst_multiple switch_root || dfatal "Failed to install switch_root"
1525 + inst_hook cmdline 10 "$moddir/parse-root-opts.sh"
1527 if [[ $realinitpath ]]; then
1528 for i in $realinitpath; do
1529 @@ -92,11 +89,8 @@ install() {
1531 ## save host_devs which we need bring up
1532 if [[ $hostonly_cmdline == "yes" ]]; then
1533 - if [[ -f "$initdir/lib/dracut/need-initqueue" ]] || ! dracut_module_included "systemd"; then
1534 + if [[ -f "$initdir/lib/dracut/need-initqueue" ]]; then
1536 - if dracut_module_included "systemd"; then
1541 . "$moddir/dracut-lib.sh"
1542 diff -urpa dracut-048.orig/modules.d/99fs-lib/fs-lib.sh dracut-048/modules.d/99fs-lib/fs-lib.sh
1543 --- dracut-048.orig/modules.d/99fs-lib/fs-lib.sh 2018-07-06 08:37:51.000000000 +0000
1544 +++ dracut-048/modules.d/99fs-lib/fs-lib.sh 2018-07-21 21:00:11.636092687 +0000
1545 @@ -247,9 +247,4 @@ write_fs_tab() {
1548 echo "$_root /sysroot $_rootfstype $_rootflags $_fspassno 0" >> /etc/fstab
1550 - if type systemctl >/dev/null 2>/dev/null; then
1551 - systemctl daemon-reload
1552 - systemctl --no-block start initrd-root-fs.target