You are not logged in.
Hi,
try to change a system to systemd centric mkinitcpio.
The unit files from mkinitcpio-systemd-tool fails, because
ConditionPathExists=/etc/xxx/initrd-release
is not met. Uncommenting helps, but what is this file for?
thx, napterk
Last edited by napterk (2017-05-16 07:23:25)
Offline
...
mkinitcpio install hook actions:look in the /etc/systemd/system
include in initrd units containing marker /etc/initrd-release
activate transitively in initrd any discovered systemd service units
auto provision into initramfs resources declared in the initrd service units...
how can I include/exclude my custom service unit in initrd?
include: change [Unit] entry to ConditionPathExists=/etc/initrd-release
exclude: change [Unit] entry to ConditionPathExists=/etc/xxx/initrd-release
It's just a specific "file switch" of the package. So you just create either (or maybe both) depends on your need.
The unit files from mkinitcpio-systemd-tool fails, because
How come? I can see only one unit included that condition, which is the initrd-emergency.service. Apparently it overrides some default action so I guess if you want this "variant", you just get rid of the xxx/ then it will be included in the initramfs? Or maybe it's a typo, I don't know. Never heard of this thing before.
Offline
The thing is, it also happens with the unit files of initrd-network.service or initrd-dropbear.service, which
only works with
#ConditionPathExists=/etc/initrd-release
Sorry for not pointing that out in the first place. I read the README but couldn't figure, how to include the service files.
Offline
1. If you only want those with /etc/initrd-release:
sudo rm /etc/xxx/initrd-release
sudo touch /etc/initrd-release
2. If you only want those with /etc/xxx/initrd-release:
sudo rm /etc/initrd-release
sudo touch /etc/xxx/initrd-release
3. If you want everything:
sudo touch /etc/initrd-release
sudo touch /etc/xxx/initrd-release
But that is how you make the condition(s) met. Apparently the mkinitcpio in that package will only include units with ConditionPathExists=/etc/initrd-release. So if you want to include something that is with ConditionPathExists=/etc/xxx/initrd-release, you change it to ConditionPathExists=/etc/initrd-release, as told in the readme. (That might mean you should never have /etc/xxx/initrd-release but only /etc/initrd-release (i.e. option 1), but I don't know, this thing seems awful to me.)
Last edited by tom.ty89 (2017-05-15 15:48:56)
Offline
Thank you for the clarification. I'll mark it as solved, even though I didn't fully get the concept here. But this is probably due to my superficial understanding of initrd and systemd.
Offline