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
/
modules
/
AutoinstImage.ycp
< prev
next >
Wrap
Text File
|
2006-11-29
|
1KB
|
44 lines
/**
* File: modules/AutoinstImage.ycp
* Package: Auto-installation
* Summary: Process Auto-Installation Images
* Author: Uwe Gansert <uwe.gansert@suse.de>
*
* $Id: AutoinstImage.ycp 33269 2006-10-09 08:22:24Z ug $
*/
{
module "AutoinstImage";
textdomain "autoinst";
import "Progress";
import "AutoinstConfig";
import "URL";
import "AutoinstSoftware";
include "autoinstall/io.ycp";
global define boolean getScript() {
boolean ret = false;
if( AutoinstSoftware::image["script_location"]:"" != "" ) {
map urltok = $[];
urltok = URL::Parse (AutoinstSoftware::image["script_location"]:"");
string scheme = urltok["scheme"]:"default";
string host = urltok["host"]:"";
string filepath = urltok["path"]:"";
ret = Get(scheme,host,filepath, AutoinstConfig::scripts_dir+"/image.sh");
} else if( AutoinstSoftware::image["script_source"]:"" != "" ) {
SCR::Write(.target.string, AutoinstConfig::scripts_dir+"/image.sh", AutoinstSoftware::image["script_source"]:"");
ret = true;
}
return ret;
}
global define boolean runScript() {
SCR::Execute(.target.bash, "/bin/sh /tmp/image.sh" );
return true;
}
}