Merge branch 'r1-beta1-fixes' of git.qubes-os.org:/var/lib/qubes/git/marmarek/core into r1-beta1
This commit is contained in:
commit
cb6a4176cb
@ -26,7 +26,7 @@ start()
|
||||
fi
|
||||
|
||||
type=$(/usr/bin/xenstore-read qubes_vm_type)
|
||||
if [ "$type" != "AppVM" -a "$type" != "DisposableVM" ]; then
|
||||
if [ "$type" != "AppVM" -a "$type" != "DisposableVM" -a "$type" != "TemplateVM" ]; then
|
||||
# This script runs only on AppVMs
|
||||
return 0
|
||||
fi
|
||||
|
@ -49,7 +49,7 @@ while true ; do
|
||||
read agentpid sentsize agentstatus < $PROGRESS_FILE
|
||||
if [ "x"$agentstatus = x ] ; then continue ; fi
|
||||
if ! [ -e /proc/$agentpid ] ; then break ; fi
|
||||
if [ "x"$agentstatus = xdone ] ; then break ; fi
|
||||
if [ "x"$agentstatus = xDONE ] ; then break ; fi
|
||||
CURRSIZE=$(($sentsize/1024))
|
||||
if [ $DO_PROGRESS = 1 ] ; then
|
||||
echo -ne "\r sent $CURRSIZE/$SIZE KB "
|
||||
|
@ -44,7 +44,7 @@ start()
|
||||
|
||||
stop()
|
||||
{
|
||||
rm -f /var/lock/subsys/qubes_netvm
|
||||
rm -f /var/lock/subsys/qubes_setupdvm
|
||||
success
|
||||
echo
|
||||
}
|
||||
|
@ -1130,6 +1130,11 @@ class QubesTemplateVm(QubesVm):
|
||||
format(src_template_vm.appmenus_templates_dir, self.appmenus_templates_dir)
|
||||
shutil.copytree (src_template_vm.appmenus_templates_dir, self.appmenus_templates_dir)
|
||||
|
||||
icon_path = "/usr/share/qubes/icons/template.png"
|
||||
if verbose:
|
||||
print "--> Creating icon symlink: {0} -> {1}".format(self.icon_path, icon_path)
|
||||
os.symlink (icon_path, self.icon_path)
|
||||
|
||||
# Create root-cow.img
|
||||
self.commit_changes()
|
||||
|
||||
|
@ -318,18 +318,19 @@ def main():
|
||||
for vm in [ vm for vm in vms_to_restore if vm.is_template()]:
|
||||
print "-> Adding Template VM {0}...".format(vm.name)
|
||||
updateable = vm.updateable
|
||||
vm = host_collection.add_new_templatevm(vm.name,
|
||||
try:
|
||||
vm = host_collection.add_new_templatevm(vm.name,
|
||||
conf_file=vm.conf_file,
|
||||
dir_path=vm.dir_path,
|
||||
installed_by_rpm=False)
|
||||
|
||||
vm.updateable = updateable
|
||||
try:
|
||||
vm.updateable = updateable
|
||||
vm.verify_files()
|
||||
except QubesException as err:
|
||||
except Exception as err:
|
||||
print "ERROR: {0}".format(err)
|
||||
print "*** Skiping VM: {0}".vm.name
|
||||
host_collection.pop(vm.qid)
|
||||
if vm:
|
||||
host_collection.pop(vm.qid)
|
||||
continue
|
||||
|
||||
try:
|
||||
@ -361,34 +362,50 @@ def main():
|
||||
|
||||
updateable = vm.updateable
|
||||
|
||||
vm = host_collection.add_new_appvm(vm.name, template_vm,
|
||||
try:
|
||||
vm = host_collection.add_new_appvm(vm.name, template_vm,
|
||||
conf_file=vm.conf_file,
|
||||
dir_path=vm.dir_path,
|
||||
updateable=updateable,
|
||||
label=vm.label)
|
||||
except Exception as err:
|
||||
print "ERROR: {0}".format(err)
|
||||
print "*** Skiping VM: {0}".format(vm.name)
|
||||
if vm:
|
||||
host_collection.pop(vm.qid)
|
||||
continue
|
||||
|
||||
if not uses_default_netvm:
|
||||
vm.uses_default_netvm = False
|
||||
vm.netvm_vm = netvm_vm
|
||||
|
||||
if template_vm is not None and recreate_conf:
|
||||
print "--> Recreating config file..."
|
||||
vm.create_config_file()
|
||||
try:
|
||||
if template_vm is not None and recreate_conf:
|
||||
print "--> Recreating config file..."
|
||||
vm.create_config_file()
|
||||
except QubesException as err:
|
||||
print "ERROR xen config restore: {0}".format(err)
|
||||
print "*** VM '{0}' will not boot until you manually fix it (or correctly restore this VM)!".format(vm.name)
|
||||
|
||||
try:
|
||||
vm.create_appmenus(verbose=True)
|
||||
except QubesException as err:
|
||||
print "ERROR during appmenu restore: {0}".format(err)
|
||||
print "*** VM '{0}' will not have appmenus".format(vm.name)
|
||||
|
||||
vm.create_appmenus(verbose=True)
|
||||
try:
|
||||
vm.verify_files()
|
||||
except QubesException as err:
|
||||
print "ERROR: {0}".format(err)
|
||||
print "*** Skiping VM: {0}".format(vm.name)
|
||||
host_collection.pop(vm.qid)
|
||||
continue
|
||||
|
||||
try:
|
||||
vm.add_to_xen_storage()
|
||||
except (IOError, OSError) as err:
|
||||
print "ERROR: {0}".format(err)
|
||||
print "*** Skiping VM: {0}".format(vm.name)
|
||||
host_collection.pop(vm.qid)
|
||||
print "*** VM '{0}' will not boot until you manually fix it (or correctly restore this VM)!".format(vm.name)
|
||||
|
||||
|
||||
backup_collection.unlock_db()
|
||||
|
Loading…
Reference in New Issue
Block a user