systemd: changes for new initrd services

Requires systemd >= 198
master
Harald Hoyer 2013-03-06 16:19:29 +01:00
parent 8d85429a44
commit dbfaae0e34
22 changed files with 273 additions and 156 deletions

View File

@ -27,7 +27,6 @@ man8pages = dracut.8 \
modules.d/98systemd/dracut-pre-pivot.service.8 \
modules.d/98systemd/dracut-pre-trigger.service.8 \
modules.d/98systemd/dracut-pre-udev.service.8 \
modules.d/98systemd/initrd-switch-root.service.8 \
modules.d/98systemd/udevadm-cleanup-db.service.8

manpages = $(man1pages) $(man5pages) $(man7pages) $(man8pages)

View File

@ -86,7 +86,7 @@ Requires: udev > 166
Requires: kbd kbd-misc
%if 0%{?fedora} || 0%{?rhel} > 6
Requires: util-linux >= 2.21
Conflicts: systemd < 187
Conflicts: systemd < 198
%else
Requires: util-linux-ng >= 2.21
%endif

View File

@ -16,6 +16,11 @@ Before=systemd-vconsole-setup.service
After=systemd-journald.socket
Wants=systemd-journald.socket
ConditionPathExists=/etc/initrd-release
ConditionPathExistsGlob=|/etc/cmdline.d/*.conf
ConditionDirectoryNotEmpty=|/lib/dracut/hooks/cmdline
ConditionKernelCommandLine=|rd.break=cmdline
ConditionKernelCommandLine=|resume
ConditionKernelCommandLine=|noresume

[Service]
Type=oneshot
@ -24,6 +29,7 @@ StandardInput=null
StandardOutput=syslog
StandardError=syslog+console
KillMode=process
RemainAfterExit=yes

# Bash ignores SIGTERM, so we send SIGHUP instead, to ensure that bash
# terminates cleanly.

View File

@ -22,15 +22,57 @@ getargbool 0 rd.udev.log-priority=debug -d rd.udev.debug -d -n -y rdudevdebug &&

source_conf /etc/conf.d

root=$(getarg root=)

rflags="$(getarg rootflags=)"
getargbool 0 ro && rflags="${rflags},ro"
getargbool 0 rw && rflags="${rflags},rw"
rflags="${rflags#,}"

fstype="$(getarg rootfstype=)"
if [ -z "$fstype" ]; then
fstype="auto"
fi

export root
export rflags
export fstype

make_trace_mem "hook cmdline" '1+:mem' '1+:iomem' '3+:slab'
# run scriptlets to parse the command line
getarg 'rd.break=cmdline' -d 'rdbreak=cmdline' && emergency_shell -n cmdline "Break before cmdline"
source_hook cmdline

[ -f /lib/dracut/parse-resume.sh ] && . /lib/dracut/parse-resume.sh

case "$root" in
block:LABEL=*|LABEL=*)
root="${root#block:}"
root="$(echo $root | sed 's,/,\\x2f,g')"
root="block:/dev/disk/by-label/${root#LABEL=}"
rootok=1 ;;
block:UUID=*|UUID=*)
root="${root#block:}"
root="block:/dev/disk/by-uuid/${root#UUID=}"
rootok=1 ;;
block:PARTUUID=*|PARTUUID=*)
root="${root#block:}"
root="block:/dev/disk/by-partuuid/${root#PARTUUID=}"
rootok=1 ;;
/dev/*)
root="block:${root}"
rootok=1 ;;
esac

[ "${root%%:*}" = "block" ] && wait_for_dev "${root#block:}"

[ -z "$root" ] && die "No or empty root= argument"
[ -z "$rootok" ] && die "Don't know how to handle 'root=$root'"

export root rflags fstype netroot NEWROOT

export -p > /dracut-state.sh

service="${0##*/}"
cp "/etc/systemd/system/${service%.sh}.service" /run/systemd/system/
exit 0

View File

@ -8,18 +8,16 @@
# See systemd.special(7) for details

[Unit]
Description=Emergency Shell
Description=Dracut Emergency Shell
DefaultDependencies=no
After=systemd-vconsole-setup.service
Wants=systemd-vconsole-setup.service
Conflicts=emergency.service emergency.target

[Service]
Environment=HOME=/
WorkingDirectory=/
ExecStartPre=-/bin/plymouth quit
ExecStartPre=-/sbin/sosreport
ExecStartPre=-/bin/echo -e '\n\nEntering emergency mode. Exit the shell to continue.\nType "journalctl" to view system logs.\nYou might want to save "/run/initramfs/sosreport.txt" to a USB stick or /boot\nafter mounting them and attach it to a bug report.\n\n'
ExecStart=-/bin/sh -i -l
ExecStart=/bin/dracut-emergency
ExecStopPost=-/bin/rm -f /.console_lock
Type=oneshot
StandardInput=tty-force

View File

@ -0,0 +1,41 @@
#!/bin/sh
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

export DRACUT_SYSTEMD=1
if [ -f /dracut-state.sh ]; then
. /dracut-state.sh 2>/dev/null
fi
type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh

source_conf /etc/conf.d

[ -x /bin/plymouth ] && /bin/plymouth quit

export _rdshell_name="dracut" action="Boot" hook="emergency"

source_hook "$hook"


if getargbool 1 rd.shell -d -y rdshell || getarg rd.break -d rdbreak; then
echo
sosreport
echo
echo
echo 'Entering emergency mode. Exit the shell to continue.'
echo 'Type "journalctl" to view system logs.'
echo 'You might want to save "/run/initramfs/sosreport.txt" to a USB stick or /boot'
echo 'after mounting them and attach it to a bug report.'
echo
echo
[ -f /etc/profile ] && . /etc/profile
[ -z "$PS1" ] && export PS1="$_name:\${PWD}# "
exec sh -i -l
else
warn "$action has failed. To debug this issue add \"rd.shell rd.debug\" to the kernel command line."
exit 1
fi

/bin/rm -f /.console_lock

exit 0

View File

@ -13,8 +13,10 @@ Documentation=man:dracut-initqueue.service(8)
DefaultDependencies=no
After=systemd-udev-trigger.service
Wants=systemd-udev-trigger.service
After=cryptsetup.target
ConditionPathExists=/etc/initrd-release
ConditionPathExists=|/lib/dracut/need-initqueue
ConditionPathExistsGlob=|/lib/dracut/hooks/initqueue/*.sh
ConditionKernelCommandLine=|rd.break=pre-mount

[Service]
Type=oneshot
@ -23,6 +25,7 @@ StandardInput=null
StandardOutput=syslog
StandardError=syslog+console
KillMode=process
RemainAfterExit=yes

# Bash ignores SIGTERM, so we send SIGHUP instead, to ensure that bash
# terminates cleanly.

View File

@ -14,7 +14,7 @@ make_trace_mem "hook initqueue" '1:shortmem' '2+:mem' '3+:slab'
getarg 'rd.break=initqueue' -d 'rdbreak=initqueue' && emergency_shell -n initqueue "Break before initqueue"

RDRETRY=$(getarg rd.retry -d 'rd_retry=')
RDRETRY=${RDRETRY:-30}
RDRETRY=${RDRETRY:-180}
RDRETRY=$(($RDRETRY*2))
export RDRETRY

@ -57,6 +57,7 @@ while :; do
[ -e "$job" ] || break
job=$job . $job
udevadm settle --timeout=0 >/dev/null 2>&1 || main_loop=0
[ -f $hookdir/initqueue/work ] && main_loop=0
done
fi

@ -69,42 +70,8 @@ unset queuetriggered
unset main_loop
unset RDRETRY


# pre-mount happens before we try to mount the root filesystem,
# and happens once.
getarg 'rd.break=pre-mount' -d 'rdbreak=pre-mount' && emergency_shell -n pre-mount "Break pre-mount"
source_hook pre-mount


getarg 'rd.break=mount' -d 'rdbreak=mount' && emergency_shell -n mount "Break mount"
# mount scripts actually try to mount the root filesystem, and may
# be sourced any number of times. As soon as one suceeds, no more are sourced.
i=0
while :; do
if ismounted "$NEWROOT"; then
usable_root "$NEWROOT" && break;
umount "$NEWROOT"
fi
for f in $hookdir/mount/*.sh; do
[ -f "$f" ] && . "$f"
if ismounted "$NEWROOT"; then
usable_root "$NEWROOT" && break;
warn "$NEWROOT has no proper rootfs layout, ignoring and removing offending mount hook"
umount "$NEWROOT"
rm -f "$f"
fi
done

i=$(($i+1))
[ $i -gt 20 ] && emergency_shell "Can't mount root filesystem"
done

{
echo -n "Mounted root filesystem "
while read dev mp rest; do [ "$mp" = "$NEWROOT" ] && echo $dev; done < /proc/mounts
} | vinfo


export -p > /dracut-state.sh

service="${0##*/}"
cp "/etc/systemd/system/${service%.sh}.service" /run/systemd/system/
exit 0

View File

@ -0,0 +1,25 @@
DRACUT-MOUNT.SERVICE(8)
===========================
:doctype: manpage
:man source: dracut
:man manual: dracut

NAME
----
dracut-mount.service - runs the dracut hooks after /sysroot is mounted

SYNOPSIS
--------
dracut-mount.service

DESCRIPTION
-----------
This service runs all dracut hooks after the real root is mounted on /sysroot.

AUTHORS
-------
Harald Hoyer

SEE ALSO
--------
*dracut*(8)

View File

@ -0,0 +1,25 @@
DRACUT-PRE-MOUNT.SERVICE(8)
===========================
:doctype: manpage
:man source: dracut
:man manual: dracut

NAME
----
dracut-pre-mount.service - runs the dracut hooks before /sysroot is mounted

SYNOPSIS
--------
dracut-pre-mount.service

DESCRIPTION
-----------
This service runs all dracut hooks before the real root is mounted on /sysroot.

AUTHORS
-------
Harald Hoyer

SEE ALSO
--------
*dracut*(8)

View File

@ -11,13 +11,16 @@
Description=dracut pre-pivot and cleanup hook
Documentation=man:dracut-pre-pivot.service(8)
DefaultDependencies=no
After=dracut-initqueue.service
After=dracut-mount.service dracut-initqueue.service initrd-parse-etc.service local-fs.target
Wants=local-fs.target
Before=initrd-cleanup.service
ConditionPathExists=/etc/initrd-release
ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-pivot
ConditionKernelCommandLine=|rd.break=pre-pivot

[Service]
Type=oneshot
ExecStart=-/bin/dracut-pre-pivot
ExecStopPost=-/usr/bin/systemctl --no-block isolate initrd-switch-root.target
StandardInput=null
StandardOutput=syslog
StandardError=syslog+console

View File

@ -20,25 +20,11 @@ source_hook pre-pivot
getarg 'rd.break=cleanup' 'rdbreak=cleanup' && emergency_shell -n cleanup "Break cleanup"
source_hook cleanup

# By the time we get here, the root filesystem should be mounted.
# Try to find init.

for i in "$(getarg real_init=)" "$(getarg init=)"; do
[ -n "$i" ] || continue

__p=$(readlink -f "${NEWROOT}/${i}")
if [ -x "$__p" ]; then
INIT="$i"
echo "NEWINIT=\"$INIT\"" > /etc/switch-root.conf
break
fi
done

echo "NEWROOT=\"$NEWROOT\"" >> /etc/switch-root.conf

getarg rd.break -d rdbreak && emergency_shell -n switch_root "Break before switch_root"

# remove helper symlink
[ -h /dev/root ] && rm -f /dev/root

service="${0##*/}"
cp "/etc/systemd/system/${service%.sh}.service" /run/systemd/system/
exit 0

View File

@ -25,6 +25,7 @@ StandardInput=null
StandardOutput=syslog
StandardError=syslog+console
KillMode=process
RemainAfterExit=yes

# Bash ignores SIGTERM, so we send SIGHUP instead, to ensure that bash
# terminates cleanly.

View File

@ -19,4 +19,7 @@ getarg 'rd.break=pre-trigger' 'rdbreak=pre-trigger' && emergency_shell -n pre-tr
udevadm control --reload >/dev/null 2>&1 || :

export -p > /dracut-state.sh

service="${0##*/}"
cp "/etc/systemd/system/${service%.sh}.service" /run/systemd/system/
exit 0

View File

@ -17,6 +17,9 @@ Wants=dracut-cmdline.service
ConditionPathExists=/etc/initrd-release
ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-udev
ConditionKernelCommandLine=|rd.break=pre-udev
ConditionKernelCommandLine=|rd.driver.blacklist
ConditionKernelCommandLine=|rd.driver.pre
ConditionKernelCommandLine=|rd.driver.post

[Service]
Type=oneshot
@ -25,6 +28,7 @@ StandardInput=null
StandardOutput=syslog
StandardError=syslog+console
KillMode=process
RemainAfterExit=yes

# Bash ignores SIGTERM, so we send SIGHUP instead, to ensure that bash
# terminates cleanly.

View File

@ -15,5 +15,46 @@ make_trace_mem "hook pre-udev" '1:shortmem' '2+:mem' '3+:slab'
getarg 'rd.break=pre-udev' 'rdbreak=pre-udev' && emergency_shell -n pre-udev "Break pre-udev"
source_hook pre-udev

_modprobe_d=/etc/modprobe.d
if [ -d /usr/lib/modprobe.d ] ; then
_modprobe_d=/usr/lib/modprobe.d
elif [ -d /lib/modprobe.d ] ; then
_modprobe_d=/lib/modprobe.d
elif [ ! -d $_modprobe_d ] ; then
mkdir -p $_modprobe_d
fi

for i in $(getargs rd.driver.pre -d rdloaddriver=); do
(
IFS=,
for p in $i; do
modprobe $p 2>&1 | vinfo
done
)
done


[ -d /etc/modprobe.d ] || mkdir -p /etc/modprobe.d

for i in $(getargs rd.driver.blacklist -d rdblacklist=); do
(
IFS=,
for p in $i; do
echo "blacklist $p" >> $_modprobe_d/initramfsblacklist.conf
done
)
done

for p in $(getargs rd.driver.post -d rdinsmodpost=); do
echo "blacklist $p" >> $_modprobe_d/initramfsblacklist.conf
_do_insmodpost=1
done

[ -n "$_do_insmodpost" ] && initqueue --settled --unique --onetime insmodpost.sh
unset _do_insmodpost _modprobe_d
unset i

export -p > /dracut-state.sh
service="${0##*/}"
cp "/etc/systemd/system/${service%.sh}.service" /run/systemd/system/
exit 0

View File

@ -0,0 +1,30 @@
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.

# See systemd.special(7) for details

[Unit]
Description=Emergency Shell
DefaultDependencies=no
After=systemd-vconsole-setup.service
Wants=systemd-vconsole-setup.service

[Service]
Environment=HOME=/
WorkingDirectory=/
ExecStart=/bin/dracut-emergency
ExecStopPost=-/usr/bin/systemctl --no-block isolate dracut.target
Type=oneshot
StandardInput=tty-force
StandardOutput=inherit
StandardError=inherit
KillMode=process
IgnoreSIGPIPE=no

# Bash ignores SIGTERM, so we send SIGHUP instead, to ensure that bash
# terminates cleanly.
KillSignal=SIGHUP

View File

@ -1,25 +0,0 @@
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.

[Unit]
Description=Switch Root
Documentation=man:initrd-switch-root.service(8)
DefaultDependencies=no
ConditionPathExists=/etc/initrd-release
OnFailure=emergency.service
After=initrd-switch-root.target
AllowIsolate=yes

[Service]
Type=oneshot
EnvironmentFile=/etc/switch-root.conf
# we have to use "--force" here, otherwise systemd would umount /run
ExecStart=-/usr/bin/systemctl --no-block --force switch-root ${NEWROOT} ${NEWINIT}
StandardInput=null
StandardOutput=null
StandardError=null
KillMode=none

View File

@ -1,25 +0,0 @@
INITRD-SWITCH-ROOT.SERVICE(8)
=============================
:doctype: manpage
:man source: dracut
:man manual: dracut

NAME
----
initrd-switch-root.service - switches root to the real root

SYNOPSIS
--------
initrd-switch-root.service

DESCRIPTION
-----------
This service triggers systemd to switch root from the initramfs to the real root.

AUTHORS
-------
Harald Hoyer

SEE ALSO
--------
*dracut*(8)

View File

@ -1,18 +0,0 @@
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.

# See systemd.special(7) for details

[Unit]
Description=Switch Root
DefaultDependencies=no
Requires=initrd-switch-root.service
Before=initrd-switch-root.service
After=cryptsetup.target
AllowIsolate=yes
Wants=systemd-journald.service
ConditionPathExists=/etc/initrd-release

View File

@ -31,6 +31,8 @@ install() {
$systemdutildir/systemd-journald \
$systemdutildir/systemd-sysctl \
$systemdutildir/systemd-modules-load \
$systemdutildir/system-generators/systemd-fstab-generator \
$systemdsystemunitdir/cryptsetup.target \
$systemdsystemunitdir/emergency.target \
$systemdsystemunitdir/sysinit.target \
$systemdsystemunitdir/basic.target \
@ -59,7 +61,6 @@ install() {
$systemdsystemunitdir/systemd-journald.socket \
$systemdsystemunitdir/systemd-ask-password-console.service \
$systemdsystemunitdir/systemd-modules-load.service \
$systemdsystemunitdir/emergency.service \
$systemdsystemunitdir/halt.service \
$systemdsystemunitdir/systemd-halt.service \
$systemdsystemunitdir/poweroff.service \
@ -89,8 +90,12 @@ install() {
$systemdsystemunitdir/syslog.target \
$systemdsystemunitdir/initrd-switch-root.target \
$systemdsystemunitdir/initrd-switch-root.service \
$systemdsystemunitdir/initrd-cleanup.service \
$systemdsystemunitdir/initrd-udevadm-cleanup-db.service \
$systemdsystemunitdir/initrd-parse-etc.service \
\
$systemdsystemunitdir/umount.target \
journalctl systemctl echo swapoff
journalctl systemctl echo swapoff systemd-cgls

dracut_install -o \
/usr/lib/modules-load.d/*.conf
@ -120,46 +125,57 @@ install() {
ln -fs $systemdutildir/systemd "$initdir/init"
ln -fs $systemdutildir/systemd "$initdir/sbin/init"

inst_script "$moddir/dracut-emergency.sh" /bin/dracut-emergency
inst_simple "$moddir/emergency.service" ${systemdsystemunitdir}/emergency.service
inst_simple "$moddir/dracut-emergency.service" ${systemdsystemunitdir}/dracut-emergency.service
inst_simple "$moddir/rescue.service" ${systemdsystemunitdir}/rescue.service
ln -fs "basic.target" "${initdir}${systemdsystemunitdir}/default.target"
inst_simple "$moddir/emergency.service" ${systemdsystemunitdir}/rescue.service

dracutsystemunitdir="/etc/systemd/system"

mkdir -p "${initdir}${dracutsystemunitdir}/basic.target.wants"
mkdir -p "${initdir}${dracutsystemunitdir}/sysinit.target.wants"
mkdir -p "${initdir}${dracutsystemunitdir}/dracut.target.wants"

inst_simple "$moddir/initrd-switch-root.target" ${dracutsystemunitdir}/initrd-switch-root.target
inst_simple "$moddir/initrd-switch-root.service" ${dracutsystemunitdir}/initrd-switch-root.service
mkdir -p "${initdir}${systemdsystemunitdir}/sysinit.target.d"
{
echo "[Unit]"
echo "After="
echo "After=emergency.service emergency.target"
} > "${initdir}${systemdsystemunitdir}/sysinit.target.d/nolocalfs.conf"

inst_simple "$moddir/dracut.target" ${dracutsystemunitdir}/dracut.target
ln -fs ${dracutsystemunitdir}/dracut.target "${initdir}${systemdsystemunitdir}/default.target"

inst_script "$moddir/dracut-cmdline.sh" /bin/dracut-cmdline
inst_simple "$moddir/dracut-cmdline.service" ${dracutsystemunitdir}/dracut-cmdline.service
ln -fs ../dracut-cmdline.service "${initdir}${dracutsystemunitdir}/sysinit.target.wants/dracut-cmdline.service"
ln -fs ../dracut-cmdline.service "${initdir}${dracutsystemunitdir}/dracut.target.wants/dracut-cmdline.service"

inst_script "$moddir/dracut-pre-udev.sh" /bin/dracut-pre-udev
inst_simple "$moddir/dracut-pre-udev.service" ${dracutsystemunitdir}/dracut-pre-udev.service
ln -fs ../dracut-pre-udev.service "${initdir}${dracutsystemunitdir}/sysinit.target.wants/dracut-pre-udev.service"
ln -fs ../dracut-pre-udev.service "${initdir}${dracutsystemunitdir}/dracut.target.wants/dracut-pre-udev.service"

inst_script "$moddir/dracut-pre-trigger.sh" /bin/dracut-pre-trigger
inst_simple "$moddir/dracut-pre-trigger.service" ${dracutsystemunitdir}/dracut-pre-trigger.service
ln -fs ../dracut-pre-trigger.service "${initdir}${dracutsystemunitdir}/sysinit.target.wants/dracut-pre-trigger.service"
ln -fs ../dracut-pre-trigger.service "${initdir}${dracutsystemunitdir}/dracut.target.wants/dracut-pre-trigger.service"

inst_script "$moddir/dracut-initqueue.sh" /bin/dracut-initqueue
inst_simple "$moddir/dracut-initqueue.service" ${dracutsystemunitdir}/dracut-initqueue.service
ln -fs ../dracut-initqueue.service "${initdir}${dracutsystemunitdir}/basic.target.wants/dracut-initqueue.service"
ln -fs ../dracut-initqueue.service "${initdir}${dracutsystemunitdir}/dracut.target.wants/dracut-initqueue.service"

inst_script "$moddir/dracut-pre-mount.sh" /bin/dracut-pre-mount
inst_simple "$moddir/dracut-pre-mount.service" ${dracutsystemunitdir}/dracut-pre-mount.service
ln -fs ../dracut-pre-mount.service "${initdir}${dracutsystemunitdir}/dracut.target.wants/dracut-pre-mount.service"

inst_script "$moddir/dracut-mount.sh" /bin/dracut-mount
inst_simple "$moddir/dracut-mount.service" ${dracutsystemunitdir}/dracut-mount.service
ln -fs ../dracut-mount.service "${initdir}${dracutsystemunitdir}/dracut.target.wants/dracut-mount.service"

inst_script "$moddir/dracut-pre-pivot.sh" /bin/dracut-pre-pivot
inst_simple "$moddir/dracut-pre-pivot.service" ${dracutsystemunitdir}/dracut-pre-pivot.service
ln -fs ../dracut-pre-pivot.service "${initdir}${dracutsystemunitdir}/basic.target.wants/dracut-pre-pivot.service"
ln -fs ../dracut-pre-pivot.service "${initdir}${dracutsystemunitdir}/dracut.target.wants/dracut-pre-pivot.service"

inst_simple "$moddir/udevadm-cleanup-db.service" ${dracutsystemunitdir}/udevadm-cleanup-db.service
mkdir -p "${initdir}${dracutsystemunitdir}/initrd-switch-root.target.requires"
ln -fs ../udevadm-cleanup-db.service "${initdir}${dracutsystemunitdir}/initrd-switch-root.target.requires/udevadm-cleanup-db.service"
ln -fs ../initrd-parse-etc.service "${initdir}${dracutsystemunitdir}/dracut.target.wants/initrd-parse-etc.service"

inst_script "$moddir/service-to-run.sh" "${systemdutildir}/system-generators/service-to-run"
inst_rules 99-systemd.rules


for i in \
emergency.target \
dracut-emergency.service \
@ -167,9 +183,9 @@ install() {
systemd-ask-password-console.service \
systemd-ask-password-plymouth.service \
; do
mkdir -p "${initdir}${dracutsystemunitdir}/${i}.requires"
mkdir -p "${initdir}${dracutsystemunitdir}/${i}.wants"
ln_r "${systemdsystemunitdir}/systemd-vconsole-setup.service" \
"${dracutsystemunitdir}/${i}.requires/systemd-vconsole-setup.service"
"${dracutsystemunitdir}/${i}.wants/systemd-vconsole-setup.service"
done

# turn off RateLimit for journal

View File

@ -1,5 +0,0 @@
#!/bin/sh
mkdir -p /run/systemd/system/
cp -d -t /run/systemd/system/ /etc/systemd/system/* 2>/dev/null
exit 0