tests - allow for uninitialized machine-id
@@ -22,9 +22,18 @@ fi
echo "checking the machine-id"
-if [[ -f ${rootfsDir}/etc/machine-id && ! -s ${rootfsDir}/etc/machine-id ]]; then
- echo "OK - machine-id is as expected"
+if [[ -f ${rootfsDir}/etc/machine-id ]]; then
+ if [[ ! -s ${rootfsDir}/etc/machine-id ]]; then
+ echo "OK - machine-id is as expected (blank)"
rc=0
+ elif [[ $(cat ${rootfsDir}/etc/machine-id) == "uninitialized" ]]; then
+ echo "OK - machine-id is as expected (uninitialized)"
+ rc=0
+ else
+ echo "FAIL - machine-id is not blank or \"uninitialized\""
+ rc=1
+ fi
+
else
echo "FAIL - machine-id doesn't exist or is not empty!"
rc=1
