Skip to content

Commit 9041bbe

Browse files
committed
improve machine id cleanup for manjarog
1 parent c6af984 commit 9041bbe

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

scripts/base.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,13 @@ finalize() {
102102
echo "** Generating disk image $1-$DATE"
103103
echo '*****'
104104
rm -f "$WORK/usr/sbin/policy-rc.d"
105-
rm -f "$WORK/etc/machine-id" "$WORK/var/lib/dbus/machine-id" || true
105+
106+
# erase those files only if not symlinks
107+
for foo in /etc/machine-id /var/lib/dbus/machine-id; do
108+
if [ -f "$WORK$foo" -a ! -L "$WORK$foo" ]; then
109+
rm -f "$WORK$foo"
110+
fi
111+
done
106112
echo localhost >"$WORK/etc/hostname"
107113

108114
# generate /etc/shells-release file

0 commit comments

Comments
 (0)