Author: locilka Date: Thu Jun 11 15:58:01 2009 New Revision: 57537 URL: http://svn.opensuse.org/viewcvs/yast?rev=57537&view=rev Log: - Getting hostname info from /etc/HOSTNAME only if the file exists. Modified: trunk/yast2/library/types/src/Hostname.ycp trunk/yast2/package/yast2.changes Modified: trunk/yast2/library/types/src/Hostname.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/library/types/src/Hostname.ycp?rev=57537&r1=57536&r2=57537&view=diff ============================================================================== --- trunk/yast2/library/types/src/Hostname.ycp (original) +++ trunk/yast2/library/types/src/Hostname.ycp Thu Jun 11 15:58:01 2009 @@ -15,6 +15,7 @@ import "IP"; import "String"; +import "FileUtils"; /** * i18n characters in domain names are still not allowed @@ -144,7 +145,7 @@ map hostname_data = (map) SCR::Execute(.target.bash_output, "hostname --fqdn"); if (hostname_data == nil || hostname_data["exit"]:-1 != 0 ) { - fqhostname = (string) SCR::Read(.target.string, "/etc/HOSTNAME"); + fqhostname = (FileUtils::Exists ("/etc/HOSTNAME") ? (string) SCR::Read(.target.string, "/etc/HOSTNAME"):""); if ( fqhostname == "" || fqhostname == nil ) { Modified: trunk/yast2/package/yast2.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/package/yast2.changes?rev=57537&r1=57536&r2=57537&view=diff ============================================================================== --- trunk/yast2/package/yast2.changes (original) +++ trunk/yast2/package/yast2.changes Thu Jun 11 15:58:01 2009 @@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Thu Jun 11 15:55:55 CEST 2009 - jsrain@suse.cz + +- Getting hostname info from /etc/HOSTNAME only if the file exists. + +------------------------------------------------------------------- Wed Jun 3 12:25:28 CEST 2009 - jsrain@suse.cz - prefer Gtk front-end when running xfce (bnc#509121) -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org