Openembedded Core Discussions
 help / color / mirror / Atom feed
* systemd and /etc/machine-id
@ 2017-03-05  9:40 Nicolas Dechesne
  2017-03-05 16:15 ` Patrick Ohly
  0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Dechesne @ 2017-03-05  9:40 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 1339 bytes --]

hi,

I am trying to understand why the systemd recipe creates an empty
/etc/machine-id file:

# Create machine-id

# 20:12 < mezcalero> koen: you have three options: a) run
systemd-machine-id-setup at install time, b) have / read-only and an empty
file there (for stateless) and c) boot with / writable
touch ${D}${sysconfdir}/machine-id

Having an empty machine-id file seems to prevent the "ConditionFirstBoot"
to be ever met, e.g. I have a service that tries to use it, and at first
boot i am seeing in systemctl status:

ConditionFirstBoot=yes was not met

However I also notice that /etc/machine-id is properly set during the first
boot (e.g. with a valid UID). I am not sure I understand our intent to
create an empty file. If I remove the empty file before flashing the board,
then my service which depends on ConditionFirstBoot is executed properly,
and becasue the systemd recipe also enables 'firstboot' by default (in
PACKAGECONFIG) then systemd-firstboot service is kicked as well, and ask
for hostname , TZ, .. (which isn't very convenient neither).

without understanding the entire history, I would tend to think that we
need the following changes to the systemd recipe:

1. remove the empty /etc/machine-id file
2. remove firstboot from default PACKAGECONFIG

any thoughts?

cheers
nico

[-- Attachment #2: Type: text/html, Size: 1617 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-03-05 16:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-05  9:40 systemd and /etc/machine-id Nicolas Dechesne
2017-03-05 16:15 ` Patrick Ohly

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox