mirror of
https://github.com/systemd/systemd.git
synced 2026-08-08 09:01:02 +00: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
This commit is contained in:
committed by
Yu Watanabe
parent
6337be0a4e
commit
305dd91adf
@@ -160,6 +160,7 @@ if [ -z "$MACHINE_ID" ] && [ -f /etc/machine-info ]; then
|
||||
fi
|
||||
if [ -z "$MACHINE_ID" ] && [ -s /etc/machine-id ]; then
|
||||
read -r MACHINE_ID </etc/machine-id
|
||||
[ "$MACHINE_ID" = "uninitialized" ] && unset MACHINE_ID
|
||||
[ -n "$MACHINE_ID" ] && \
|
||||
log_verbose "machine-id $MACHINE_ID acquired from /etc/machine-id"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user