Clean appmenus on template remove (#225)

This commit is contained in:
Marek Marczykowski 2011-04-19 17:55:06 +02:00
parent ccecb27b5b
commit e7190d0239
2 changed files with 12 additions and 1 deletions

View File

@ -1,6 +1,10 @@
#!/bin/sh
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
if [ $# != 1 ]; then

View File

@ -1174,6 +1174,13 @@ class QubesTemplateVm(QubesVm):
except subprocess.CalledProcessError:
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):
if dry_run:
return