Creation of /etc/machine-id
In May last year, two changes were integrated related to how /etc/machine-id is created. The first [1] moved the creation from the systemd recipe to rootfs-postcommands.bbclass. The second [2] introduced creation of it via image.bbclass and systemd-systemctl-native unless the stateless-rootfs distro feature is set.
When I look at these changes, I get the feeling that the second will never have any impact since the first will always create the /etc/machine-id file for all images (as long as systemd is enabled).
Should the creation of /etc/machine-id be removed from rootfs-postcommands.bbclass so that it is only created in image.bbclass where there is extra logic to handle the stateless case?
//Peter
[1] https://git.openembedded.org/openembedded-core/commit/?id=76444b63e614baea33c044851a5859f6d1e69729
[2] https://git.openembedded.org/openembedded-core/commit/?id=c5fb399f5894c16cf8eeadd507dc38c29b0fd657
Quoted 13 lines · Peter Kjellerstedt
In May last year, two changes were integrated related to how
/etc/machine-idis created. The first [1] moved the creation from the systemd recipe to rootfs-postcommands.bbclass. The second [2] introduced creation of it via image.bbclass and systemd-systemctl-native unless the stateless-rootfs distro feature is set.When I look at these changes, I get the feeling that the second will never have any impact since the first will always create the
/etc/machine-idfile for all images (as long as systemd is enabled).
Quoted 5 lines
Should the creation of
/etc/machine-idbe removed from rootfs-postcommands.bbclass so that it is only created in image.bbclass where there is extra logic to handle the stateless case?
Oddly enough, I was staring at that a few days ago and I think you're completely right, the one in rootfs-postcommands is redundant. I suspect I should have removed it as part of c5fb399f5894 ("systemd:
Default to non-stateless images").
Quoted 5 lines
//Peter
[1] https://git.openembedded.org/openembedded-core/commit/?id=76444b63e614baea33c044851a5859f6d1e69729
[2] https://git.openembedded.org/openembedded-core/commit/?id=c5fb399f5894c16cf8eeadd507dc38c29b0fd657
Signature · 1 line
Alex Kiernan