Fixed the logic for /home and /usr/local linking/copying for AppVMs

We assume that the template's root fs already has the following symlinks:
/home -> /rw/home
/usr/local -> /rw/usrlocal
This commit is contained in:
Joanna Rutkowska 2010-10-04 19:36:54 +02:00
parent 28e1f962e5
commit 8ec8567727

View File

@ -67,18 +67,17 @@ start()
if ! [ -d /rw/home ] ; then
echo
echo "--> Virgin boot of the VM: Linking /home to /rw/home"
mv /home /home.orig
mkdir -p /rw/config
mkdir -p /rw/home
ln -s /rw/home/ /home
cp -a /home.orig/user /home
touch /rw/config/rc.local
rm -fr /home.orig
touch /var/lib/qubes/first_boot_completed
mv /usr/local /usr/local.orig
ln -s /rw/usrlocal /usr/local
cp -a /usr/local.orig /rw/usrlocal
mkdir -p /rw/config
touch /rw/config/rc.local
mkdir -p /rw/home
cp -a /home.orig/user /home
mkdir -p /rw/usrlocal
cp -a /usr/local.orig/* /usr/local
touch /var/lib/qubes/first_boot_completed
fi
fi