dom0/core: setup yum to use proxy when it have access to it (#568)

To simplify configuration, automatically enable 'yum-proxy-setup'
pseudo-service when allowing access to the proxy. Also disable this service,
when access is revoked. Thanks to this the user can enable this feature by one
click in firewall settings.
このコミットが含まれているのは:
Marek Marczykowski 2012-05-31 02:57:28 +02:00
コミット 65fc62a989
2個のファイルの変更8行の追加0行の削除

ファイルの表示

@ -1203,6 +1203,13 @@ class QubesVm(object):
os.path.basename(sys.argv[0]), err)
return False
# Automatically enable/disable 'yum-proxy-setup' service based on allowYumProxy
if conf['allowYumProxy']:
self.services['yum-proxy-setup'] = True
else:
if self.services.has_key('yum-proxy-setup'):
self.services.pop('yum-proxy-setup')
return True
def has_firewall(self):

ファイルの表示

@ -314,6 +314,7 @@ def main():
if vm.is_running():
if vm.netvm is not None and vm.netvm.is_proxyvm():
vm.netvm.write_iptables_xenstore_entry()
qvm_collection.save()
if not options.do_list:
qvm_collection.unlock_db()