summaryrefslogtreecommitdiffstats
path: root/abs
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2012-08-21 19:11:24 (GMT)
committerJames Meyer <james.meyer@operamail.com>2012-08-21 19:11:24 (GMT)
commit6e3b3dc34d0c6f5fcdeb8884929ffe35c0593fcd (patch)
tree441023ed005e46afc8ca8d437e119aeedd416f49 /abs
parent10263f34147534db48390cfa78ef90ac5d2bcb29 (diff)
downloadlinhes_pkgbuild-6e3b3dc34d0c6f5fcdeb8884929ffe35c0593fcd.zip
linhes_pkgbuild-6e3b3dc34d0c6f5fcdeb8884929ffe35c0593fcd.tar.gz
linhes_pkgbuild-6e3b3dc34d0c6f5fcdeb8884929ffe35c0593fcd.tar.bz2
LinHES-config: removed referenced to rc.conf for modules
Diffstat (limited to 'abs')
-rwxr-xr-xabs/core/LinHES-config/mv_install.py102
1 files changed, 54 insertions, 48 deletions
diff --git a/abs/core/LinHES-config/mv_install.py b/abs/core/LinHES-config/mv_install.py
index 1d5f6fe..72c94f8 100755
--- a/abs/core/LinHES-config/mv_install.py
+++ b/abs/core/LinHES-config/mv_install.py
@@ -1002,71 +1002,77 @@ def apply_new_auth():
logging.debug
def add_to_blacklist(module):
- rcfile = data_config.MOUNTPOINT + "/etc/rc.conf"
+ rcfile = data_config.MOUNTPOINT + "/etc/modprobe.d/install-blacklist.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, 'r')
+ #conflines = f.readlines()
+ #f.close()
+ #except:
+ #logging.critical(" *Couldn't open %s for reading",rcfile)
+ #return
try:
- f = open(rcfile, 'w')
+ f = open(rcfile, 'a')
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)
+ line = "blacklist %s \n" %module
+ f.write(line)
+ line = "install %s /bin/false \n" %module
+ f.write(line)
f.close()
+ #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 add_to_modulelist(module):
- rcfile = data_config.MOUNTPOINT + "/etc/rc.conf"
+ rcfile = data_config.MOUNTPOINT + "/etc/modules-load.d/install-autoload.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, 'r')
+ #conflines = f.readlines()
+ #f.close()
+ #except:
+ #logging.critical(" *Couldn't open %s for reading",rcfile)
+ #return
try:
- f = open(rcfile, 'w')
+ f = open(rcfile, '1')
except:
- logging.critical(" *Couldn't open %s for reading",rcfile)
+ logging.critical(" *Couldn't open %s for writing",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)
+ line = "%s" %module
+ f.write(line)
f.close()
+ #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()
@@ -1083,7 +1089,7 @@ def special_hardware_check():
logging.debug(" Boot options: %s", bootoptions)
for item in bootoptions:
logging.debug(item)
- if re.match("disablemodules",item) != None :
+ if (re.match("disablemodules",item) != None) or (re.match("modprobe.blacklist",item) != None ):
logging.debug(" Found disabledmodules")
modulelist = item.split("=")[1]
for module in modulelist.split(','):