|
|
|
|
#-*- coding: utf-8 -*-
|
|
|
|
|
|
|
|
|
|
# Copyright 2008-2010 Mir Calculate Ltd. http://www.calculate-linux.org
|
|
|
|
|
#
|
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
|
#
|
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
#
|
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
|
# limitations under the License.
|
|
|
|
|
|
|
|
|
|
#Допустимые ключи значений
|
|
|
|
|
# mode - режим переменной r-не переназначается из командной строки,
|
|
|
|
|
# w-переназначается из командной строки
|
|
|
|
|
# type - тип переменной состоит из двух элементов(что это и для чего
|
|
|
|
|
# это)
|
|
|
|
|
# value - значение переменной
|
|
|
|
|
# official - флаг того, что данная переменная служебная и не отображается
|
|
|
|
|
# при печати списка значений переменных
|
|
|
|
|
|
|
|
|
|
class Data:
|
|
|
|
|
|
|
|
|
|
# имя компьютера
|
|
|
|
|
os_net_hostname = {'mode':"w"}
|
|
|
|
|
# разрешенные сети
|
|
|
|
|
os_net_allow ={}
|
|
|
|
|
# ip на всех интерфейсах
|
|
|
|
|
os_net_ip ={}
|
|
|
|
|
|
|
|
|
|
# Существующие сетевые интерфейсы
|
|
|
|
|
os_net_interfaces={'official':True}
|
|
|
|
|
|
|
|
|
|
#короткое название системы (CLD)
|
|
|
|
|
os_linux_shortname={}
|
|
|
|
|
|
|
|
|
|
#домен
|
|
|
|
|
os_net_domain = {'mode':"w"}
|
|
|
|
|
|
|
|
|
|
# Алиасы и пути к ini файлам
|
|
|
|
|
cl_env_data = {'official':True,
|
|
|
|
|
'value':[('default', '/etc/calculate/calculate2.env'),
|
|
|
|
|
('local', '/var/calculate/calculate2.env'),
|
|
|
|
|
('remote', '/var/calculate/remote/calculate2.env')]}
|
|
|
|
|
|
|
|
|
|
# Алиасы путей к ini файлам (из cl_env_data)
|
|
|
|
|
cl_env_location = {'official':True}
|
|
|
|
|
|
|
|
|
|
# Пути к ini файлам (из cl_env_data)
|
|
|
|
|
cl_env_path = {}
|
|
|
|
|
|
|
|
|
|
# Путь к информационному файлу сервера
|
|
|
|
|
cl_env_server_path = {'official':True,
|
|
|
|
|
'value':'/var/calculate/remote/server.env'}
|
|
|
|
|
|
|
|
|
|
# Пути к файлам шаблонов
|
|
|
|
|
cl_template_path = {'value':["/usr/share/calculate-2.2/templates",
|
|
|
|
|
"/var/calculate/templates",
|
|
|
|
|
"/var/calculate/remote/templates"]}
|
|
|
|
|
# локаль (прим: ru_RU.UTF-8)
|
|
|
|
|
os_locale_locale = {}
|
|
|
|
|
# язык (прим: ru_RU)
|
|
|
|
|
os_locale_lang = {}
|
|
|
|
|
# язык (прим: ru)
|
|
|
|
|
os_locale_language = {}
|
|
|
|
|
|
|
|
|
|
# раскладка клавиатуры для X
|
|
|
|
|
os_locale_xkb = {}
|
|
|
|
|
|
|
|
|
|
# названия используемых раскладок клавиатуры для X
|
|
|
|
|
os_locale_xkbname = {}
|
|
|
|
|
|
|
|
|
|
# keymap of locale (used for /etc/conf.d/keymaps)
|
|
|
|
|
os_locale_keymap = {}
|
|
|
|
|
|
|
|
|
|
# dumpkeys_charset for keymap
|
|
|
|
|
os_locale_dumpkeys = {}
|
|
|
|
|
|
|
|
|
|
# timezone for clock
|
|
|
|
|
os_clock_timezone = {}
|
|
|
|
|
|
|
|
|
|
# type of clock (UTC or local)
|
|
|
|
|
os_clock_type = {}
|
|
|
|
|
|
|
|
|
|
# архитектура компьютера (i686,x86_64)
|
|
|
|
|
os_arch_machine = {}
|
|
|
|
|
|
|
|
|
|
#проход при наложении профилей 1,2,3,4,5 и.т д
|
|
|
|
|
cl_pass_step = {}
|
|
|
|
|
|
|
|
|
|
# обрабатываемый файл профиля
|
|
|
|
|
cl_pass_file = {'mode':"w"}
|
|
|
|
|
|
|
|
|
|
# корневой раздел файловой системы
|
|
|
|
|
os_root_dev = {}
|
|
|
|
|
|
|
|
|
|
# тип носителя (ram, hdd, usb-hdd, livecd)
|
|
|
|
|
os_root_type = {}
|
|
|
|
|
|
|
|
|
|
# полное название системы
|
|
|
|
|
os_linux_name = {}
|
|
|
|
|
|
|
|
|
|
# постфикс к названию системы
|
|
|
|
|
os_linux_subname = {}
|
|
|
|
|
|
|
|
|
|
# motherboard model
|
|
|
|
|
hr_board_model = {}
|
|
|
|
|
|
|
|
|
|
# motherboard vendor
|
|
|
|
|
hr_board_vendor = {}
|
|
|
|
|
|
|
|
|
|
# processors count
|
|
|
|
|
hr_cpus = {}
|
|
|
|
|
|
|
|
|
|
# название виртуальной машины (virtualbox, vmware, qemu)
|
|
|
|
|
hr_virtual = {}
|
|
|
|
|
|
|
|
|
|
# версия системы
|
|
|
|
|
os_linux_ver = {}
|
|
|
|
|
|
|
|
|
|
# Логин пользователя
|
|
|
|
|
ur_login = {'mode':"r"}
|
|
|
|
|
|
|
|
|
|
# Название группы пользователя
|
|
|
|
|
ur_group = {'mode':"r", 'official':True}
|
|
|
|
|
|
|
|
|
|
#Полное имя пользователя
|
|
|
|
|
ur_fullname = {'mode':"r", 'official':True}
|
|
|
|
|
|
|
|
|
|
# Домашняя директория пользователя
|
|
|
|
|
ur_home_path = {'mode':"r", 'official':True}
|
|
|
|
|
|
|
|
|
|
#путь к директории относительно которой происходит наложение профилей на
|
|
|
|
|
#файлы системы
|
|
|
|
|
cl_root_path = {'mode':"w", 'value':"/"}
|
|
|
|
|
|
|
|
|
|
# Действие программы
|
|
|
|
|
# user - генерация профиля пользователя
|
|
|
|
|
# install / uninstall - установка и удаление программы
|
|
|
|
|
cl_pass_action = {}
|
|
|
|
|
|
|
|
|
|
# Состояние программы
|
|
|
|
|
# Указываем дополнительно к cl_pass_action в случае необходимости
|
|
|
|
|
cl_pass_state = {}
|
|
|
|
|
|
|
|
|
|
# Jabber ID пользователя
|
|
|
|
|
ur_jid = {'mode':"r", 'official':True}
|
|
|
|
|
|
|
|
|
|
# Почтовый адрес пользователя
|
|
|
|
|
ur_mail = {'mode':"r", 'official':True}
|
|
|
|
|
|
|
|
|
|
# Переменные пакета calculate-client для calculate-desktop
|
|
|
|
|
# ip или имя домена (под управлением calculate-server)
|
|
|
|
|
cl_remote_host = {'mode':'r', 'official':True}
|
|
|
|
|
|
|
|
|
|
# Переменная работающая совместно с функцией шаблонов belong(имя_пакета)
|
|
|
|
|
# Если переменная будет определена то будут использованы шаблоны
|
|
|
|
|
# у которых параметр имя пакета функции шаблонов belong(имя_пакета)
|
|
|
|
|
# совпадает с значением этой переменной
|
|
|
|
|
# (имя_пакета == значение cl_belong_pkg)
|
|
|
|
|
cl_belong_pkg = {'mode':'r', 'official':True}
|
|
|
|
|
|