fix(sys-apps/dbus) machine-id fixes

Properly create the /var/lib/dbus/machine-id symlink.
Create a "known" machine id as part of the build process, this will be
overwritten by the boot sequence with a "unique" one when booting for
the first time.
This commit is contained in:
Greg Kroah-Hartman 2014-03-14 01:20:08 +00:00
parent 0b9d2ebf58
commit 78406a53ee
2 changed files with 4 additions and 5 deletions

View File

@ -188,9 +188,8 @@ pkg_postinst() {
ewarn "Don't do this while X is running because it will restart your X as well." ewarn "Don't do this while X is running because it will restart your X as well."
fi fi
# Ensure unique id is generated and put it in /etc wrt #370451 but symlink # Put a "known" machine id into /etc/machine-id so that when we boot,
# for DBUS_MACHINE_UUID_FILE (see tools/dbus-launch.c) and reverse # if it matches, then we can override it with a unique one.
# dependencies with hardcoded paths (although the known ones got fixed already) echo "42000000000000000000000000000042" > "${EROOT}"/etc/machine-id
dbus-uuidgen --ensure="${EROOT}"/etc/machine-id ln -sf ../../../etc/machine-id "${EROOT}"/var/lib/dbus/machine-id
ln -sf "${EROOT}"/etc/machine-id "${EROOT}"/var/lib/dbus/machine-id
} }