Skip to content

Commit

Permalink
Verify values of boolean flags in template config.
Browse files Browse the repository at this point in the history
  • Loading branch information
WillyPillow committed Jul 29, 2020
1 parent 6c7360f commit eda68cc
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions qubesadmin/tools/qvm_template_postprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,14 +282,21 @@ def post_install(args):
# Import qvm-feature tags
for key in (
'no-monitor-layout',
'net.fake-ip',
'net.fake-gateway',
'net.fake-netmask',
'pci-e820-host',
'linux-stubdom',
'gui',
'gui-emulated'
'qrexec'):
if key in conf:
if conf[key] == '1':
vm.features[key] = conf[key]
else:
vm.log.warning(
'ignoring boolean config flags that are not \'1\'')
for key in (
'net.fake-ip',
'net.fake-gateway',
'net.fake-netmask'):
if key in conf:
vm.features[key] = conf[key]
if 'virt-mode' in conf:
Expand Down

0 comments on commit eda68cc

Please sign in to comment.