startup-dvm.sh 718 B

12345678910111213141516171819202122
  1. #!/bin/sh
  2. # Setup DispVM things at Qubes system startup
  3. printf "\x00\x00\x00\x00" > /var/run/qubes/dispVM.seq
  4. chown root:qubes /var/run/qubes/dispVM.seq
  5. chmod 660 /var/run/qubes/dispVM.seq
  6. DEFAULT=/var/lib/qubes/dvmdata/default-savefile
  7. # setup DispVM files only when they exists
  8. if [ -r $DEFAULT ]; then
  9. if [ -f /var/lib/qubes/dvmdata/dont-use-shm ] ; then
  10. ln -s $DEFAULT /var/run/qubes/current-savefile
  11. else
  12. mkdir -m 770 /dev/shm/qubes
  13. chown root.qubes /dev/shm/qubes
  14. cp -a $(readlink $DEFAULT) /dev/shm/qubes/current-savefile
  15. chown root.qubes /dev/shm/qubes/current-savefile
  16. chmod 660 /dev/shm/qubes/current-savefile
  17. ln -s /dev/shm/qubes/current-savefile /var/run/qubes/current-savefile
  18. fi
  19. fi