vmsync: overlay /etc only if it exists

This is the same as ddc0f40 but for `vmsync`.

Closes: #907
Approved by: cgwalters
This commit is contained in:
Jonathan Lebon 2017-08-03 06:41:18 -07:00 committed by Atomic Bot
parent 95d3f36fc4
commit 0c9f77ca78

View File

@ -45,9 +45,14 @@ else
# then do this in the VM # then do this in the VM
set -x set -x
ostree admin unlock || : ostree admin unlock || :
# only copy /usr and /etc
rsync -rlv /var/roothome/sync/insttree/usr/ /usr/ # Now, overlay our built binaries & config files
rsync -rlv /var/roothome/sync/insttree/etc/ /etc/ INSTTREE=/var/roothome/sync/insttree
rsync -rlv $INSTTREE/usr/ /usr/
if [ -d $INSTTREE/etc ]; then # on CentOS, the dbus service file is in /usr
rsync -rlv $INSTTREE/etc/ /etc/
fi
restorecon -v /usr/bin/rpm-ostree restorecon -v /usr/bin/rpm-ostree
restorecon -v /usr/libexec/rpm-ostreed restorecon -v /usr/libexec/rpm-ostreed
mkdir -p /etc/systemd/system/rpm-ostreed.service.d mkdir -p /etc/systemd/system/rpm-ostreed.service.d