Bug#900366: postinst creation of /etc/machine-id breaks CustomFirstBoot unit parameter

Matthew Richardson m.richardson at ed.ac.uk
Tue May 29 15:53:59 BST 2018


Package: systemd
Version: 238-5

The postinst for the systemd deb pkg contains the following:

# Create /etc/machine-id
systemd-machine-id-setup

This generates /etc/machine-id as the package is installed.

However the systemd unit option ConditionFirstBoot uses the presence or
absence of this file to detect whether or not this is the first boot.
From 'man systemd.unit'

"ConditionFirstBoot= takes a boolean argument. This condition may be
used to conditionalize units on whether the system is booting up with an
unpopulated /etc directory (specifically: an /etc with no
/etc/machine-id). This may be used to populate /etc on the first boot
after factory reset, or when a new system instance boots up for the
first time."

Since no unit can start until after systemd is installed, and the
install always creates this file, this test will always be False which
renders this option useless.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 163 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20180529/f23ebb4d/attachment-0001.sig>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20180529/f23ebb4d/attachment-0001.ksh>


More information about the Pkg-systemd-maintainers mailing list