Add support for VMM-specific settings.
This commit is contained in:
parent
80c89cc91c
commit
6193b4fea3
@ -1,4 +1,7 @@
|
|||||||
|
OS ?= Linux
|
||||||
|
|
||||||
PYTHON_QUBESPATH = $(PYTHON_SITEPATH)/qubes
|
PYTHON_QUBESPATH = $(PYTHON_SITEPATH)/qubes
|
||||||
|
SETTINGS_SUFFIX = $(BACKEND_VMM)-$(OS)
|
||||||
|
|
||||||
all:
|
all:
|
||||||
python -m compileall .
|
python -m compileall .
|
||||||
@ -19,3 +22,11 @@ endif
|
|||||||
cp notify.py[co] $(DESTDIR)$(PYTHON_QUBESPATH)
|
cp notify.py[co] $(DESTDIR)$(PYTHON_QUBESPATH)
|
||||||
cp backup.py $(DESTDIR)$(PYTHON_QUBESPATH)
|
cp backup.py $(DESTDIR)$(PYTHON_QUBESPATH)
|
||||||
cp backup.py[co] $(DESTDIR)$(PYTHON_QUBESPATH)
|
cp backup.py[co] $(DESTDIR)$(PYTHON_QUBESPATH)
|
||||||
|
ifneq ($(BACKEND_VMM),)
|
||||||
|
test -r settings-$(SETTINGS_SUFFIX).py && \
|
||||||
|
cp settings-$(SETTINGS_SUFFIX).py $(DESTDIR)$(PYTHON_QUBESPATH)/settings.py
|
||||||
|
test -r settings-$(SETTINGS_SUFFIX).pyc && \
|
||||||
|
cp settings-$(SETTINGS_SUFFIX).pyc $(DESTDIR)$(PYTHON_QUBESPATH)/settings.pyc
|
||||||
|
test -r settings-$(SETTINGS_SUFFIX).pyo && \
|
||||||
|
cp settings-$(SETTINGS_SUFFIX).pyo $(DESTDIR)$(PYTHON_QUBESPATH)/settings.pyo
|
||||||
|
endif
|
||||||
|
@ -21,6 +21,8 @@
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
|
from __future__ import absolute_import
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
import os.path
|
import os.path
|
||||||
@ -868,6 +870,13 @@ for module_file in sorted(os.listdir(modules_dir)):
|
|||||||
continue
|
continue
|
||||||
__import__('qubes.modules.%s' % module_file[:-3])
|
__import__('qubes.modules.%s' % module_file[:-3])
|
||||||
|
|
||||||
|
try:
|
||||||
|
import qubes.settings
|
||||||
|
qubes.settings.apply(system_path, vm_files, defaults)
|
||||||
|
#except ImportError:
|
||||||
|
finally:
|
||||||
|
pass
|
||||||
|
|
||||||
for path_key in system_path.keys():
|
for path_key in system_path.keys():
|
||||||
system_path[path_key] = system_path[path_key].format(
|
system_path[path_key] = system_path[path_key].format(
|
||||||
base_dir=system_path['qubes_base_dir']
|
base_dir=system_path['qubes_base_dir']
|
||||||
|
4
core/settings-wni-Windows_NT.py
Normal file
4
core/settings-wni-Windows_NT.py
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#!/usr/bin/python2
|
||||||
|
|
||||||
|
def apply(system_path, vm_files, defaults):
|
||||||
|
system_path['qubes_base_dir'] = 'c:/qubes'
|
Loading…
Reference in New Issue
Block a user