diff options
author | Karel Kočí <cynerd@email.cz> | 2015-04-19 11:27:21 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2015-04-19 11:27:21 +0200 |
commit | 1846b6fc97959222c5787a6095fe18424824139a (patch) | |
tree | a1d9d7804a6b1a94c050d06c6589127359980f14 /scripts | |
parent | 7a4fc2b2d97d5c9bb9a9e22dc633def47f4c1385 (diff) | |
download | linux-conf-perf-1846b6fc97959222c5787a6095fe18424824139a.tar.gz linux-conf-perf-1846b6fc97959222c5787a6095fe18424824139a.tar.bz2 linux-conf-perf-1846b6fc97959222c5787a6095fe18424824139a.zip |
Force MODULES no
We are not supporting modules. Initial configuration with enable modules causes errors.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/exceptions.py | 6 | ||||
-rw-r--r-- | scripts/initialize.py | 7 |
2 files changed, 11 insertions, 2 deletions
diff --git a/scripts/exceptions.py b/scripts/exceptions.py index 722c44a..5b55294 100644 --- a/scripts/exceptions.py +++ b/scripts/exceptions.py @@ -19,3 +19,9 @@ class PhaseMismatch(Exception): pass def __str__(self): return "Phase in " + conf.phase_file + " is unknown." + +class ConfigurationError(Exception): + def __init__(self, message): + self.message = message; + def __str__(self): + return "Configuration error: " + message diff --git a/scripts/initialize.py b/scripts/initialize.py index aca447d..4d14b1f 100644 --- a/scripts/initialize.py +++ b/scripts/initialize.py @@ -47,9 +47,12 @@ def gen_requred(): if (line[0] == '#') or (not '=' in line): continue indx = line.index('=') - if (line[indx + 1] == 'y' or line[indx + 1] == 'm'): + if (line[7:indx] == "MODULES"): # skip if modules set + raise exceptions.ConfigurationError("Initial kernel configuration must have MODULES disabled.") + if (line[indx + 1] == 'y'): freq.write(srmap[line[7:indx]] + "\n") - elif (line[indx + 1] == 'n'): + elif (line[indx + 1] == 'n' or line[indx + 1] == 'm'): freq.write("-" + srmap[line[7:indx]] + "\n") else: fconf.write(line); + freq.write("-" + srmap["MODULES"] + "\n"); # force modules no |