Add scratch variables

master3.3
Mike Hiretsky 14 years ago
parent 6a8b151cfc
commit 1b6177e63d

@ -49,6 +49,14 @@ class fillVars(object, glob_attr):
else:
return ""
def get_cl_install_system_action(self):
"""Need perform templates for install:system"""
if self.Get('cl_action') in ('system','merge') and \
self.Get('os_install_scratch'):
return "up"
else:
return ""
def get_os_net_interfaces_info(self):
"""Информация о существующих сетевых интерфейсах"""
netInterfaces=self.Get("os_net_interfaces")
@ -969,3 +977,11 @@ class fillVars(object, glob_attr):
def get_os_install_lang(self):
"""Supported languages"""
return clLocale().getLangs()
def get_os_install_scratch(self):
"""Install system in scratch mode"""
return self.Get('os_scratch')
def get_os_scratch(self):
"""Current system is scratch"""
return "on" isMount('/mnt/scratch') else "off"

@ -37,6 +37,9 @@ class Data:
# need perform templates for install:system
cl_install_system_action = {}
# need perform templates for install:scratch
os_install_scratch_action = {}
# install maching architecture
os_install_arch_machine = {'mode':'w'}
@ -279,3 +282,10 @@ class Data:
# migrate users who need to change passwords
cl_migrate_user_pwd = {}
# install system in scratch mode
os_install_scratch = {}
# current system is scratch
os_scratch = {}

Loading…
Cancel
Save