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.
このコミットが含まれているのは:
コミット
65fc62a989
@ -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()
|
||||
|
||||
読み込み中…
新しいイシューから参照
ユーザーをブロックする