home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2007 January, February, March & April
/
Chip-Cover-CD-2007-02.iso
/
boot
/
i386
/
root
/
usr
/
share
/
YaST2
/
clients
/
proxy_finish.ycp
< prev
next >
Wrap
Text File
|
2006-11-29
|
2KB
|
78 lines
/**
* File:
* proxy_finish.ycp
*
* Module:
* Step of base installation finish
*
* Authors:
* Jiri Srain <jsrain@suse.cz>
*
* $Id: proxy_finish.ycp 27936 2006-02-13 20:01:14Z olh $
*
*/
{
textdomain "installation";
import "Stage";
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 proxy_finish");
y2debug("func=%1", func);
y2debug("param=%1", param);
if (func == "Info")
{
return (any)$[
"steps" : 1,
// progress step title
"title" : _("Saving proxy configuration..."),
"when" : [ `installation, `update, `autoinst ],
];
}
else if (func == "Write")
{
if (Stage::initial ())
{
string proxy = (string) SCR::Read (.etc.install_inf.Proxy);
string proxyport = (string) SCR::Read (.etc.install_inf.ProxyPort);
string proxyproto = (string) SCR::Read (.etc.install_inf.ProxyProto);
if (proxy != nil && proxyport != nil && proxyproto != nil)
{
string fullproxy = proxyproto + "://" + proxy + ":" + proxyport + "/";
y2milestone ("setting proxy to %1", fullproxy);
// maybe use Proxy module
SCR::Write (.sysconfig.proxy.HTTP_PROXY, fullproxy);
SCR::Write (.sysconfig.proxy.FTP_PROXY, fullproxy);
SCR::Write (.sysconfig.proxy, nil);
}
}
}
else
{
y2error ("unknown function: %1", func);
ret = nil;
}
y2debug("ret=%1", ret);
y2milestone("proxy_finish finished");
return ret;
} /* EOF */