#!/bin/sh if mountpoint -q /rw ; then # This means /rw is mounted now. echo "Checking /rw" >&2 if ! [ -d /rw/config ] ; then echo "Virgin boot of the VM: populating /rw/config" >&2 mkdir -p /rw/config touch /rw/config/rc.local cat > /rw/config/rc.local < /rw/config/qubes-firewall-user-script < /rw/config/suspend-module-blacklist <&2 cp -af /usr/local.orig /rw/usrlocal else echo "Virgin boot of the VM: creating /rw/usrlocal" >&2 mkdir -p /rw/usrlocal fi fi echo "Finished checking /rw" >&2 fi # Old Qubes versions had symlink /home -> /rw/home; now we use mount --bind if [ -L /home ]; then rm /home mkdir /home fi if [ ! -e /var/lib/qubes/first-boot-completed ]; then touch /var/lib/qubes/first-boot-completed fi