forked from openSUSE/dracut
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Basic systemd functionality is in 00systemd now. Switching root and the initrd.target is in 00systemd-initrd. Dracut additions to the systemd initrd are in 98dracut-systemd.
- Loading branch information
Showing
36 changed files
with
127 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/bin/bash | ||
|
||
# called by dracut | ||
check() { | ||
[[ $mount_needs ]] && return 1 | ||
|
||
if ! dracut_module_included "systemd"; then | ||
derror "dracut-systemd needs systemd in the initramfs" | ||
return 1 | ||
fi | ||
|
||
return 0 | ||
} | ||
|
||
# called by dracut | ||
depends() { | ||
echo "systemd" | ||
} | ||
|
||
installkernel() { | ||
return 0 | ||
} | ||
|
||
# called by dracut | ||
install() { | ||
local _mods | ||
|
||
inst_multiple -o \ | ||
$systemdsystemunitdir/initrd.target \ | ||
$systemdsystemunitdir/initrd-fs.target \ | ||
$systemdsystemunitdir/initrd-root-fs.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 | ||
|
||
ln_r "${systemdsystemunitdir}/initrd.target" "${systemdsystemunitdir}/default.target" | ||
} | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
#!/bin/bash | ||
|
||
# called by dracut | ||
check() { | ||
[[ $mount_needs ]] && return 1 | ||
|
||
if ! dracut_module_included "systemd-initrd"; then | ||
derror "dracut-systemd needs systemd-initrd in the initramfs" | ||
return 1 | ||
fi | ||
|
||
return 0 | ||
} | ||
|
||
# called by dracut | ||
depends() { | ||
echo "systemd-initrd" | ||
return 0 | ||
} | ||
|
||
installkernel() { | ||
return 0 | ||
} | ||
|
||
# called by dracut | ||
install() { | ||
local _mods | ||
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/emergency.service" ${systemdsystemunitdir}/rescue.service | ||
|
||
ln_r "${systemdsystemunitdir}/initrd.target" "${systemdsystemunitdir}/default.target" | ||
|
||
inst_script "$moddir/dracut-cmdline.sh" /bin/dracut-cmdline | ||
inst_script "$moddir/dracut-cmdline-ask.sh" /bin/dracut-cmdline-ask | ||
inst_script "$moddir/dracut-pre-udev.sh" /bin/dracut-pre-udev | ||
inst_script "$moddir/dracut-pre-trigger.sh" /bin/dracut-pre-trigger | ||
inst_script "$moddir/dracut-initqueue.sh" /bin/dracut-initqueue | ||
inst_script "$moddir/dracut-pre-mount.sh" /bin/dracut-pre-mount | ||
inst_script "$moddir/dracut-mount.sh" /bin/dracut-mount | ||
inst_script "$moddir/dracut-pre-pivot.sh" /bin/dracut-pre-pivot | ||
|
||
inst_script "$moddir/rootfs-generator.sh" $systemdutildir/system-generators/dracut-rootfs-generator | ||
|
||
for i in \ | ||
emergency.target \ | ||
rescue.service \ | ||
systemd-ask-password-console.service \ | ||
systemd-ask-password-plymouth.service \ | ||
; do | ||
mkdir -p "${initdir}${systemdsystemunitdir}/${i}.wants" | ||
ln_r "${systemdsystemunitdir}/systemd-vconsole-setup.service" \ | ||
"${systemdsystemunitdir}/${i}.wants/systemd-vconsole-setup.service" | ||
done | ||
|
||
mkdir -p "${initdir}/$systemdsystemunitdir/initrd.target.wants" | ||
for i in \ | ||
dracut-cmdline.service \ | ||
dracut-cmdline-ask.service \ | ||
dracut-initqueue.service \ | ||
dracut-mount.service \ | ||
dracut-pre-mount.service \ | ||
dracut-pre-pivot.service \ | ||
dracut-pre-trigger.service \ | ||
dracut-pre-udev.service \ | ||
; do | ||
inst_simple "$moddir/${i}" "$systemdsystemunitdir/${i}" | ||
ln_r "$systemdsystemunitdir/${i}" "$systemdsystemunitdir/initrd.target.wants/${i}" | ||
done | ||
|
||
inst_simple "$moddir/dracut-tmpfiles.conf" "$tmpfilesdir/dracut-tmpfiles.conf" | ||
} | ||
|
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.