Fix activity, boot nfs, install handbook.

master
Mike Hiretsky 13 years ago
parent 7cc98e9175
commit 5c5c9ec094

@ -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:

@ -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

@ -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"

Loading…
Cancel
Save