home *** CD-ROM | disk | FTP | other *** search
- /**
- * 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;
- }
- }
-