Clean appmenus on template remove (#225)
This commit is contained in:
parent
ccecb27b5b
commit
e7190d0239
@ -1,6 +1,10 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
VMNAME=$1
|
VMNAME=$1
|
||||||
VMDIR=/var/lib/qubes/appvms/$VMNAME
|
VMTYPE=$2
|
||||||
|
if [ -z "$VMTYPE" ]; then
|
||||||
|
VMTYPE=appvms
|
||||||
|
fi
|
||||||
|
VMDIR=/var/lib/qubes/$VMTYPE/$VMNAME
|
||||||
APPSDIR=$VMDIR/apps
|
APPSDIR=$VMDIR/apps
|
||||||
|
|
||||||
if [ $# != 1 ]; then
|
if [ $# != 1 ]; then
|
||||||
|
@ -1174,6 +1174,13 @@ class QubesTemplateVm(QubesVm):
|
|||||||
except subprocess.CalledProcessError:
|
except subprocess.CalledProcessError:
|
||||||
print "Ooops, there was a problem creating appmenus for {0} VM!".format (self.name)
|
print "Ooops, there was a problem creating appmenus for {0} VM!".format (self.name)
|
||||||
|
|
||||||
|
def remove_from_disk(self):
|
||||||
|
if dry_run:
|
||||||
|
return
|
||||||
|
|
||||||
|
subprocess.check_call ([qubes_appmenu_remove_cmd, self.name, "vm-templates"])
|
||||||
|
super(QubesTemplateVm, self).remove_from_disk()
|
||||||
|
|
||||||
def verify_files(self):
|
def verify_files(self):
|
||||||
if dry_run:
|
if dry_run:
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user