[yast-commit] r40696 - in /trunk/installation: VERSION package/yast2-installation.changes src/clients/inst_network_setup.ycp yast2-installation.spec.in
Author: locilka Date: Mon Sep 3 13:37:51 2007 New Revision: 40696 URL: http://svn.opensuse.org/viewcvs/yast?rev=40696&view=rev Log: - Creating symlinks to .curlrc and .wgetrc files from the root. - Adjusting RPM dependencies (yast2-core, new builtin 'setenv'). - Adjusting ENV variables with proxy settings (all three #305163). - Writing also proxy setting into Install.inf (#298001#c5). - 2.15.46 Modified: trunk/installation/VERSION trunk/installation/package/yast2-installation.changes trunk/installation/src/clients/inst_network_setup.ycp trunk/installation/yast2-installation.spec.in Modified: trunk/installation/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/VERSION?rev=40696&r1=40695&r2=40696&view=diff ============================================================================== --- trunk/installation/VERSION (original) +++ trunk/installation/VERSION Mon Sep 3 13:37:51 2007 @@ -1 +1 @@ -2.15.45 +2.15.46 Modified: trunk/installation/package/yast2-installation.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/package/yast2-installation.changes?rev=40696&r1=40695&r2=40696&view=diff ============================================================================== --- trunk/installation/package/yast2-installation.changes (original) +++ trunk/installation/package/yast2-installation.changes Mon Sep 3 13:37:51 2007 @@ -1,4 +1,13 @@ ------------------------------------------------------------------- +Mon Sep 3 12:45:41 CEST 2007 - locilka@suse.cz + +- Creating symlinks to .curlrc and .wgetrc files from the root. +- Adjusting RPM dependencies (yast2-core, new builtin 'setenv'). +- Adjusting ENV variables with proxy settings (all three #305163). +- Writing also proxy setting into Install.inf (#298001#c5). +- 2.15.46 + +------------------------------------------------------------------- Fri Aug 31 16:26:07 CEST 2007 - locilka@suse.cz - Calling ntp_client_finish client at the end of the installation Modified: trunk/installation/src/clients/inst_network_setup.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/src/clients/inst_network_setup.ycp?rev=40696&r1=40695&r2=40696&view=diff ============================================================================== --- trunk/installation/src/clients/inst_network_setup.ycp (original) +++ trunk/installation/src/clients/inst_network_setup.ycp Mon Sep 3 13:37:51 2007 @@ -865,6 +865,22 @@ return true; } + + // Adjusts environment variables via new builtin 'setenv' + void SetEnvironmentVariables (map <string, any> env_proxy_variables) { +// map <string, any> env_proxy_variables = $[ +// "http_proxy" : proxy_server, +// "https_proxy" : proxy_server, +// "ftp_proxy" : proxy_server, +// "proxy_user" : proxy_user, +// "proxy_password" : proxy_pass, +// ]; + + setenv ("http_proxy", env_proxy_variables["http_proxy"]:""); + setenv ("HTTPS_PROXY", env_proxy_variables["https_proxy"]:""); + setenv ("FTP_PROXY", env_proxy_variables["ftp_proxy"]:""); + setenv ("NO_PROXY", "localhost, 127.0.0.1"); + } boolean Action_ProxySetup () { string tmp_sysconfig_dir = "/tmp/first_stage_network_setup/sysconfig/"; @@ -877,6 +893,12 @@ curlrc_file, SCR::Execute (.target.bash, sformat ("touch '%1'", String::Quote (curlrc_file))) ); + // symlink the correct location of the conf-file + // $HOME directory might be '/' in inst-sys + y2milestone ( + "Creating .curlrc symlink returned: %1", + SCR::Execute (.target.bash, sformat ("ln --symbolic --force '%1' '/.curlrc'", String::Quote (curlrc_file))) + ); } string wgetrc_file = "/root/.wgetrc"; @@ -886,6 +908,12 @@ wgetrc_file, SCR::Execute (.target.bash, sformat ("touch '%1'", String::Quote (wgetrc_file))) ); + // symlink the correct location of the conf-file + // $HOME directory might be '/' in inst-sys + y2milestone ( + "Creating .wgetrc symlink returned: %1", + SCR::Execute (.target.bash, sformat ("ln --symbolic --force '%1' '/.wgetrc'", String::Quote (wgetrc_file))) + ); } if (Stage::initial()) { @@ -944,6 +972,9 @@ Proxy::Write(); Progress::set (progress_orig); + // Bugzilla #305163 + SetEnvironmentVariables (import_proxy); + return true; } @@ -957,9 +988,9 @@ // Value must be set if (value == "" || value == nil) { y2warning ("Value for '%1' is '%2'", inst_inf_entry, value); - // Can be removed later + // Can contain username/passowrd } else { - y2milestone ("Writing %1=%2", inst_inf_entry, value); + y2debug ("Writing %1=%2", inst_inf_entry, value); } return SCR::Write (add (.etc.install_inf, inst_inf_entry), value); @@ -1038,6 +1069,42 @@ WriteInstallInfEntry ("NetUniqueID", hardware_information[netdevice,"unique_key"]:""); WriteInstallInfEntry ("HWAddr", hardware_information[netdevice,"hward"]:""); + if (network_settings["use_proxy"]:nil == true) { + string proxy_auth = ""; + + if (network_settings["proxy_user"]:"" != "" && network_settings["proxy_password"]:"" != "") { + proxy_auth = sformat ("%1:%2", + // escaping ":"s in username + mergestring (splitstring (network_settings["proxy_user"]:"", ":"), "\\:"), + // escaping ":"s in password + mergestring (splitstring (network_settings["proxy_password"]:"", ":"), "\\:") + ); + } + + string proxy_server = nil; + + // no proxy auth + if (proxy_auth == "") { + proxy_server = sformat ( + "http://%1:%2/", + network_settings["proxy_server"]:"", + network_settings["proxy_port"]:"" + ); + // write proxy auth as well + } else { + proxy_server = sformat ( + "http://%1@%2:%3/", + proxy_auth, + network_settings["proxy_server"]:"", + network_settings["proxy_port"]:"" + ); + } + + WriteInstallInfEntry ("Proxy", proxy_server); + } else { + WriteInstallInfEntry ("Proxy", nil); + } + // Flush the SCR agent cache to the disk SCR::Write (.etc.install_inf, nil); Modified: trunk/installation/yast2-installation.spec.in URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/yast2-installation.spec.in?rev=40696&r1=40695&r2=40696&view=diff ============================================================================== --- trunk/installation/yast2-installation.spec.in (original) +++ trunk/installation/yast2-installation.spec.in Mon Sep 3 13:37:51 2007 @@ -33,6 +33,10 @@ # needs NetworkService::isNetworkRunning() from yast2 Conflicts: yast2 < 2.15.35 +# New builtin setenv() +# Bugzilla #305163 +Conflicts: yast2-core <= 2.15.9 + # tar-gzip some system files and untar-ungzip them after the installation (FATE #300421, #120103) Requires: tar gzip -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
locilka@svn.opensuse.org