ACC SHELL
/**
* File:
* network_finish.ycp
*
* Module:
* Step of base installation finish
*
* Authors:
* Jiri Srain <jsrain@suse.cz>
*
* $Id: network_finish.ycp 55660 2009-02-20 20:39:50Z mzugec $
*
*/
{
textdomain "installation";
import "Installation";
import "ModulesConf";
import "Arch";
import "Linuxrc";
import "String";
import "NetworkService";
any ret = nil;
string func = "";
map param = $[];
/* Check arguments */
if(size(WFM::Args()) > 0 && is(WFM::Args(0), string)) {
func = (string)WFM::Args(0);
if(size(WFM::Args()) > 1 && is(WFM::Args(1), map))
param = (map)WFM::Args(1);
}
y2milestone ("starting network_finish");
y2debug("func=%1", func);
y2debug("param=%1", param);
if (func == "Info")
{
return (any)$[
"steps" : 1,
// progress step title
"title" : _("Saving network configuration..."),
"when" : [ `installation, `update, `autoinst ]
];
}
else if (func == "Write")
{
// if network running, write network configuration
// also in case of IPv6 (bnc#477917)
if (NetworkService::isNetworkRunning() || NetworkService::isNetworkv6Running())
{
y2milestone("Save network configuration");
WFM::CallFunction ("save_network");
ModulesConf::RunDepmod (false);
}
}
else
{
y2error ("unknown function: %1", func);
ret = nil;
}
y2debug("ret=%1", ret);
y2milestone("network_finish finished");
return ret;
} /* EOF */
ACC SHELL 2018