summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2009-07-06 04:55:09 (GMT)
committerJames Meyer <james.meyer@operamail.com>2009-07-06 04:55:09 (GMT)
commitc65be94a90ca38f456ac7508f285e0def2c05aae (patch)
tree50968ad2d2b57070a6f0c6505050c09afedbec75
parentbd85a03ffbbe362d9776483fb5cd5f5c3cdcd230 (diff)
downloadlinhes_pkgbuild-c65be94a90ca38f456ac7508f285e0def2c05aae.zip
linhes_pkgbuild-c65be94a90ca38f456ac7508f285e0def2c05aae.tar.gz
linhes_pkgbuild-c65be94a90ca38f456ac7508f285e0def2c05aae.tar.bz2
LinHES-config: mv_install.py if modules are in /proc/cmdline add them to rc.conf
-rwxr-xr-xabs/core-testing/LinHES-config/PKGBUILD2
-rwxr-xr-xabs/core-testing/LinHES-config/mv_install.py42
2 files changed, 43 insertions, 1 deletions
diff --git a/abs/core-testing/LinHES-config/PKGBUILD b/abs/core-testing/LinHES-config/PKGBUILD
index 37beb99..56cbd1a 100755
--- a/abs/core-testing/LinHES-config/PKGBUILD
+++ b/abs/core-testing/LinHES-config/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=LinHES-config
pkgver=2.0
-pkgrel=43
+pkgrel=44
conflicts=(MythVantage-config MythVantage-config-dev LinHES-config-dev )
pkgdesc="Install and configure your system"
depends=(bc libstatgrab mysql-python expect curl dnsutils parted sg3_utils nmbscan system-templates rsync python-parted ddcxinfo python-pexpect)
diff --git a/abs/core-testing/LinHES-config/mv_install.py b/abs/core-testing/LinHES-config/mv_install.py
index 9d2e284..efee91e 100755
--- a/abs/core-testing/LinHES-config/mv_install.py
+++ b/abs/core-testing/LinHES-config/mv_install.py
@@ -770,6 +770,42 @@ def add_to_blacklist(module):
f.write(newline)
f.close()
+
+def add_to_modulelist(module):
+ rcfile = data_config.MOUNTPOINT + "/etc/rc.conf"
+ logging.debug(" Attempting to add %s to modulelist", 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("MODULES=",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:
@@ -789,6 +825,12 @@ def special_hardware_check():
for module in modulelist.split(','):
add_to_blacklist(module)
+ if re.match("modules",item) != None :
+ logging.debug(" Found modules")
+ modulelist = item.split("=")[1]
+ for module in modulelist.split(','):
+ add_to_modulelist(module)
+
def swapsearch():
#currently unused!