You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
109 lines
3.2 KiB
109 lines
3.2 KiB
#-*- coding: utf-8 -*-
|
|
|
|
# Copyright 2008-2012 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.
|
|
|
|
import os
|
|
import sys
|
|
from os import path
|
|
from calculate.lib.cl_datavars import Variables
|
|
from calculate.lib.variables import System
|
|
|
|
from calculate.lib.cl_lang import setLocalTranslate
|
|
setLocalTranslate('cl_install',sys.modules[__name__])
|
|
|
|
class InstallSystem(System):
|
|
vars = ["os_install_scratch","cl_autoupdate_set",
|
|
"cl_install_autoupdate_set","os_install_arch_machine",
|
|
"os_install_proxy","os_install_ntp","os_install_root_type",
|
|
"os_install_root_dev","os_install_dev_from","os_install_lvm_set",
|
|
"os_install_mdadm_set","os_grub_conf","os_grub2_path",
|
|
"cl_chroot_grub","os_install_grub_devicemap_conf",
|
|
"cl_distfiles_path","cl_pkgdir_path","os_format_type",
|
|
"os_format_use","os_install_makeopts","cl_migrate_user",
|
|
"cl_migrate_user_pwd","os_nvidia_mask","cl_autologin"]
|
|
# install system in scratch mode
|
|
os_install_scratch = {}
|
|
|
|
# (on or off) autoupdate config from install program
|
|
cl_autoupdate_set = {'value': "off"}
|
|
|
|
# (on or off) autoupdate config from install program for install
|
|
cl_install_autoupdate_set = {'mode':'w','value': "off"}
|
|
|
|
# install maching architecture
|
|
os_install_arch_machine = {'mode':'w'}
|
|
|
|
# proxy server for system
|
|
os_install_proxy = {'mode':'w',
|
|
'value':''}
|
|
|
|
# nt server for system
|
|
os_install_ntp = {'mode':'w',
|
|
'value':'ntp0.zenon.net'}
|
|
|
|
# type of device for install
|
|
os_install_root_type = {'mode':'w'}
|
|
# root device of installed os
|
|
os_install_root_dev = {}
|
|
|
|
# root device of previous installed os
|
|
os_install_dev_from = {}
|
|
|
|
# using lvm
|
|
os_install_lvm_set = {}
|
|
|
|
# using mdadm
|
|
os_install_mdadm_set = {}
|
|
|
|
# current grub
|
|
os_grub_conf = {}
|
|
|
|
# grub2 install path
|
|
os_grub2_path = {'mode':'w'}
|
|
|
|
# grub chroot need for grub-mkconfig
|
|
cl_chroot_grub = {}
|
|
|
|
# content of device.map file for grub
|
|
os_install_grub_devicemap_conf = {}
|
|
|
|
# DISTFILES value
|
|
cl_distfiles_path = {'mode':'w',
|
|
'value':'/var/calculate/remote/distfiles'}
|
|
# PKGDIR value
|
|
cl_pkgdir_path = {'mode':'w'}
|
|
|
|
# filesystem format support by calcualte-install
|
|
os_format_type = {}
|
|
|
|
# avialable format by mkfs utility
|
|
os_format_use = {}
|
|
|
|
# makeconf makeopts
|
|
os_install_makeopts = {'mode':'w'}
|
|
|
|
# migrate users
|
|
cl_migrate_user = {}
|
|
|
|
# migrate users who need to change passwords
|
|
cl_migrate_user_pwd = {}
|
|
|
|
# nvidia-drivers atom mask
|
|
os_nvidia_mask = {}
|
|
|
|
# variable for autologin
|
|
cl_autologin = {}
|
|
|