]> TLD Linux GIT Repositories - packages/dracut.git/blob - no_systemd.patch
- updated to 059
[packages/dracut.git] / no_systemd.patch
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() {
5      fi
6  
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"
14 -            readonly _dlogfd=15
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.
20              kmsgloglvl=$sysloglvl
21              sysloglvl=0
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
26  
27          if ! [[ -s $uefi_stub ]]; then
28              for uefi_stub in \
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
33                  break
34              done
35 @@ -1319,32 +1318,6 @@ if ! [[ -d "$udevdir" ]]; then
36      [[ -e /usr/lib/udev/collect ]] && udevdir=/usr/lib/udev
37  fi
38  
39 -[[ -d $systemdutildir ]] \
40 -    || systemdutildir=$(pkg-config systemd --variable=systemdutildir 2>/dev/null)
41 -
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
45 -fi
46 -
47 -[[ -d $systemdsystemunitdir ]] \
48 -    || systemdsystemunitdir=$(pkg-config systemd --variable=systemdsystemunitdir 2>/dev/null)
49 -
50 -[[ -d "$systemdsystemunitdir" ]] || systemdsystemunitdir=${systemdutildir}/system
51 -
52 -[[ -d $systemdsystemconfdir ]] \
53 -    || systemdsystemconfdir=$(pkg-config systemd --variable=systemdsystemconfdir 2>/dev/null)
54 -
55 -[[ -d "$systemdsystemconfdir" ]] || systemdsystemconfdir=/etc/systemd/system
56 -
57 -[[ -d $tmpfilesdir ]] \
58 -    || tmpfilesdir=$(pkg-config systemd --variable=tmpfilesdir 2>/dev/null)
59 -
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
63 -fi
64 -
65  export initdir dracutbasedir \
66      dracutmodules force_add_dracutmodules add_dracutmodules omit_dracutmodules \
67      mods_to_load \
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 \
74 -    tmpfilesdir
75 +    hostonly_cmdline loginstall
76  
77  mods_to_load=""
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"
81      done
82  
83 -    if [[ $systemdutildir ]]; then
84 -        if [ -d ${initdir}/$systemdutildir ]; then
85 -            mkdir -p ${initdir}/etc/conf.d
86 -            {
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
91 -        fi
92 -    fi
93 -
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
98  
99  command -v restorecon &>/dev/null && restorecon -- "$outfile"
100  
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"
109 -        exit 1
110 -    fi
111 -
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")"
116 -        fi
117 -    fi
118 -fi
119 -
120  exit 0
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() {
125  
126  # called by dracut
127  install() {
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
132 -        inst /bin/bash
133 -    else
134 -        dwarning "caps: does not work with systemd in the initramfs"
135 -    fi
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
139 +    inst /bin/bash
140  }
141  
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() {
146  
147  # called by dracut
148  install() {
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"
163 -    fi
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
177  }
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
181 @@ -1,11 +1,5 @@
182  #!/bin/sh
183  
184 -[ -n "$DRACUT_SYSTEMD" ] && exit 0
185 -
186 -if [ -x $systemdutildir/systemd-vconsole-setup ]; then
187 -    $systemdutildir/systemd-vconsole-setup "$@"
188 -fi
189 -
190  [ -e /etc/vconsole.conf ] && . /etc/vconsole.conf
191  
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() {
197  
198  # called by dracut
199  install() {
200 -    if dracut_module_included "systemd"; then
201 -        unset FONT
202 -        unset KEYMAP
203 -        [[ -f /etc/vconsole.conf ]] && . /etc/vconsole.conf
204 -    fi
205 -
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() {
210      install_base() {
211          inst_multiple setfont loadkeys kbd_mode stty
212  
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"
217 -        fi
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"
221  
222          if [[ ${kbddir} != "/usr/share" ]]; then
223              inst_dir /usr/share
224 @@ -222,19 +214,11 @@ install() {
225              inst_simple ${kbddir}/unimaps/${FONT_UNIMAP}.uni
226          fi
227  
228 -        if dracut_module_included "systemd" && [[ -f ${I18N_CONF} ]]; then
229 -            inst_simple ${I18N_CONF}
230 -        else
231 -            mksubdirs ${initdir}${I18N_CONF}
232 -            print_vars LC_ALL LANG >> ${initdir}${I18N_CONF}
233 -        fi
234 +        mksubdirs ${initdir}${I18N_CONF}
235 +        print_vars LC_ALL LANG >> ${initdir}${I18N_CONF}
236  
237 -        if dracut_module_included "systemd" && [[ -f ${VCONFIG_CONF} ]]; then
238 -            inst_simple ${VCONFIG_CONF}
239 -        else
240 -            mksubdirs ${initdir}${VCONFIG_CONF}
241 -            print_vars KEYMAP EXT_KEYMAPS UNICODE FONT FONT_MAP FONT_UNIMAP >> ${initdir}${VCONFIG_CONF}
242 -        fi
243 +        mksubdirs ${initdir}${VCONFIG_CONF}
244 +        print_vars KEYMAP EXT_KEYMAPS UNICODE FONT FONT_MAP FONT_UNIMAP >> ${initdir}${VCONFIG_CONF}
245  
246          return 0
247      }
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)
259              rv=0
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() {
264  
265      inst_multiple readlink
266  
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
270 -    fi
271 +    inst_hook pre-trigger 10 "$moddir"/plymouth-pretrigger.sh
272 +    inst_hook pre-pivot 90 "$moddir"/plymouth-newroot.sh
273  }
274  
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
278 @@ -1,5 +1,5 @@
279  #!/bin/sh
280  
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
284  fi
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
288 @@ -1,6 +1,6 @@
289  #!/bin/sh
290  
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() {
300          esac
301      fi
302  
303 -    if ! dracut_module_included "systemd"; then
304 -        inst_hook initqueue/timeout 10 "$moddir/btrfs_timeout.sh"
305 -    fi
306 +    inst_hook initqueue/timeout 10 "$moddir/btrfs_timeout.sh"
307  
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
313 @@ -24,8 +24,4 @@ fi
314  
315  echo "$luks $dev - timeout=0,$allowdiscards" >> /etc/crypttab
316  
317 -if command -v systemctl >/dev/null; then
318 -    systemctl daemon-reload
319 -    systemctl start cryptsetup.target
320 -fi
321  exit 0
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
325 @@ -4,7 +4,7 @@
326  check() {
327      local _rootdev
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
331  
332      [[ $hostonly ]] || [[ $mount_needs ]] && {
333          for fs in "${host_fs_types[@]}"; do
334 @@ -59,13 +59,11 @@ install() {
335      fi
336  
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"
344 -    fi
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"
350  
351      if [[ $hostonly ]] && [[ -f /etc/crypttab ]]; then
352          # filter /etc/crypttab for the devices we need
353 @@ -135,17 +133,5 @@ install() {
354  
355      inst_simple "$moddir/crypt-lib.sh" "/lib/dracut-crypt-lib.sh"
356  
357 -    if dracut_module_included "systemd"; then
358 -        inst_multiple -o \
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
367 -    fi
368 -
369      dracut_need_initqueue
370  }
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)
377  
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
382 -    fi
383 -
384      if [ -n "$PARTUUID" ]; then
385          for uuid in $PARTUUID; do
386  
387 @@ -56,26 +50,12 @@ else
388                  luksname="luks-$uuid"
389              fi
390  
391 -            if [ -z "$DRACUT_SYSTEMD" ]; then
392 -                {
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
398 -            else
399 -                luksname=$(dev_unit_name "$luksname")
400 -                luksname="$(str_replace "$luksname" '\' '\\')"
401 -
402 -                if ! crypttab_contains "$uuid"; then
403 -                    {
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
409 -                fi
410 -            fi
411 +            {
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
417          done
418  
419      elif [ -n "$SERIAL" ]; then
420 @@ -88,26 +68,12 @@ else
421                  luksname="luks-$serialid"
422              fi
423  
424 -            if [ -z "$DRACUT_SYSTEMD" ]; then
425 -                {
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
431 -            else
432 -                luksname=$(dev_unit_name "$luksname")
433 -                luksname="$(str_replace "$luksname" '\' '\\')"
434 -
435 -                if ! crypttab_contains "$serialid"; then
436 -                    {
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
442 -                fi
443 -            fi
444 +            {
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
450          done
451  
452      elif [ -n "$LUKS" ]; then
453 @@ -120,28 +86,13 @@ else
454                  luksname="luks-$luksid"
455              fi
456  
457 -            if [ -z "$DRACUT_SYSTEMD" ]; then
458 -                {
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
465 -            else
466 -                luksname=$(dev_unit_name "$luksname")
467 -                luksname="$(str_replace "$luksname" '\' '\\')"
468 -
469 -                if ! crypttab_contains "$luksid"; then
470 -                    {
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
477 -                fi
478 -            fi
479 +            {
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
486  
487              uuid=$luksid
488              while [ "$uuid" != "${uuid#*-}" ]; do uuid=${uuid%%-*}${uuid#*-}; done
489 @@ -154,19 +105,11 @@ else
490              } >> "$hookdir/emergency/90-crypt.sh"
491          done
492      elif getargbool 0 rd.auto; then
493 -        if [ -z "$DRACUT_SYSTEMD" ]; then
494 -            {
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
499 -        else
500 -            {
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
505 -        fi
506 +        {
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
511      fi
512  
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
524 -    else
525 -        checkisomd5 --verbose $livedev
526 -    fi
527 +    checkisomd5 --verbose $livedev
528      if [ $? -eq 1 ]; then
529          die "CD check failed!"
530          exit 1
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
534      else
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
540          else
541 @@ -137,7 +129,6 @@ do_live_overlay() {
542                  fi
543                  if [ -n "$overlayfs" ]; then
544                      unset -v overlayfs
545 -                    [ -n "$DRACUT_SYSTEMD" ] && reloadsysrootmountunit="yes"
546                  fi
547                  setup="yes"
548              else
549 @@ -148,7 +139,6 @@ do_live_overlay() {
550                      ln -s /run/initramfs/overlayfs/ovlwork /run/ovlwork$opt
551                      if [ -z "$overlayfs" ]; then
552                          overlayfs="yes"
553 -                        [ -n "$DRACUT_SYSTEMD" ] && reloadsysrootmountunit="yes"
554                      fi
555                      setup="yes"
556                  fi
557 @@ -159,7 +149,6 @@ do_live_overlay() {
558              ln -s /run/initramfs/overlayfs$pathspec/../ovlwork /run/ovlwork$opt
559              if [ -z "$overlayfs" ]; then
560                  overlayfs="yes"
561 -                [ -n "$DRACUT_SYSTEMD" ] && reloadsysrootmountunit="yes"
562              fi
563              setup="yes"
564          fi
565 @@ -169,7 +158,6 @@ do_live_overlay() {
566          if [ $? != 0 ]; then
567              m='OverlayFS is not available; using temporary Device-mapper overlay.'
568              unset -v overlayfs setup
569 -            [ -n "$reloadsysrootmountunit" ] && unset -v reloadsysrootmountunit
570          fi
571      fi
572  
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}"
583 -                    else
584 -                        plymouth ask-question --prompt="${m}" --command=true
585 -                    fi
586 -                else
587 -                    m=">>>${m//.[[:space:]]/.}  <<<"
588 -                    systemd-ask-password --timeout=0 "${m}"
589 -                fi
590 -            else
591 -                type plymouth >/dev/null 2>&1 && plymouth --ping && plymouth --quit
592 -                read -s -r -p $'\n\n'"${m}" -n 1 reply
593 -            fi
594 +            type plymouth >/dev/null 2>&1 && plymouth --ping && plymouth --quit
595 +            read -s -r -p $'\n\n'"${m}" -n 1 reply
596          fi
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
601  fi
602  
603 -if [ -n "$reloadsysrootmountunit" ]; then
604 -    > /xor_overlayfs
605 -    systemctl daemon-reload
606 -fi
607 -
608  ROOTFLAGS="$(getarg rootflags)"
609  
610  if [ -n "$overlayfs" ]; then
611 @@ -375,18 +343,14 @@ if [ -n "$overlayfs" ]; then
612      else
613          mount -r $FSIMG /run/rootfsbase
614      fi
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
620 -    fi
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
625  else
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
630 -    fi
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
634  fi
635  
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() {
640      local _name
641      local dev
642      for dev in /dev/disk/by-uuid/*; do
643 -        _name=$(dev_unit_name "$dev")
644 +        _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
660  }
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() {
665  install() {
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"
670 -    fi
671 +    inst_hook cmdline 01 "$moddir/parse-kernel.sh"
672      inst_simple "$moddir/insmodpost.sh" /sbin/insmodpost.sh
673  }
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
683 -    fi
684      dracut_need_initqueue
685  }
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() {
690  
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
698 -        else
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
701 -        fi
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
704      fi
705  
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
717 -        fi
718 -        if [ -e $systemdsystemunitdir/mdadm-last-resort@.service ]; then
719 -            inst_simple $systemdsystemunitdir/mdadm-last-resort@.service
720 -        fi
721 -        if [ -e $systemdsystemunitdir/mdadm-last-resort@.timer ]; then
722 -            inst_simple $systemdsystemunitdir/mdadm-last-resort@.timer
723 -        fi
724 -    fi
725      inst_hook pre-shutdown 30 "$moddir/mdmon-pre-shutdown.sh"
726      dracut_need_initqueue
727  }
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"
733      fi
734  
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"
739 -    else
740 -        inst_hook pre-trigger 02 "$moddir/multipathd.sh"
741 -        inst_hook cleanup   02 "$moddir/multipathd-stop.sh"
742 -    fi
743 +    inst_hook pre-trigger 02 "$moddir/multipathd.sh"
744 +    inst_hook cleanup   02 "$moddir/multipathd-stop.sh"
745  
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
751 @@ -3,14 +3,6 @@
752  # called by dracut
753  check() {
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
761 -        fi
762 -
763          for i in /sys/class/dmi/id/*_vendor; do
764              [[ -f $i ]] || continue
765              read vendor < $i
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
769 @@ -3,14 +3,6 @@
770  # called by dracut
771  check() {
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
779 -        fi
780 -
781          for i in /sys/class/dmi/id/*_vendor; do
782              [[ -f $i ]] || continue
783              read vendor < $i
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() {
788  
789      inst_multiple stratisd-init thin_check thin_repair
790  
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"
795 -    else
796 -        inst_hook cmdline 25 "$moddir/stratisd-start.sh"
797 -        inst_hook cleanup 25 "$moddir/stratisd-stop.sh"
798 -    fi
799 +    inst_hook cmdline 25 "$moddir/stratisd-start.sh"
800 +    inst_hook cleanup 25 "$moddir/stratisd-stop.sh"
801  }
802  
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() {
807  install() {
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
813  
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
818 @@ -4,11 +4,7 @@
819  
820  if [ -e /var/run/lldpad.pid ]; then
821      lldpad -k
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
828 -    fi
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
832  fi
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() {
837      return 0
838  }
839  
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
844 -fi
845 +[ -f /etc/fstab ] && fstab_mount /etc/fstab
846  
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
852 @@ -1,4 +1,4 @@
853  #!/bin/sh
854  
855 -[ -z "${DRACUT_SYSTEMD}" ] && [ -e /sys/module/bnx2i ] && killproc iscsiuio
856 +[ -e /sys/module/bnx2i ] && killproc iscsiuio
857  
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
864  
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
867          iscsiuio
868          > /tmp/iscsiuio-started
869  fi
870 @@ -142,11 +142,6 @@ handle_netroot()
871             mkdir -p /etc/iscsi
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 :-/
877 -               sleep 1
878 -           fi
879      fi
880  
881      if [ -z "$iscsi_initiator" ]; then
882 @@ -163,11 +158,6 @@ handle_netroot()
883          mkdir -p /etc/iscsi
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 :-/
889 -            sleep 1
890 -        fi
891      fi
892  
893  
894 @@ -188,11 +178,6 @@ handle_netroot()
895      if ! [ -e /etc/iscsi/initiatorname.iscsi ]; then
896          mkdir -p /etc/iscsi
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 :-/
901 -            sleep 1
902 -        fi
903      fi
904  # FIXME $iscsi_protocol??
905  
906 @@ -204,12 +189,9 @@ handle_netroot()
907          wait_for_dev -n /dev/root
908  
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
913      fi
914  
915 -    ### ToDo: Upstream calls systemd-run - Shall we, do we have to port this?
916 -
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
919  
920 @@ -250,14 +232,6 @@ if [ "$netif" != "timeout" ] && getargbo
921      all_ifaces_setup || exit 0
922  fi
923  
924 -if [ "$netif" = "timeout" ] && all_ifaces_setup; then
925 -    # s.th. went wrong and the timeout script hits
926 -    # restart
927 -    systemctl restart iscsid
928 -    # damn iscsid is not ready after unit says it's ready
929 -    sleep 2
930 -fi
931 -
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
941  
942 -    ln -sf $systemdsystemunitdir/iscsid.socket $systemdsystemunitdir/sockets.target.wants/iscsid.socket
943 -    ln -sf $systemdsystemunitdir/iscsiuio.socket $systemdsystemunitdir/sockets.target.wants/iscsiuio.socket
944 -
945 -    inst_multiple -o \
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
952 -
953      [[ -d /etc/iscsi ]] && inst_dir $(/usr/bin/find /etc/iscsi)
954  
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"
962 -    else
963 -        inst_multiple -o \
964 -                      $systemdsystemunitdir/iscsi.service \
965 -                      $systemdsystemunitdir/iscsid.service \
966 -                      $systemdsystemunitdir/iscsid.socket \
967 -                      $systemdsystemunitdir/iscsiuio.service \
968 -                      $systemdsystemunitdir/iscsiuio.socket \
969 -                      iscsiadm iscsid
970 -
971 -        mkdir -p "${initdir}/$systemdsystemunitdir/sockets.target.wants"
972 -        for i in \
973 -                iscsiuio.socket \
974 -            ; do
975 -            ln_r "$systemdsystemunitdir/${i}" "$systemdsystemunitdir/sockets.target.wants/${i}"
976 -        done
977 -
978 -        mkdir -p "${initdir}/$systemdsystemunitdir/basic.target.wants"
979 -        for i in \
980 -                iscsid.service \
981 -                iscsiuio.service \
982 -            ; do
983 -            ln_r "$systemdsystemunitdir/${i}" "$systemdsystemunitdir/basic.target.wants/${i}"
984 -        done
985 -
986 -        # Make sure iscsid is started after dracut-cmdline and ready for the initqueue
987 -        mkdir -p "${initdir}/$systemdsystemunitdir/iscsid.service.d"
988 -        (
989 -            echo "[Unit]"
990 -            echo "After=dracut-cmdline.service"
991 -            echo "Before=dracut-initqueue.service"
992 -        ) > "${initdir}/$systemdsystemunitdir/iscsid.service.d/dracut.conf"
993 -    fi
994 +    inst "$moddir/mount-lun.sh" "/bin/mount-lun.sh"
995      inst_dir /var/lib/iscsi
996      dracut_need_initqueue
997  }
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
1002      netroot=$root
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
1007      root=/dev/root
1008  
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
1016  fi
1017  
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
1021          mkdir -p /etc/iscsi
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 :-/
1026 -            sleep 1
1027 -        fi
1028      fi
1029  fi
1030  
1031 @@ -133,11 +128,6 @@ if [ -z $iscsi_initiator ] && [ -f /sys/
1032          mkdir -p /etc/iscsi
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 :-/
1038 -            sleep 1
1039 -        fi
1040      fi
1041  fi
1042  
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() {
1047      inst nbd-client
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
1052 -    fi
1053      dracut_need_initqueue
1054  }
1055  
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
1062  
1063 -    if [ -z "$DRACUT_SYSTEMD" ]; then
1064 -        printf '/bin/mount %s\n' \
1065 -             "$NEWROOT" \
1066 -             > $hookdir/mount/01-$$-nbd.sh
1067 -    fi
1068 -fi
1069 -
1070 -if strstr "$(nbd-client --help 2>&1)" "systemd-mark"; then
1071 -    preopts="--systemd-mark $preopts"
1072 +    printf '/bin/mount %s\n' \
1073 +         "$NEWROOT" \
1074 +         > $hookdir/mount/01-$$-nbd.sh
1075  fi
1076  
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
1080 -    else
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
1086 -    fi
1087 +    nbd-client "$nbdserver" $nbdport /dev/nbd0 $preopts $opts || exit 1
1088  else
1089 -    if [ -z "$DRACUT_SYSTEMD" ]; then
1090 -        nbd-client -name "$nbdport" "$nbdserver" /dev/nbd0 $preopts $opts || exit 1
1091 -    else
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
1097 -    fi
1098 +    nbd-client -name "$nbdport" "$nbdserver" /dev/nbd0 $preopts $opts || exit 1
1099  fi
1100  
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
1107  
1108  
1109 -if [ -n "${DRACUT_SYSTEMD}" ] && [ "$root" = "dhcp" ]; then
1110 -    echo "root=$netroot" > /etc/cmdline.d/root.conf
1111 -    systemctl --no-block daemon-reload
1112 -fi
1113 -
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() {
1121      local _i
1122      local _nsslibs
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
1127  
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"
1134      fi
1135  
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
1142 -        return 0
1143 -    fi
1144 -
1145      # Optional uswsusp support
1146      for _bin in /usr/sbin/resume /usr/@lib@/suspend/resume /usr/@lib@/uswsusp/resume
1147      do
1148 @@ -52,11 +43,7 @@ install() {
1149          }
1150      done
1151  
1152 -    if ! dracut_module_included "systemd"; then
1153 -        inst_hook cmdline 10 "$moddir/parse-resume.sh"
1154 -    else
1155 -        inst_script "$moddir/parse-resume.sh" /lib/dracut/parse-resume.sh
1156 -    fi
1157 +    inst_hook cmdline 10 "$moddir/parse-resume.sh"
1158  
1159      inst_script  "$moddir/resume.sh" /lib/dracut/resume.sh
1160  }
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() {
1165  
1166      inst_multiple umount
1167      inst_multiple tr
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"
1172 -    fi
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"
1176  
1177      inst_hook initqueue/timeout 99 "$moddir/rootfallback.sh"
1178  }
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() {
1183      inst_dir /etc/udev
1184      inst_multiple -o /etc/udev/udev.conf
1185  
1186 -    [ -d ${initdir}/$systemdutildir ] || mkdir -p ${initdir}/$systemdutildir
1187 -    for _i in ${systemdutildir}/systemd-udevd ${udevdir}/udevd /sbin/udevd; do
1188 -        [ -x "$_i" ] || continue
1189 -        inst "$_i"
1190 -
1191 -        if ! [[ -f  ${initdir}${systemdutildir}/systemd-udevd ]]; then
1192 -            ln -fs "$_i" ${initdir}${systemdutildir}/systemd-udevd
1193 -        fi
1194 -        break
1195 -    done
1196 -    if ! [[ -e ${initdir}${systemdutildir}/systemd-udevd ]]; then
1197 -        derror "Cannot find [systemd-]udevd binary!"
1198 -        exit 1
1199 -    fi
1200 +    inst /sbin/udevd;
1201  
1202      inst_rules \
1203          40-redhat.rules \
1204 @@ -56,11 +43,6 @@ install() {
1205      # eudev rules
1206      inst_rules 80-drivers-modprobe.rules
1207  
1208 -    if dracut_module_included "systemd"; then
1209 -        inst_multiple -o ${systemdutildir}/network/*.link
1210 -        [[ $hostonly ]] && inst_multiple -H -o /etc/systemd/network/*.link
1211 -    fi
1212 -
1213      {
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() {
1220          return 255
1221      }
1222  
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
1229 -    fi
1230 -
1231      for i in /sys/class/dmi/id/*_vendor; do
1232          [[ -f $i ]] || continue
1233          read vendor < $i
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() {
1238  
1239  # called by dracut
1240  install() {
1241 -    if ! dracut_module_included "systemd"; then
1242 -        inst_hook pre-pivot 50 "$moddir/mount-usr.sh"
1243 -    fi
1244 +    inst_hook pre-pivot 50 "$moddir/mount-usr.sh"
1245      :
1246  }
1247  
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
1251 @@ -1,6 +1,5 @@
1252  #!/bin/sh
1253  
1254 -export DRACUT_SYSTEMD
1255  export NEWROOT
1256  if [ -n "$NEWROOT" ]; then
1257      [ -d $NEWROOT ] || mkdir -p -m 0755 $NEWROOT
1258 @@ -58,32 +57,13 @@ trim() {
1259      printf "%s" "$var"
1260  }
1261  
1262 -if [ -z "$DRACUT_SYSTEMD" ]; then
1263 -
1264 -    warn() {
1265 -        check_quiet
1266 -        echo "<28>dracut Warning: $*" > /dev/kmsg
1267 -        echo "dracut Warning: $*" >&2
1268 -    }
1269 -
1270 -    info() {
1271 -        check_quiet
1272 -        echo "<30>dracut: $*" > /dev/kmsg
1273 -        [ "$DRACUT_QUIET" != "yes" ] && \
1274 -            echo "dracut: $*" >&2
1275 -    }
1276 -
1277 -else
1278 -
1279 -    warn() {
1280 -        echo "Warning: $*" >&2
1281 -    }
1282 -
1283 -    info() {
1284 -        echo "$*"
1285 -    }
1286 +warn() {
1287 +    echo "Warning: $*" >&2
1288 +}
1289  
1290 -fi
1291 +info() {
1292 +    echo "$*"
1293 +}
1294  
1295  vwarn() {
1296      while read line || [ -n "$line" ]; do
1297 @@ -475,10 +455,6 @@ die() {
1298          source_hook "shutdown-emergency"
1299      fi
1300  
1301 -    if [ -n "$DRACUT_SYSTEMD" ]; then
1302 -        systemctl --no-block --force halt
1303 -    fi
1304 -
1305      exit 1
1306  }
1307  
1308 @@ -883,77 +859,7 @@ wait_for_mount()
1309      } >> "$hookdir/emergency/90-${_name}.sh"
1310  }
1311  
1312 -# get a systemd-compatible unit name from a path
1313 -# (mimicks unit_name_from_path_instance())
1314 -dev_unit_name()
1315 -{
1316 -    local dev="$1"
1317 -
1318 -    if command -v systemd-escape >/dev/null; then
1319 -        systemd-escape -p -- "$dev"
1320 -        return
1321 -    fi
1322  
1323 -    if [ "$dev" = "/" -o -z "$dev" ]; then
1324 -        printf -- "-"
1325 -        exit 0
1326 -    fi
1327 -
1328 -    dev="${1%%/}"
1329 -    dev="${dev##/}"
1330 -    dev="$(str_replace "$dev" '\' '\x5c')"
1331 -    dev="$(str_replace "$dev" '-' '\x2d')"
1332 -    if [ "${dev##.}" != "$dev" ]; then
1333 -        dev="\x2e${dev##.}"
1334 -    fi
1335 -    dev="$(str_replace "$dev" '/' '-')"
1336 -
1337 -    printf -- "%s" "$dev"
1338 -}
1339 -
1340 -# set_systemd_timeout_for_dev <dev>
1341 -# Set 'rd.timeout' as the systemd timeout for <dev>
1342 -
1343 -set_systemd_timeout_for_dev()
1344 -{
1345 -    local _name
1346 -    local _needreload
1347 -    local _noreload
1348 -    local _timeout
1349 -
1350 -    if [ "$1" = "-n" ]; then
1351 -        _noreload=1
1352 -        shift
1353 -    fi
1354 -
1355 -    _timeout=$(getarg rd.timeout)
1356 -    _timeout=${_timeout:-0}
1357 -
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
1364 -            _needreload=1
1365 -        fi
1366 -
1367 -        if ! [ -f ${PREFIX}/etc/systemd/system/${_name}.device.d/timeout.conf ]; then
1368 -            mkdir -p ${PREFIX}/etc/systemd/system/${_name}.device.d
1369 -            {
1370 -                echo "[Unit]"
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
1375 -            _needreload=1
1376 -        fi
1377 -
1378 -        if [ -z "$PREFIX" ] && [ "$_needreload" = 1 ] && [ -z "$_noreload" ]; then
1379 -            /sbin/initqueue --onetime --unique --name daemon-reload systemctl daemon-reload
1380 -        fi
1381 -    fi
1382 -}
1383  # wait_for_dev <dev>
1384  #
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"
1390 -
1391 -    set_systemd_timeout_for_dev $_noreload $1
1392  }
1393  
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
1404 -    fi
1405  }
1406  
1407  killproc() {
1408 @@ -1081,43 +979,35 @@ fi
1409  _emergency_shell()
1410  {
1411      local _name="$1"
1412 -    if [ -n "$DRACUT_SYSTEMD" ]; then
1413 -        > /.console_lock
1414 -        echo "PS1=\"$_name:\\\${PWD}# \"" >/etc/profile
1415 -        systemctl start dracut-emergency.service
1416 -        rm -f -- /etc/profile
1417 -        rm -f -- /.console_lock
1418 -    else
1419 -        debug_off
1420 -        source_hook "$hook"
1421 -        echo
1422 -        /sbin/rdsosreport
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
1426 -            echo
1427 -            echo 'To get more debug information in the report,'
1428 -            echo 'reboot with "rd.debug" added to the kernel command line.'
1429 -        fi
1430 -        echo
1431 -        echo 'Dropping to debug shell.'
1432 +    debug_off
1433 +    source_hook "$hook"
1434 +    echo
1435 +    /sbin/rdsosreport
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
1439          echo
1440 -        export PS1="$_name:\${PWD}# "
1441 -        [ -e /.profile ] || >/.profile
1442 -
1443 -        _ctty="$(RD_DEBUG= getarg rd.ctty=)" && _ctty="/dev/${_ctty##*/}"
1444 -        if [ -z "$_ctty" ]; then
1445 -            _ctty=console
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
1449 -            done
1450 -            _ctty=/dev/$_ctty
1451 -        fi
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.'
1457 +    fi
1458 +    echo
1459 +    echo 'Dropping to debug shell.'
1460 +    echo
1461 +    export PS1="$_name:\${PWD}# "
1462 +    [ -e /.profile ] || >/.profile
1463 +
1464 +    _ctty="$(RD_DEBUG= getarg rd.ctty=)" && _ctty="/dev/${_ctty##*/}"
1465 +    if [ -z "$_ctty" ]; then
1466 +        _ctty=console
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
1470 +        done
1471 +        _ctty=/dev/$_ctty
1472      fi
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
1476  }
1477  
1478  emergency_shell()
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
1484  
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
1488  
1489  UDEV_QUEUE_EMPTY="udevadm settle --timeout=0"
1490  
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() {
1495  }
1496  
1497  get_event_filter() {
1498 -    echo "comm == systemd-udevd || comm == modprobe || comm == insmod"
1499 +    echo "comm == udevd || comm == modprobe || comm == insmod"
1500  }
1501  
1502  is_trace_ready() {
1503 @@ -63,7 +63,7 @@ prepare_trace() {
1504      echo "$(get_want_events)" > $trace_base/tracing/set_event
1505  
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"
1518  
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
1523 -    fi
1524 +    inst_multiple switch_root || dfatal "Failed to install switch_root"
1525 +    inst_hook cmdline 10 "$moddir/parse-root-opts.sh"
1526  
1527      if [[ $realinitpath ]]; then
1528          for i in $realinitpath; do
1529 @@ -92,11 +89,8 @@ install() {
1530  
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
1535              (
1536 -                if dracut_module_included "systemd"; then
1537 -                    DRACUT_SYSTEMD=1
1538 -                fi
1539                  PREFIX="$initdir"
1540  
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() {
1546      fi
1547  
1548      echo "$_root /sysroot $_rootfstype $_rootflags $_fspassno 0" >> /etc/fstab
1549 -
1550 -    if type systemctl >/dev/null 2>/dev/null; then
1551 -        systemctl daemon-reload
1552 -        systemctl --no-block start initrd-root-fs.target
1553 -    fi
1554  }