diff options
author | Andreas Robinson <andr345@gmail.com> | 2009-10-12 10:26:58 +0200 |
---|---|---|
committer | Andreas Robinson <andr345@gmail.com> | 2009-10-15 09:53:10 +0200 |
commit | 9127f56dd2d62cdbac99189984286f876b37a704 (patch) | |
tree | 798f8794d68081899677894d3a70677ee03a16a9 | |
parent | e58e266fba80e0370d2a5cffbe07adf8f7db383f (diff) | |
download | module-init-tools-9127f56dd2d62cdbac99189984286f876b37a704.tar.gz |
modprobe: change softdep --pre/--post to pre:/post:
"--" is modified by underscores(). This would have made the
future implementation of softdep in .modinfo more complicated.
Signed-off-by: Andreas Robinson <andr345@gmail.com>
-rw-r--r-- | modprobe.c | 4 | ||||
-rw-r--r-- | tests/test-modprobe/28softdep.sh | 10 |
2 files changed, 7 insertions, 7 deletions
@@ -840,9 +840,9 @@ static int parse_config_file(const char *filename, if (!modname || !ptr) goto syntax_error; while ((tk = strsep_skipspace(&ptr, "\t ")) != NULL) { - if (streq(tk, "--pre")) { + if (streq(tk, "pre:")) { pre = 1; post = 0; - } else if (streq(tk, "--post")) { + } else if (streq(tk, "post:")) { pre = 0; post = 1; } else if (pre) { pre_modnames = NOFAIL( diff --git a/tests/test-modprobe/28softdep.sh b/tests/test-modprobe/28softdep.sh index d999872..234a214 100644 --- a/tests/test-modprobe/28softdep.sh +++ b/tests/test-modprobe/28softdep.sh @@ -31,9 +31,9 @@ mkdir -p tests/tmp/etc/modprobe.d cat > tests/tmp/etc/modprobe.d/modprobe.conf << EOF alias a_alias a alias c_alias c -softdep c --pre a_alias b --post d e -softdep e --post f -softdep f --pre a +softdep c pre: a_alias b post: d e +softdep e post: f +softdep f pre: a EOF # Insert-test @@ -57,8 +57,8 @@ R2=`echo $R1` # remove newlines mkdir -p tests/tmp/etc/modprobe.d cat > tests/tmp/etc/modprobe.d/modprobe.conf << EOF alias a_alias a -softdep a --pre b -softdep b --pre a +softdep a pre: b +softdep b pre: a EOF R1=`modprobe -v a_alias 2>&1 | cat` # shell won't assign to R1 without no-op cat. |