Author: kmachalkova Date: Thu Dec 4 14:24:03 2008 New Revision: 53873 URL: http://svn.opensuse.org/viewcvs/yast?rev=53873&view=rev Log: if netconfig's ntp_policy can't be read (e.g. in inst-sys), set 'auto' as safe default (#449362) Modified: trunk/ntp-client/src/NtpClient.ycp Modified: trunk/ntp-client/src/NtpClient.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/ntp-client/src/NtpClient.ycp?rev=53873&r1=53872&r2=53873&view=diff ============================================================================== --- trunk/ntp-client/src/NtpClient.ycp (original) +++ trunk/ntp-client/src/NtpClient.ycp Thu Dec 4 14:24:03 2008 @@ -80,7 +80,7 @@ * FIXME get a public URL * https://svn.suse.de/svn/sysconfig/branches/mt/dhcp6-netconfig/netconfig/doc/... */ -global string ntp_policy = ""; +global string ntp_policy = "auto"; /** @@ -451,7 +451,11 @@ NetworkInterfaces::Read (); Progress::set (progress_orig); - ntp_policy = (string)SCR::Read (.sysconfig.network.config.NETCONFIG_NTP_POLICY); + //SCR::Read may return nil (no such value in sysconfig, file not there etc. ) + string policy = (string)SCR::Read (.sysconfig.network.config.NETCONFIG_NTP_POLICY); + //set if not nil, otherwise use 'auto' as safe fallback (#449362) + if (policy != nil) + ntp_policy = policy; GetNtpServers (); GetCountryNames (); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org