Update to 032
[platform/upstream/dracut.git] / 51-dracut-rescue-postinst.sh
index 8b4e6c3..e290f1a 100755 (executable)
@@ -8,6 +8,11 @@ KERNEL_VERSION="$1"
 KERNEL_IMAGE="$2"
 
 [[ -f /etc/os-release ]] && . /etc/os-release
+
+if [[ ! -f /etc/machine-id ]] || [[ ! -s /etc/machine-id ]]; then
+    systemd-machine-id-setup
+fi
+
 [[ -f /etc/machine-id ]] && read MACHINE_ID < /etc/machine-id
 
 [[ $MACHINE_ID ]] || exit 1