From e50aaa36cf23ca0b9bb013b88a0b1cfd05a0e10a Mon Sep 17 00:00:00 2001 From: Joanna Rutkowska Date: Fri, 18 Jun 2010 16:21:04 +0200 Subject: [PATCH] appvm: create /rw/home on virgin boot --- appvm/qubes_core | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/appvm/qubes_core b/appvm/qubes_core index cbfe8d0..f432963 100755 --- a/appvm/qubes_core +++ b/appvm/qubes_core @@ -28,6 +28,20 @@ start() echo "nameserver $gateway" > /etc/resolv.conf echo "nameserver $secondary_dns" >> /etc/resolv.conf fi + + 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 + fi + if ! [ -L /home ] ; then mv /home /home.orig ln -s /rw/home /home