summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/automatic.c
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2001-12-04 20:04:48 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2001-12-04 20:04:48 +0000
commit5ec6802e4c1a84a31bc33ed5b1f2b9133e233e00 (patch)
tree64bfb57d10b7017e8b99e69822fa007694f4d9bd /mdk-stage1/automatic.c
parentc13d108d505fe8378313d6ebd795645d9367d5be (diff)
downloaddrakx-5ec6802e4c1a84a31bc33ed5b1f2b9133e233e00.tar
drakx-5ec6802e4c1a84a31bc33ed5b1f2b9133e233e00.tar.gz
drakx-5ec6802e4c1a84a31bc33ed5b1f2b9133e233e00.tar.bz2
drakx-5ec6802e4c1a84a31bc33ed5b1f2b9133e233e00.tar.xz
drakx-5ec6802e4c1a84a31bc33ed5b1f2b9133e233e00.zip
support shorter versions of automatic keywords to beat problems with very long kernel commandlines
Diffstat (limited to 'mdk-stage1/automatic.c')
-rw-r--r--mdk-stage1/automatic.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/mdk-stage1/automatic.c b/mdk-stage1/automatic.c
index 486a829de..144166240 100644
--- a/mdk-stage1/automatic.c
+++ b/mdk-stage1/automatic.c
@@ -74,8 +74,21 @@ char * get_auto_value(char * auto_param)
{
struct param_elem * ptr = automatic_params;
+ struct param_elem short_aliases[] =
+ { { "method", "met" }, { "network", "netw" }, { "interface", "int" }, { "gateway", "gat" },
+ { "netmask", "netm" }, { "adsluser", "adslu" }, { "adslpass", "adslp" }, { "hostname", "hos" },
+ { "domain", "dom" }, { "server", "ser" }, { "directory", "dir" }, { "user", "use" },
+ { "pass", "pas" }, { "disk", "dis" }, { "partition", "par" }, { NULL } };
+ struct param_elem * ptr_alias = short_aliases;
+ while (ptr_alias->name) {
+ if (streq(auto_param, ptr_alias->name))
+ break;
+ ptr_alias++;
+ }
+
while (ptr->name) {
- if (!strcmp(ptr->name, auto_param))
+ if (streq(ptr->name, auto_param)
+ || (ptr_alias->name && streq(ptr_alias->value, ptr->name)))
return ptr->value;
ptr++;
}