diff options
Diffstat (limited to 'abs/core/LinHES-config/mv_install.py')
-rwxr-xr-x | abs/core/LinHES-config/mv_install.py | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/abs/core/LinHES-config/mv_install.py b/abs/core/LinHES-config/mv_install.py index 877ca67..cb19f2b 100755 --- a/abs/core/LinHES-config/mv_install.py +++ b/abs/core/LinHES-config/mv_install.py @@ -1308,12 +1308,13 @@ def add_to_modulelist(module): #return try: - f = open(rcfile, '1') + f = open(rcfile, 'a+') except: logging.critical(" *Couldn't open %s for writing",rcfile) return line = "%s" %module f.write(line) + f.write("\n") f.close() #for line in conflines: #newline = line @@ -1333,6 +1334,7 @@ def add_to_modulelist(module): def special_hardware_check(): + outlist = [] logging.info("_____Applying special boot parameters_______") try: f = open('/proc/cmdline', 'r') @@ -1347,12 +1349,14 @@ def special_hardware_check(): logging.debug(item) if (re.match("disablemodules",item) != None) or (re.match("modprobe.blacklist",item) != None ): logging.debug(" Found disabledmodules") + outlist.append(item) modulelist = item.split("=")[1] for module in modulelist.split(','): add_to_blacklist(module) if re.match("modules",item) != None : logging.debug(" Found modules") + outlist.append(item) modulelist = item.split("=")[1] for module in modulelist.split(','): add_to_modulelist(module) @@ -1372,6 +1376,19 @@ def special_hardware_check(): if re.match("no_meth",item) != None : cmd = " touch %s%s/.no_meth" %(data_config.MOUNTPOINT, data_config.MYTHHOME) runcmd(cmd) + if len(outlist) != 0: + outfile = data_config.MOUNTPOINT + "/etc/grub.d/install_modules" + logging.debug(" Writing out %s" %outfile) + try: + f = open(outfile, 'w') + templine = ' '.join(outlist) + outline = '''install_modules='%s' \n''' %templine + f.write(outline) + f.write("\n") + f.close() + except: + logging.critical(" *Couldn't write %s" %outfile) + return def swapsearch(): #currently unused! @@ -1549,12 +1566,14 @@ def full_install(hostoptions): update_status(msg) progress(98) + special_hardware_check() + mount_bind_chroot() grub_it() umount_bind_chroot() genlocale() #currently does nothing - special_hardware_check() + logging.info("______Configuring system________") cp_and_log("/etc/systemconfig", data_config.MOUNTPOINT+"/etc/systemconfig") @@ -1872,6 +1891,8 @@ def upgrade(hostoptions): fstab_it("upgrade") time.sleep(1) + special_hardware_check() + mount_bind_chroot() grub_it() umount_bind_chroot() @@ -1879,7 +1900,7 @@ def upgrade(hostoptions): genlocale() time.sleep(1) - special_hardware_check() + cp_and_log("/root/xorg.conf.install", data_config.MOUNTPOINT+"/etc/X11/xorg.conf.install") #this was needed to get around a pacman bug cp_and_log("/etc/mtab", data_config.MOUNTPOINT+"/etc/mtab") |