-
Notifications
You must be signed in to change notification settings - Fork 34
/
dsl.ycp
69 lines (57 loc) · 1.69 KB
/
dsl.ycp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/**
* File: clients/dsl.ycp
* Package: Network configuration
* Summary: DSL main file
* Authors: Michal Svec <msvec@suse.cz>
*
*
* Main file for DSL configuration.
* Uses all other files.
*/
{
textdomain "network";
/* The main () */
y2milestone("----------------------------------------");
y2milestone("DSL module started");
import "DSL";
import "GetInstArgs";
import "Mode";
import "CommandLine";
include "network/dsl/wizards.ycp";
/* is this proposal or not? */
boolean propose = false;
list args = WFM::Args();
if(size(args) > 0) {
if(is(WFM::Args(0), path) && WFM::Args(0) == .propose) {
y2milestone("Using PROPOSE mode");
propose = true;
}
// Bugzilla #269890, CommanLine "support"
// argmap is only a map, CommandLine uses string parameters
if (size (GetInstArgs::argmap()) == 0 && size (WFM::Args()) > 0 && !propose) {
Mode::SetUI ("commandline");
y2milestone ("Mode CommandLine not supported, exiting...");
// TRANSLATORS: error message - the module does not provide command line interface
CommandLine::Print(_("There is no user interface available for this module."));
return nil;
}
if(is(WFM::Args(0), path) && WFM::Args(0) == .capiadsl) {
y2milestone("Using CAPI-ADSL mode");
DSL::capiadsl = nil;
if(size(args) > 1) DSL::capiadsl = (map) WFM::Args(1);
if(DSL::capiadsl == nil) DSL::capiadsl = $[];
}
else
y2error("Bad argument for modem: %1", WFM::Args(0));
}
/* main ui function */
any ret = nil;
if(propose) ret = DSLAutoSequence();
else ret = DSLSequence();
y2debug("ret == %1", ret);
/* Finish */
y2milestone("DSL module finished");
y2milestone("----------------------------------------");
return ret;
/* EOF */
}