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
/
x11_auto.ycp
< prev
next >
Wrap
Text File
|
2006-11-29
|
3KB
|
133 lines
/**************
FILE : x11_auto.ycp
***************
PROJECT : YaST2
:
AUTHOR : Marcus Schäfer <ms@suse.de>
:
BELONGS TO : YaST2
: (X11 integration part using SaX2/ISaX)
:
DESCRIPTION : Autoinstallation client dispatcher for
: X11 configuration.
:
:
STATUS : Development
**************/
/**
* File: autoyast/proposal/x11_auto.ycp
* Package: X11 Configuration
* Summary: X11 auto client
* Authors: Marcus Schaefer <ms@suse.de>
*
*/
{
textdomain "x11";
import "AutoinstX11";
include "x11/autoDialog.ycp";
y2milestone("X11 AutoInstall mode activated...");
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);
}
}
y2debug("func=%1", func);
y2debug("param=%1", param);
//=================================
// Import configuration
//---------------------------------
if (func == "Import") {
ret = AutoinstX11::Import(param);
}
//=================================
// Create a summary
//---------------------------------
else if (func == "Summary") {
ret = AutoinstX11::Summary();
}
//=================================
// Read configuration of running system
//---------------------------------
else if (func == "Read") {
ret = AutoinstX11::Read();
}
//=================================
// Change configuration
//---------------------------------
else if (func == "Change") {
ret = X11AutoSequence();
}
//=================================
// true if configuration has changed
//---------------------------------
else if (func == "GetModified") {
ret = AutoinstX11::GetModified();
}
//=================================
// Set configuration as modified
//---------------------------------
else if (func == "SetModified") {
AutoinstX11::SetModified();
}
//=================================
// Reset configuration
//---------------------------------
else if (func == "Reset") {
AutoinstX11::Import($[]);
ret = $[];
}
//=================================
// Return actual state
//---------------------------------
else if (func == "Export") {
ret = AutoinstX11::Export();
}
//=================================
// Return list of additional needed packages
//---------------------------------
else if (func == "Packages") {
ret = $[];
}
//=================================
// Write given settings
//---------------------------------
else if (func == "Write") {
ret = AutoinstX11::Write();
}
//=================================
// Unknown function
//---------------------------------
else {
y2error("Unknown function: %1", func);
ret = false;
}
y2debug("ret=%1", ret);
y2milestone("X11 AutoInstall mode done...");
return ret;
}