Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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
  • Loading branch information
schaefi authored and yuwata committed Nov 16, 2022
1 parent 6337be0 commit 305dd91
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/kernel-install/kernel-install.in
Expand Up @@ -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
Expand Down

0 comments on commit 305dd91

Please sign in to comment.