Merge branch 'master' of git://git.qubes-os.org/marmarek/core

This commit is contained in:
Joanna Rutkowska 2012-11-16 19:15:02 +01:00
commit 8551a9769c
5 changed files with 27 additions and 8 deletions

View File

@ -8,6 +8,7 @@
# #
/dev/mapper/dmroot / ext4 defaults,noatime 1 1 /dev/mapper/dmroot / ext4 defaults,noatime 1 1
/dev/xvdb /rw ext4 noauto,defaults 1 2 /dev/xvdb /rw ext4 noauto,defaults 1 2
/rw/home /home none noauto,bind,defaults 0 0
/dev/xvdc1 swap swap defaults 0 0 /dev/xvdc1 swap swap defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0 tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0 devpts /dev/pts devpts gid=5,mode=620 0 0

View File

@ -65,14 +65,19 @@ start()
touch /rw/config/rc.local touch /rw/config/rc.local
mkdir -p /rw/home mkdir -p /rw/home
cp -a /home.orig/user /home cp -a /home.orig/user /rw/home
mkdir -p /rw/usrlocal mkdir -p /rw/usrlocal
cp -a /usr/local.orig/* /usr/local cp -a /usr/local.orig/* /rw/usrlocal
touch /var/lib/qubes/first_boot_completed touch /var/lib/qubes/first_boot_completed
fi fi
fi fi
if [ -L /home ]; then
rm /home
mkdir /home
fi
mount /home
/usr/lib/qubes/qrexec_agent 2>/var/log/qubes/qrexec_agent.log & /usr/lib/qubes/qrexec_agent 2>/var/log/qubes/qrexec_agent.log &

View File

@ -45,7 +45,11 @@ start()
echo -n $"Executing Qubes Core scripts for AppVM:" echo -n $"Executing Qubes Core scripts for AppVM:"
if xenstore-read qubes_save_request 2>/dev/null ; then if xenstore-read qubes_save_request 2>/dev/null ; then
ln -sf /home_volatile /home if [ -L /home ]; then
rm /home
mkdir /home
fi
mount --bind /home_volatile /home
touch /etc/this_is_dvm touch /etc/this_is_dvm
mount /rw mount /rw
possibly_run_save_script possibly_run_save_script

View File

@ -24,18 +24,23 @@ if [ -e /dev/xvdb -a ! -e /etc/this_is_dvm ] ; then
touch /rw/config/rc.local-early touch /rw/config/rc.local-early
mkdir -p /rw/home mkdir -p /rw/home
cp -a /home.orig/user /home cp -a /home.orig/user /rw/home
mkdir -p /rw/usrlocal mkdir -p /rw/usrlocal
cp -a /usr/local.orig/* /usr/local cp -a /usr/local.orig/* /rw/usrlocal
touch /var/lib/qubes/first_boot_completed touch /var/lib/qubes/first_boot_completed
fi fi
# Chown home if user UID have changed - can be the case on template switch # Chown home if user UID have changed - can be the case on template switch
HOME_USER_UID=`ls -dn /home/user | awk '{print $3}'` HOME_USER_UID=`ls -dn /rw/home/user | awk '{print $3}'`
if [ "`id -u user`" -ne "$HOME_USER_UID" ]; then if [ "`id -u user`" -ne "$HOME_USER_UID" ]; then
find /home/user -uid "$HOME_USER_UID" -print0 | xargs -0 chown user:user find /rw/home/user -uid "$HOME_USER_UID" -print0 | xargs -0 chown user:user
fi fi
if [ -L /home ]; then
rm /home
mkdir /home
fi
mount /home
fi fi
[ -x /rw/config/rc.local ] && /rw/config/rc.local [ -x /rw/config/rc.local ] && /rw/config/rc.local

View File

@ -13,7 +13,11 @@ possibly_run_save_script()
} }
if xenstore-read qubes_save_request 2>/dev/null ; then if xenstore-read qubes_save_request 2>/dev/null ; then
ln -sf /home_volatile /home if [ -L /home ]; then
rm /home
mkdir /home
fi
mount --bind /home_volatile /home
touch /etc/this_is_dvm touch /etc/this_is_dvm
mount /rw mount /rw
possibly_run_save_script possibly_run_save_script