On Thu, Feb 07, 2013 at 11:42:01AM +0100, Vratislav Podzimek wrote:
On Wed, 2013-02-06 at 16:26 -0800, Brian C. Lane wrote:
> From: "Brian C. Lane" <bcl(a)redhat.com>
> # setup ntp servers and start NTP daemon if not requested otherwise
> - if (not flags.imageInstall) and anaconda.ksdata.timezone.ntpservers:
> - ntp.save_servers_to_config(anaconda.ksdata.timezone.ntpservers)
> + if not flags.imageInstall and not flags.dirInstall:
> + if anaconda.ksdata.timezone.ntpservers:
> + ntp.save_servers_to_config(anaconda.ksdata.timezone.ntpservers)
I think using 'and \' is better than using two ifs as it saves
indentation (which is good especially in this case of a long line
indented).
Actually, that was on purpose, it makes the following block easier to
read. note that the complete section now looks like:
if not flags.imageInstall and not flags.dirInstall:
if anaconda.ksdata.timezone.ntpservers:
ntp.save_servers_to_config(anaconda.ksdata.timezone.ntpservers)
if not anaconda.ksdata.timezone.nontp:
iutil.start_service("chronyd")
It would be redundant to repeat the test for the chronyd check which is now included in
the block.
Also I believe pyanaconda.flags.can_touch_runtime_system should be
patched.
I think you're right. For some reason I was thinking that would cover too much but I
think it would be ok.
So I'd replace the above *Install checks with can_touch_runtime. I'll
send an intermediate patch that will get squashed into the final one.
--
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)