summaryrefslogtreecommitdiffstats
path: root/abs/core-testing
diff options
context:
space:
mode:
authorCecil Hugh Watson <knoppmyth@gmail.com>2009-06-07 19:05:22 (GMT)
committerCecil Hugh Watson <knoppmyth@gmail.com>2009-06-07 19:05:22 (GMT)
commit6c1f9e5b8dc71152b243fccff303b27a48a6c6a3 (patch)
treecba54bf20c267dea7b1d33a3e861feb515ec0aed /abs/core-testing
parentfa2233ca6829acc867f8d3daf692a2bbb5fc9c04 (diff)
parent772610032aa3949f558b1317b7bf4c91ef833206 (diff)
downloadlinhes_pkgbuild-6c1f9e5b8dc71152b243fccff303b27a48a6c6a3.zip
linhes_pkgbuild-6c1f9e5b8dc71152b243fccff303b27a48a6c6a3.tar.gz
linhes_pkgbuild-6c1f9e5b8dc71152b243fccff303b27a48a6c6a3.tar.bz2
Merge branch 'HEAD' of ssh://cesman@knoppmyth.net/mount/repository/LinHES-PKGBUILD
Diffstat (limited to 'abs/core-testing')
-rwxr-xr-xabs/core-testing/LinHES-config/mv_install.py55
1 files changed, 55 insertions, 0 deletions
diff --git a/abs/core-testing/LinHES-config/mv_install.py b/abs/core-testing/LinHES-config/mv_install.py
index 1281932..97fbae5 100755
--- a/abs/core-testing/LinHES-config/mv_install.py
+++ b/abs/core-testing/LinHES-config/mv_install.py
@@ -689,6 +689,59 @@ def apply_new_auth():
logging.debug("Applying password updates failed, couldn't open %s", passfile)
logging.debug
+def add_to_blacklist(module):
+ rcfile = data_config.MOUNTPOINT + "/etc/rc.conf"
+ logging.debug(" Attempting to add %s to blacklist", module)
+ newline=''
+ try:
+ f = open(rcfile, 'r')
+ conflines = f.readlines()
+ f.close()
+ except:
+ logging.critical(" *Couldn't open %s for reading",rcfile)
+ return
+
+ try:
+ f = open(rcfile, 'w')
+ except:
+ logging.critical(" *Couldn't open %s for reading",rcfile)
+ return
+
+ for line in conflines:
+ newline = line
+ if re.match("MOD_BLACKLIST",line):
+ logging.debug(line)
+ try:
+ lastpar = line.rindex(')')
+ logging.debug(" found ) at %s", lastpar)
+ newline = line[:lastpar] +" !" + module + " " + line[lastpar:]
+ logging.debug(newline)
+ except:
+ logging.debug("Couldn't find ending )")
+ newline = line
+ f.write(newline)
+ f.close()
+
+def special_hardware_check():
+ logging.info("_____Applying special boot parameters_______")
+ try:
+ f = open('/proc/cmdline', 'r')
+ bootoptions = f.readlines()
+ f.close()
+ except:
+ logging.critical(" *Couldn't open /proc/cmdline")
+ return
+ bootoptions = bootoptions[0].split()
+ logging.debug(" Boot options: %s", bootoptions)
+ for item in bootoptions:
+ logging.debug(item)
+ if re.match("disablemodules",item) != None :
+ logging.debug(" Found disabledmodules")
+ modulelist = item.split("=")[1]
+ for module in modulelist.split(','):
+ add_to_blacklist(module)
+
+
def swapsearch():
#currently unused!
partlist = []
@@ -820,6 +873,7 @@ def full_install(hostoptions):
update_status(msg)
progress(98)
grub_it()
+ special_hardware_check()
# Configuring the system
logging.info("______Configuring system________")
cp_and_log("/etc/systemconfig", data_config.MOUNTPOINT+"/etc/systemconfig")
@@ -1058,6 +1112,7 @@ def upgrade(hostoptions):
grub_it()
time.sleep(1)
#needed to get around a bug with pacman
+ special_hardware_check()
cp_and_log("/root/xorg.conf.install", data_config.MOUNTPOINT+"/etc/X11/xorg.conf.install")
cp_and_log("/etc/mtab", data_config.MOUNTPOINT+"/etc/mtab")
if clean_upgrade() or os.path.exists("/tmp/etc/KnoppMyth-version"):