From 5c5c9ec0942d714fc6d25ea300321d5ffbfcdf1f Mon Sep 17 00:00:00 2001 From: Mike Hiretsky Date: Tue, 13 Dec 2011 17:44:01 +0400 Subject: [PATCH] Fix activity, boot nfs, install handbook. --- pym/cl_fill_install.py | 4 ++++ pym/cl_install.py | 17 +++++++++++------ setup.py | 4 +++- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/pym/cl_fill_install.py b/pym/cl_fill_install.py index 4a66140..dcd6cd3 100644 --- a/pym/cl_fill_install.py +++ b/pym/cl_fill_install.py @@ -1160,6 +1160,10 @@ class fillVars(object, glob_attr): def get_os_install_net_domain(self): """Domain""" + if path.exists('/proc/self/fd/1') and \ + readlink('/proc/self/fd/1') == '/dev/console' and \ + self.Get('os_root_dev') == '/dev/nfs': + return "local" textLines = self._runos("hostname -d 2>&1") domain = "" if textLines: diff --git a/pym/cl_install.py b/pym/cl_install.py index e2efba7..6c17aef 100644 --- a/pym/cl_install.py +++ b/pym/cl_install.py @@ -31,6 +31,7 @@ from cl_utils import runOsCommand,appendProgramToEnvFile, \ getSupportArch, refreshLVM, refreshUdev, \ isPkgInstalled, checkUtils, countPartitions from cl_vars_share import varsShare +from subprocess import Popen,PIPE,STDOUT from cl_kernel_utils import KernelConfig,InitRamFs @@ -1794,6 +1795,9 @@ class cl_install(color_print, SignalInterrupt): return True fdiskProg, gdiskProg, partedProg = checkUtils('/sbin/fdisk', '/usr/sbin/gdisk','/usr/sbin/parted') + + parttable = self.varSelect("os_disk_table",where="os_disk_dev", + eq=partition) partitionNumber = \ getUdevDeviceInfo(name=partition).get('ID_PART_ENTRY_NUMBER','') devicePartitionCount = countPartitions(deviceName) @@ -1819,7 +1823,7 @@ class cl_install(color_print, SignalInterrupt): if changeActive: if devicePartitionCount > 1: for partnum in changeActive: - pipe.stdin.write("a\n%s\n",partnum) + pipe.stdin.write("a\n%s\n"%partnum) pipe.stdin.write("w\n") else: pipe.stdin.write("a\nw\n") @@ -1833,19 +1837,20 @@ class cl_install(color_print, SignalInterrupt): if devicePartitionCount > 1: pipe.stdin.write("x\n") for partnum in changeActive: - pipe.stdin.write("a\n%s\n2\n\n",partnum) - pipe.stdin.write("w\n") + pipe.stdin.write("a\n%s\n2\n\n"%partnum) + pipe.stdin.write("w\nY\n") else: - pipe.stdin.write("x\na\n2\n\nw\n") + pipe.stdin.write("x\na\n2\n\nw\nY\n") pipe.stdin.close() pipe.wait() for waittime in (0.1,0.2,0.5,1,2,4): - if path.exists(dev): + if path.exists(partition): return True else: sleep(waittime) raise InstallError( - _("Failed to found partition %s after changing the activity")%dev) + _("Failed to found partition %s after changing the activity")% + partition) def installSyslinuxBootloader(self,target): """Install boot loader by syslinux diff --git a/setup.py b/setup.py index 606fdc5..ef19785 100755 --- a/setup.py +++ b/setup.py @@ -34,7 +34,9 @@ var_data_files = [] data_files += [('/etc/init.d', ['data/calculate']), ('/usr/bin',['data/xautologin']), ('/usr/share/calculate/doc', ['data/handbook-en.html', - 'data/handbook-ru.html']), + 'data/handbook-ru.html', + 'data/handbook-es.html', + 'data/handbook-fr.html']), ('/bin',['data/bashlogin'])] BUILD_MAN_PATH = "build/man"