|
|
|
@ -4,7 +4,10 @@
@@ -4,7 +4,10 @@
|
|
|
|
|
|
|
|
|
|
check() { |
|
|
|
|
[[ $mount_needs ]] && return 1 |
|
|
|
|
[ -x /lib/systemd/systemd ] && return 255 |
|
|
|
|
if [[ -x /lib/systemd/systemd ]] || [[ -x /usr/lib/systemd/systemd ]]; then |
|
|
|
|
return 255 |
|
|
|
|
fi |
|
|
|
|
pkg-config systemd --variable=systemdutildir >/dev/null && return 255 |
|
|
|
|
return 1 |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -13,141 +16,147 @@ depends() {
@@ -13,141 +16,147 @@ depends() {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
install() { |
|
|
|
|
local systemdutildir systemdsystemunitdir |
|
|
|
|
|
|
|
|
|
for i in \ |
|
|
|
|
systemd \ |
|
|
|
|
systemd-cgroups-agent \ |
|
|
|
|
systemd-initctl \ |
|
|
|
|
systemd-shutdownd \ |
|
|
|
|
systemd-shutdown \ |
|
|
|
|
systemd-modules-load \ |
|
|
|
|
systemd-remount-fs \ |
|
|
|
|
systemd-reply-password \ |
|
|
|
|
systemd-fsck \ |
|
|
|
|
systemd-timestamp \ |
|
|
|
|
systemd-ac-power \ |
|
|
|
|
systemd-sysctl \ |
|
|
|
|
systemd-udevd \ |
|
|
|
|
systemd-journald \ |
|
|
|
|
systemd-coredump \ |
|
|
|
|
systemd-vconsole-setup \ |
|
|
|
|
systemd-cryptsetup \ |
|
|
|
|
systemd-localed \ |
|
|
|
|
system/emergency.target \ |
|
|
|
|
system/sysinit.target \ |
|
|
|
|
system/basic.target \ |
|
|
|
|
system/halt.target \ |
|
|
|
|
system/kexec.target \ |
|
|
|
|
system/local-fs.target \ |
|
|
|
|
system/local-fs-pre.target \ |
|
|
|
|
system/remote-fs.target \ |
|
|
|
|
system/remote-fs-pre.target \ |
|
|
|
|
system/network.target \ |
|
|
|
|
system/nss-lookup.target \ |
|
|
|
|
system/nss-user-lookup.target \ |
|
|
|
|
system/poweroff.target \ |
|
|
|
|
system/reboot.target \ |
|
|
|
|
system/rescue.target \ |
|
|
|
|
system/rpcbind.target \ |
|
|
|
|
system/shutdown.target \ |
|
|
|
|
system/final.target \ |
|
|
|
|
system/sigpwr.target \ |
|
|
|
|
system/sockets.target \ |
|
|
|
|
system/swap.target \ |
|
|
|
|
system/systemd-initctl.socket \ |
|
|
|
|
system/systemd-shutdownd.socket \ |
|
|
|
|
system/bluetooth.target \ |
|
|
|
|
system/systemd-ask-password-console.path \ |
|
|
|
|
system/systemd-udev-control.socket \ |
|
|
|
|
system/systemd-udev-kernel.socket \ |
|
|
|
|
system/systemd-ask-password-plymouth.path \ |
|
|
|
|
system/systemd-journald.socket \ |
|
|
|
|
system/cryptsetup.target \ |
|
|
|
|
system/console-shell.service \ |
|
|
|
|
system/console-getty.service \ |
|
|
|
|
system/systemd-initctl.service \ |
|
|
|
|
system/systemd-shutdownd.service \ |
|
|
|
|
system/systemd-modules-load.service \ |
|
|
|
|
system/systemd-remount-fs.service \ |
|
|
|
|
system/systemd-ask-password-console.service \ |
|
|
|
|
system/halt.service \ |
|
|
|
|
system/poweroff.service \ |
|
|
|
|
system/reboot.service \ |
|
|
|
|
system/kexec.service \ |
|
|
|
|
system/fsck@.service \ |
|
|
|
|
system/systemd-udev.service \ |
|
|
|
|
system/systemd-udev-trigger.service \ |
|
|
|
|
system/systemd-udev-settle.service \ |
|
|
|
|
system/systemd-ask-password-plymouth.service \ |
|
|
|
|
system/systemd-journald.service \ |
|
|
|
|
system/systemd-vconsole-setup.service \ |
|
|
|
|
system/systemd-localed.service \ |
|
|
|
|
system/sysinit.target.wants/systemd-modules-load.service \ |
|
|
|
|
system/sysinit.target.wants/systemd-ask-password-console.path \ |
|
|
|
|
system/sysinit.target.wants/systemd-journald.service \ |
|
|
|
|
system/sysinit.target.wants/systemd-vconsole-setup.service \ |
|
|
|
|
system/sysinit.target.wants/cryptsetup.target \ |
|
|
|
|
system/sockets.target.wants/systemd-initctl.socket \ |
|
|
|
|
system/sockets.target.wants/systemd-shutdownd.socket \ |
|
|
|
|
system/sockets.target.wants/systemd-udev-control.socket \ |
|
|
|
|
system/sockets.target.wants/systemd-udev-kernel.socket \ |
|
|
|
|
system/sockets.target.wants/systemd-journald.socket \ |
|
|
|
|
system/basic.target.wants/systemd-udev.service \ |
|
|
|
|
system/basic.target.wants/systemd-udev-trigger.service \ |
|
|
|
|
system/local-fs.target.wants/systemd-remount-fs.service \ |
|
|
|
|
system/local-fs.target.wants/fsck-root.service \ |
|
|
|
|
system/local-fs.target.wants/tmp.mount \ |
|
|
|
|
system/ctrl-alt-del.target \ |
|
|
|
|
system/autovt@.service \ |
|
|
|
|
system/single.service \ |
|
|
|
|
system/syslog.socket \ |
|
|
|
|
system/syslog.target \ |
|
|
|
|
system/initrd-switch-root.target \ |
|
|
|
|
system/initrd-switch-root.service \ |
|
|
|
|
system/umount.target \ |
|
|
|
|
;do |
|
|
|
|
[ -e "/lib/systemd/$i" ] && dracut_install "/lib/systemd/$i" |
|
|
|
|
done |
|
|
|
|
for i in /etc/systemd/*.conf; do |
|
|
|
|
systemdutildir=$(pkg-config systemd --variable=systemdutildir) |
|
|
|
|
systemdsystemunitdir=$(pkg-config systemd --variable=systemdsystemunitdir) |
|
|
|
|
|
|
|
|
|
if ! [[ -d "$systemdutildir" ]]; then |
|
|
|
|
[[ -d /lib/systemd ]] && systemdutildir=/lib/systemd |
|
|
|
|
[[ -d /usr/lib/systemd ]] && systemdutildir=/usr/lib/systemd |
|
|
|
|
fi |
|
|
|
|
[[ -d "$systemdsystemunitdir" ]] || systemdsystemunitdir=${systemdutildir}/system |
|
|
|
|
|
|
|
|
|
dracut_install -o "$i" \ |
|
|
|
|
$systemdutildir/systemd \ |
|
|
|
|
$systemdutildir/systemd-cgroups-agent \ |
|
|
|
|
$systemdutildir/systemd-initctl \ |
|
|
|
|
$systemdutildir/systemd-shutdownd \ |
|
|
|
|
$systemdutildir/systemd-shutdown \ |
|
|
|
|
$systemdutildir/systemd-modules-load \ |
|
|
|
|
$systemdutildir/systemd-remount-fs \ |
|
|
|
|
$systemdutildir/systemd-reply-password \ |
|
|
|
|
$systemdutildir/systemd-fsck \ |
|
|
|
|
$systemdutildir/systemd-timestamp \ |
|
|
|
|
$systemdutildir/systemd-ac-power \ |
|
|
|
|
$systemdutildir/systemd-sysctl \ |
|
|
|
|
$systemdutildir/systemd-udevd \ |
|
|
|
|
$systemdutildir/systemd-journald \ |
|
|
|
|
$systemdutildir/systemd-coredump \ |
|
|
|
|
$systemdutildir/systemd-vconsole-setup \ |
|
|
|
|
$systemdutildir/systemd-cryptsetup \ |
|
|
|
|
$systemdutildir/systemd-localed \ |
|
|
|
|
$systemdsystemunitdir/emergency.target \ |
|
|
|
|
$systemdsystemunitdir/sysinit.target \ |
|
|
|
|
$systemdsystemunitdir/basic.target \ |
|
|
|
|
$systemdsystemunitdir/halt.target \ |
|
|
|
|
$systemdsystemunitdir/kexec.target \ |
|
|
|
|
$systemdsystemunitdir/local-fs.target \ |
|
|
|
|
$systemdsystemunitdir/local-fs-pre.target \ |
|
|
|
|
$systemdsystemunitdir/remote-fs.target \ |
|
|
|
|
$systemdsystemunitdir/remote-fs-pre.target \ |
|
|
|
|
$systemdsystemunitdir/network.target \ |
|
|
|
|
$systemdsystemunitdir/nss-lookup.target \ |
|
|
|
|
$systemdsystemunitdir/nss-user-lookup.target \ |
|
|
|
|
$systemdsystemunitdir/poweroff.target \ |
|
|
|
|
$systemdsystemunitdir/reboot.target \ |
|
|
|
|
$systemdsystemunitdir/rescue.target \ |
|
|
|
|
$systemdsystemunitdir/rpcbind.target \ |
|
|
|
|
$systemdsystemunitdir/shutdown.target \ |
|
|
|
|
$systemdsystemunitdir/final.target \ |
|
|
|
|
$systemdsystemunitdir/sigpwr.target \ |
|
|
|
|
$systemdsystemunitdir/sockets.target \ |
|
|
|
|
$systemdsystemunitdir/swap.target \ |
|
|
|
|
$systemdsystemunitdir/systemd-initctl.socket \ |
|
|
|
|
$systemdsystemunitdir/systemd-shutdownd.socket \ |
|
|
|
|
$systemdsystemunitdir/bluetooth.target \ |
|
|
|
|
$systemdsystemunitdir/systemd-ask-password-console.path \ |
|
|
|
|
$systemdsystemunitdir/systemd-udev-control.socket \ |
|
|
|
|
$systemdsystemunitdir/systemd-udev-kernel.socket \ |
|
|
|
|
$systemdsystemunitdir/systemd-ask-password-plymouth.path \ |
|
|
|
|
$systemdsystemunitdir/systemd-journald.socket \ |
|
|
|
|
$systemdsystemunitdir/cryptsetup.target \ |
|
|
|
|
$systemdsystemunitdir/console-shell.service \ |
|
|
|
|
$systemdsystemunitdir/console-getty.service \ |
|
|
|
|
$systemdsystemunitdir/systemd-initctl.service \ |
|
|
|
|
$systemdsystemunitdir/systemd-shutdownd.service \ |
|
|
|
|
$systemdsystemunitdir/systemd-modules-load.service \ |
|
|
|
|
$systemdsystemunitdir/systemd-remount-fs.service \ |
|
|
|
|
$systemdsystemunitdir/systemd-ask-password-console.service \ |
|
|
|
|
$systemdsystemunitdir/halt.service \ |
|
|
|
|
$systemdsystemunitdir/poweroff.service \ |
|
|
|
|
$systemdsystemunitdir/reboot.service \ |
|
|
|
|
$systemdsystemunitdir/kexec.service \ |
|
|
|
|
$systemdsystemunitdir/fsck@.service \ |
|
|
|
|
$systemdsystemunitdir/systemd-udev.service \ |
|
|
|
|
$systemdsystemunitdir/systemd-udev-trigger.service \ |
|
|
|
|
$systemdsystemunitdir/systemd-udev-settle.service \ |
|
|
|
|
$systemdsystemunitdir/systemd-ask-password-plymouth.service \ |
|
|
|
|
$systemdsystemunitdir/systemd-journald.service \ |
|
|
|
|
$systemdsystemunitdir/systemd-vconsole-setup.service \ |
|
|
|
|
$systemdsystemunitdir/systemd-localed.service \ |
|
|
|
|
$systemdsystemunitdir/sysinit.target.wants/systemd-modules-load.service \ |
|
|
|
|
$systemdsystemunitdir/sysinit.target.wants/systemd-ask-password-console.path \ |
|
|
|
|
$systemdsystemunitdir/sysinit.target.wants/systemd-journald.service \ |
|
|
|
|
$systemdsystemunitdir/sysinit.target.wants/systemd-vconsole-setup.service \ |
|
|
|
|
$systemdsystemunitdir/sysinit.target.wants/cryptsetup.target \ |
|
|
|
|
$systemdsystemunitdir/sockets.target.wants/systemd-initctl.socket \ |
|
|
|
|
$systemdsystemunitdir/sockets.target.wants/systemd-shutdownd.socket \ |
|
|
|
|
$systemdsystemunitdir/sockets.target.wants/systemd-udev-control.socket \ |
|
|
|
|
$systemdsystemunitdir/sockets.target.wants/systemd-udev-kernel.socket \ |
|
|
|
|
$systemdsystemunitdir/sockets.target.wants/systemd-journald.socket \ |
|
|
|
|
$systemdsystemunitdir/basic.target.wants/systemd-udev.service \ |
|
|
|
|
$systemdsystemunitdir/basic.target.wants/systemd-udev-trigger.service \ |
|
|
|
|
$systemdsystemunitdir/local-fs.target.wants/systemd-remount-fs.service \ |
|
|
|
|
$systemdsystemunitdir/local-fs.target.wants/fsck-root.service \ |
|
|
|
|
$systemdsystemunitdir/local-fs.target.wants/tmp.mount \ |
|
|
|
|
$systemdsystemunitdir/ctrl-alt-del.target \ |
|
|
|
|
$systemdsystemunitdir/autovt@.service \ |
|
|
|
|
$systemdsystemunitdir/single.service \ |
|
|
|
|
$systemdsystemunitdir/syslog.socket \ |
|
|
|
|
$systemdsystemunitdir/syslog.target \ |
|
|
|
|
$systemdsystemunitdir/initrd-switch-root.target \ |
|
|
|
|
$systemdsystemunitdir/initrd-switch-root.service \ |
|
|
|
|
$systemdsystemunitdir/umount.target \ |
|
|
|
|
|
|
|
|
|
for i in /etc/systemd/*.conf; do |
|
|
|
|
dracut_install "$i" |
|
|
|
|
done |
|
|
|
|
|
|
|
|
|
dracut_install journalctl systemctl |
|
|
|
|
|
|
|
|
|
ln -fs /lib/systemd/systemd "$initdir/init" |
|
|
|
|
ln -fs $systemdutildir/systemd "$initdir/init" |
|
|
|
|
|
|
|
|
|
rm -f "${initdir}${systemdsystemunitdir}/emergency.service" |
|
|
|
|
inst "$moddir/emergency.service" ${systemdsystemunitdir}/emergency.service |
|
|
|
|
|
|
|
|
|
# { |
|
|
|
|
# echo "LogLevel=debug" |
|
|
|
|
# echo "LogTarget=console" |
|
|
|
|
# } >> "$initdir/etc/systemd/system.conf" |
|
|
|
|
rm -f "${initdir}${systemdsystemunitdir}/rescue.service" |
|
|
|
|
inst "$moddir/rescue.service" ${systemdsystemunitdir}/rescue.service |
|
|
|
|
|
|
|
|
|
rm -f "$initdir/lib/systemd/system/emergency.service" |
|
|
|
|
inst "$moddir/emergency.service" /lib/systemd/system/emergency.service |
|
|
|
|
rm -f "$initdir/lib/systemd/system/rescue.service" |
|
|
|
|
inst "$moddir/rescue.service" /lib/systemd/system/rescue.service |
|
|
|
|
inst "$moddir/initrd-switch-root.target" /lib/systemd/system/initrd-switch-root.target |
|
|
|
|
inst "$moddir/initrd-switch-root.service" /lib/systemd/system/initrd-switch-root.service |
|
|
|
|
ln -s basic.target "$initdir/lib/systemd/system/default.target" |
|
|
|
|
inst "$moddir/initrd-switch-root.target" ${systemdsystemunitdir}/initrd-switch-root.target |
|
|
|
|
inst "$moddir/initrd-switch-root.service" ${systemdsystemunitdir}/initrd-switch-root.service |
|
|
|
|
ln -s basic.target "${initdir}${systemdsystemunitdir}/default.target" |
|
|
|
|
|
|
|
|
|
inst "$moddir/dracut-cmdline.sh" /lib/systemd/system-generators/dracut-cmdline.sh |
|
|
|
|
inst "$moddir/dracut-cmdline.sh" ${systemdsystemunitdir}-generators/dracut-cmdline.sh |
|
|
|
|
|
|
|
|
|
mkdir -p "$initdir/lib/systemd/system/basic.target.wants" |
|
|
|
|
mkdir -p "${initdir}${systemdsystemunitdir}/basic.target.wants" |
|
|
|
|
inst "$moddir/dracut-pre-udev.sh" /bin/dracut-pre-udev |
|
|
|
|
inst "$moddir/dracut-pre-udev.service" /lib/systemd/system/dracut-pre-udev.service |
|
|
|
|
ln -s ../dracut-pre-udev.service "$initdir/lib/systemd/system/basic.target.wants/dracut-pre-udev.service" |
|
|
|
|
inst "$moddir/dracut-pre-udev.service" ${systemdsystemunitdir}/dracut-pre-udev.service |
|
|
|
|
ln -s ../dracut-pre-udev.service "${initdir}${systemdsystemunitdir}/basic.target.wants/dracut-pre-udev.service" |
|
|
|
|
|
|
|
|
|
inst "$moddir/dracut-pre-trigger.sh" /bin/dracut-pre-trigger |
|
|
|
|
inst "$moddir/dracut-pre-trigger.service" /lib/systemd/system/dracut-pre-trigger.service |
|
|
|
|
ln -s ../dracut-pre-trigger.service "$initdir/lib/systemd/system/basic.target.wants/dracut-pre-trigger.service" |
|
|
|
|
inst "$moddir/dracut-pre-trigger.service" ${systemdsystemunitdir}/dracut-pre-trigger.service |
|
|
|
|
ln -s ../dracut-pre-trigger.service "${initdir}${systemdsystemunitdir}/basic.target.wants/dracut-pre-trigger.service" |
|
|
|
|
|
|
|
|
|
inst "$moddir/dracut-initqueue.sh" /bin/dracut-initqueue |
|
|
|
|
inst "$moddir/dracut-initqueue.service" /lib/systemd/system/dracut-initqueue.service |
|
|
|
|
ln -s ../dracut-initqueue.service "$initdir/lib/systemd/system/basic.target.wants/dracut-initqueue.service" |
|
|
|
|
inst "$moddir/dracut-initqueue.service" ${systemdsystemunitdir}/dracut-initqueue.service |
|
|
|
|
ln -s ../dracut-initqueue.service "${initdir}${systemdsystemunitdir}/basic.target.wants/dracut-initqueue.service" |
|
|
|
|
|
|
|
|
|
inst "$moddir/dracut-pre-pivot.sh" /bin/dracut-pre-pivot |
|
|
|
|
inst "$moddir/dracut-pre-pivot.service" /lib/systemd/system/dracut-pre-pivot.service |
|
|
|
|
mkdir -p "$initdir/lib/systemd/system/initrd-switch-root.target.wants" |
|
|
|
|
ln -s ../dracut-pre-pivot.service "$initdir/lib/systemd/system/initrd-switch-root.target.wants/dracut-pre-pivot.service" |
|
|
|
|
inst "$moddir/dracut-pre-pivot.service" ${systemdsystemunitdir}/dracut-pre-pivot.service |
|
|
|
|
mkdir -p "${initdir}${systemdsystemunitdir}/initrd-switch-root.target.wants" |
|
|
|
|
ln -s ../dracut-pre-pivot.service "${initdir}${systemdsystemunitdir}/initrd-switch-root.target.wants/dracut-pre-pivot.service" |
|
|
|
|
|
|
|
|
|
> "$initdir/etc/machine-id" |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|