dispvm: get rid of obsolete symlinks to dvm.conf
Separate config file is no longer created for DispVM - the configuration is passed directly to libvirt. Fixes QubesOS/qubes-issues#1314
This commit is contained in:
		
							parent
							
								
									820e5c0e69
								
							
						
					
					
						commit
						18edf4946c
					
				@ -34,7 +34,6 @@ from qubes.notify import tray_notify, tray_notify_error, tray_notify_init
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
current_savefile = '/var/run/qubes/current-savefile'
 | 
			
		||||
current_dvm_conf = '/var/run/qubes/current-dvm.conf'
 | 
			
		||||
current_savefile_vmdir = '/var/lib/qubes/dvmdata/vmdir'
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -179,4 +178,4 @@ def main():
 | 
			
		||||
        dispvm.force_shutdown()
 | 
			
		||||
        qfile.remove_disposable_from_qdb(dispvm.name)
 | 
			
		||||
 | 
			
		||||
main()
 | 
			
		||||
main()
 | 
			
		||||
 | 
			
		||||
@ -6,10 +6,8 @@ printf "\x00\x00\x00\x00" > /var/run/qubes/dispVM.seq
 | 
			
		||||
chown root:qubes /var/run/qubes/dispVM.seq
 | 
			
		||||
chmod 660 /var/run/qubes/dispVM.seq
 | 
			
		||||
DEFAULT=/var/lib/qubes/dvmdata/default-savefile
 | 
			
		||||
DEFAULT_CONFIG=/var/lib/qubes/dvmdata/default-dvm.conf
 | 
			
		||||
# setup DispVM files only when they exists
 | 
			
		||||
if [ -r $DEFAULT ]; then
 | 
			
		||||
    ln -s $DEFAULT_CONFIG /var/run/qubes/current-dvm.conf
 | 
			
		||||
    if [ -f /var/lib/qubes/dvmdata/dont-use-shm ] ; then
 | 
			
		||||
	ln -s $DEFAULT /var/run/qubes/current-savefile
 | 
			
		||||
    else
 | 
			
		||||
 | 
			
		||||
@ -46,16 +46,12 @@ if ! /usr/lib/qubes/qubes-prepare-saved-domain.sh \
 | 
			
		||||
	exit 1
 | 
			
		||||
fi
 | 
			
		||||
DEFAULT=/var/lib/qubes/dvmdata/default-savefile
 | 
			
		||||
DEFAULTCONF=/var/lib/qubes/dvmdata/default-dvm.conf
 | 
			
		||||
CURRENT=/var/run/qubes/current-savefile
 | 
			
		||||
CURRENTCONF=/var/run/qubes/current-dvm.conf
 | 
			
		||||
SHMDIR=/dev/shm/qubes
 | 
			
		||||
SHMCOPY=$SHMDIR/current-savefile
 | 
			
		||||
rm -f $ROOT $DEFAULT $CURRENT $DEFAULTCONF $CURRENTCONF
 | 
			
		||||
rm -f $ROOT $DEFAULT $CURRENT
 | 
			
		||||
ln -s "/var/lib/qubes/appvms/$DVMTMPL/dvm-savefile" $DEFAULT
 | 
			
		||||
ln -s "/var/lib/qubes/vm-templates/$TEMPLATENAME/root.img" $ROOT
 | 
			
		||||
ln -s $DVMTMPLDIR/dvm.conf $DEFAULTCONF
 | 
			
		||||
ln -s $DVMTMPLDIR/dvm.conf $CURRENTCONF
 | 
			
		||||
if [ -f /var/lib/qubes/dvmdata/dont-use-shm ] ; then
 | 
			
		||||
	ln -s $DEFAULT $CURRENT
 | 
			
		||||
else
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user