From 81138182f6c7441d5d0ff5c333a6f56911ec87bb Mon Sep 17 00:00:00 2001 From: Marek Marczykowski Date: Tue, 8 May 2012 15:54:29 +0200 Subject: [PATCH] dom0: var name fix, and one minor sanity check --- dom0/aux-tools/qubes-notify-updates | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dom0/aux-tools/qubes-notify-updates b/dom0/aux-tools/qubes-notify-updates index 53bc57cd..2e09f411 100755 --- a/dom0/aux-tools/qubes-notify-updates +++ b/dom0/aux-tools/qubes-notify-updates @@ -37,6 +37,10 @@ def main(): source = os.getenv("QREXEC_REMOTE_DOMAIN") + if source is None: + print >> sys.stderr, 'This script must be called as qrexec service!' + exit(1) + source_vm = qvm_collection.get_vm_by_name(source) if source_vm is None: print >> sys.stderr, 'Domain ' + source + ' does not exists (?!)' @@ -48,7 +52,7 @@ def main(): exit(1) if source_vm.updateable: # Just trust information from VM itself - update_f = open(vm.dir_path + '/' + updates_stat_file, "w") + update_f = open(source_vm.dir_path + '/' + updates_stat_file, "w") update_f.write(update_count) update_f.close() elif source_vm.template is not None: