machine-id: other way around

This commit is contained in:
Philip 2015-01-10 19:48:12 +01:00
parent f24a0163d3
commit 6bf1736f89

View file

@ -18,13 +18,13 @@ configure_machine_id(){
# set unique machine-id
msg2 "Setting machine-id ..."
if [[ -z "$(echo $1 | grep root-image)" ]];then
chroot $1 dbus-uuidgen --ensure=/etc/machine-id
chroot $1 ln -s /etc/machine-id /var/lib/dbus/machine-id
else
mkdir -p $1/etc
mkdir -p $1/var/lib/dbus
dbus-uuidgen --ensure=$1/etc/machine-id
ln -s /etc/machine-id $1/var/lib/dbus/machine-id
else
chroot $1 dbus-uuidgen --ensure=/etc/machine-id
chroot $1 ln -s /etc/machine-id /var/lib/dbus/machine-id
fi
}