summaryrefslogtreecommitdiffstats
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
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
-rw-r--r--mdk-stage1/automatic.c15
-rw-r--r--mdk-stage1/doc/TECH-INFOS11
2 files changed, 25 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++;
}
diff --git a/mdk-stage1/doc/TECH-INFOS b/mdk-stage1/doc/TECH-INFOS
index f86809f69..074b35d31 100644
--- a/mdk-stage1/doc/TECH-INFOS
+++ b/mdk-stage1/doc/TECH-INFOS
@@ -78,3 +78,14 @@ fi
+You may use shorter versions of keywords (it helps reducing size of
+commandline), please find each keyword short-alias counterpart in file
+../automatic.c under the identifier named "short_aliases".
+
+This gives for example for:
+
+ automatic=method:nfs,network:static,ip:192.168.1.24,server:192.168.1.7,directory:/stable/i586
+==>
+ automatic=met:nfs,net:static,ip:192.168.1.24,ser:192.168.1.7,dir:/stable/i586
+
+