summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-config/mv_install.py
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2012-11-09 15:45:41 (GMT)
committerJames Meyer <james.meyer@operamail.com>2012-11-09 15:45:41 (GMT)
commit77e44fe619a659bad9faa3a06845f66df9e4527b (patch)
tree7169b446bb8a0bddd6b2034f022019f749f148e5 /abs/core/LinHES-config/mv_install.py
parentb9dbc7dc206b595e44a67f93892d55b6638b8da4 (diff)
downloadlinhes_pkgbuild-77e44fe619a659bad9faa3a06845f66df9e4527b.zip
linhes_pkgbuild-77e44fe619a659bad9faa3a06845f66df9e4527b.tar.gz
linhes_pkgbuild-77e44fe619a659bad9faa3a06845f66df9e4527b.tar.bz2
LinHES-config: transfer grub line modules to post install grub.
This is in addition to blacklisting them in modules.conf. This is needed because blacklisting a module doesn't work if it's in the initrd. refs #726 closes #726
Diffstat (limited to 'abs/core/LinHES-config/mv_install.py')
-rwxr-xr-xabs/core/LinHES-config/mv_install.py27
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")