summaryrefslogtreecommitdiffstats
path: root/mdk-stage1
diff options
context:
space:
mode:
Diffstat (limited to 'mdk-stage1')
-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
+
+