Handle the case where the user tries to generate the initrd after explicitly
resetting the /etc/machine-id file.
Fixes issue #2267
|| [[ -d "$dracutsysrootdir"/boot/Default ]] \
|| [[ -d "$dracutsysrootdir"/boot/efi/Default ]]; then
MACHINE_ID="Default"
- elif [[ -f "$dracutsysrootdir"/etc/machine-id ]]; then
+ elif [[ -s "$dracutsysrootdir"/etc/machine-id ]]; then
read -r MACHINE_ID < "$dracutsysrootdir"/etc/machine-id
+ [[ $MACHINE_ID == "uninitialized" ]] && MACHINE_ID="Default"
else
MACHINE_ID="Default"
fi