]> git.ipfire.org Git - thirdparty/systemd.git/commit
pid1: use initrd.target in the initramfs by default
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 28 Nov 2019 08:48:26 +0000 (09:48 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 28 Nov 2019 18:59:33 +0000 (19:59 +0100)
commit8755dbad5b2a72f084c48ae27a91b90d0b215eb3
treefbae37d60cc9052cb298a66d445db3b078266993
parent6e86b24db3c5490b5c05b1ca5e440a2deec25481
pid1: use initrd.target in the initramfs by default

This makes the code do what the documentation says. The code had no inkling
about initrd.target, so I think this change is fairly risky. As a fallback,
default.target will be loaded, so initramfses which relied on current behaviour
will still work, as along as they don't have a different initrd.target.

In an initramfs created with recent dracut:
$ ls -l usr/lib/systemd/system/{default.target,initrd.target}
lrwxrwxrwx. usr/lib/systemd/system/default.target -> initrd.target
-rw-r--r--. usr/lib/systemd/system/initrd.target
So at least for dracut, there should be no difference.

Also avoid a pointless allocation.
src/basic/special.h
src/core/main.c