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
/
bootloader_auto.ycp
< prev
next >
Wrap
Text File
|
2006-11-29
|
3KB
|
128 lines
/**
* File:
* bootloader_auto.ycp
*
* Module:
* Bootloader installation and configuration
*
* Summary:
* Bootloader autoinstallation preparation
*
* Authors:
* Jiri Srain <jsrain@suse.cz>
*
* $Id: bootloader_auto.ycp 24249 2005-07-22 08:18:24Z jsrain $
*
*/
{
textdomain "bootloader";
y2milestone("----------------------------------------");
y2milestone("bootloader auto started");
import "Bootloader";
import "BootCommon";
import "Initrd";
import "Progress";
import "Mode";
include "bootloader/routines/autoinstall.ycp";
include "bootloader/routines/wizards.ycp";
boolean progress_orig = Progress::set (false);
any ret = nil;
string func = "";
map param = $[];
/* Check arguments */
if(size((list)WFM::Args()) > 0 && is(WFM::Args(0), string)) {
func = (string)WFM::Args(0);
if(size((list)WFM::Args()) > 1 && is(WFM::Args(1), map))
param = (map)WFM::Args(1);
}
y2debug("func=%1", func);
y2debug("param=%1", param);
if(func == "Import")
{
ret = Bootloader::Import(AI2Export ((map<string,any>)param));
}
/**
* Create a summary
* return string
*/
else if(func == "Summary") {
ret = "<UL>"
+ mergestring (maplist (string l, Bootloader::Summary(),
``("<LI>" + l)),
"\n")
+ "</UL>";
}
/**
* did configuration changed
* return boolean
*/
else if (func == "GetModified") {
ret = BootCommon::changed;
}
/**
* set configuration as changed
* return boolean
*/
else if (func == "SetModified") {
BootCommon::changed = true;
ret = true;
}
/**
* Reset configuration
* return map or list
*/
else if (func == "Reset") {
Bootloader::Reset();
ret = ($[]);
}
/**
* Change configuration
* return symbol (i.e. `finish || `accept || `next || `cancel || `abort)
*/
else if (func == "Change") {
ret = BootloaderAutoSequence ();
return ret;
}
/**
* Return configuration data
* return map or list
*/
else if (func == "Export") {
ret = Export2AI ((map<string,any>)Bootloader::Export());
}
/**
* Write configuration data
* return boolean
*/
else if (func == "Write") {
ret = Bootloader::Write();
}
else if (func == "Read") {
Initrd::Read ();
ret = Bootloader::Read();
}
/* unknown function */
else {
y2error("unknown function: %1", func);
ret = false;
}
Progress::set (progress_orig);
y2debug("ret=%1", ret);
y2milestone("bootloader_auto finished");
y2milestone("----------------------------------------");
return ret;
/* EOF */
}