mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-05 09:17:44 +03:00
Handle MACHINE_ID=uninitialized
systemd supports /etc/machine-id to be set to: uninitialized In this case the expectation is that systemd creates a new machine ID and replaces the value 'uninitialized' with the effective machine id. In the scope of kernel-install we should also enforce the creation of a new machine id in this condition (cherry picked from commit305dd91adf
) (cherry picked from commit132f0ec7de
) Backported for https://bugzilla.redhat.com/show_bug.cgi?id=2148464.
This commit is contained in:
parent
7f18d82308
commit
fa71bb7bce
@ -140,6 +140,7 @@ if [ -z "$MACHINE_ID" ] && [ -r /etc/machine-info ] && . /etc/machine-info && MA
|
||||
echo "machine-id $MACHINE_ID acquired from /etc/machine-info"
|
||||
fi
|
||||
if [ -z "$MACHINE_ID" ] && [ -s /etc/machine-id ] && read -r MACHINE_ID </etc/machine-id; then
|
||||
[ "$MACHINE_ID" = "uninitialized" ] && unset MACHINE_ID
|
||||
[ -n "$MACHINE_ID" ] && [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && \
|
||||
echo "machine-id $MACHINE_ID acquired from /etc/machine-id"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user