Skip to content

Commit d4bd07f

Browse files
committed
fix: issue with lxc not saving machine-id
1 parent 1488fce commit d4bd07f

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎system/cuos/init.sh‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,11 @@ check_schema_system_json() {
117117
}
118118

119119
prepare_data_volume() {
120-
systemd-machine-id-setup
120+
if mount | grep -q "/data/machine-id"; then
121+
umount /data/machine-id
122+
rm -f /data/machine-id
123+
systemd-machine-id-setup --commit
124+
fi
121125
mkdir -p /data/{docker,containerd,dhcp,log,shieldor,.docker}
122126
mkdir -p /data/log/journal
123127
chattr -R +C /data/log/journal

0 commit comments

Comments
 (0)