[PATCH] use can_touch_runtime_system fix

Vratislav Podzimek vpodzime at redhat.com
Fri Feb 8 11:00:39 UTC 2013


On Thu, 2013-02-07 at 11:56 -0800, Brian C. Lane wrote:
> From: "Brian C. Lane" <bcl at redhat.com>
> 
> ---
>  anaconda            | 5 ++---
>  pyanaconda/flags.py | 4 ++++
>  2 files changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/anaconda b/anaconda
> index 8e32b87..a294d5b 100755
> --- a/anaconda
> +++ b/anaconda
> @@ -791,8 +791,7 @@ if __name__ == "__main__":
>      flags.mpath = opts.mpath
>      flags.selinux = opts.selinux
>  
> -    if not flags.livecdInstall and not flags.imageInstall \
> -      and not flags.dirInstall:
> +    if flags.can_touch_runtime_system("start audit daemon"):
>          startAuditDaemon()
>  
>      # setup links required for all install types
> @@ -989,7 +988,7 @@ if __name__ == "__main__":
>      atexit.register(exitHandler, ksdata.reboot, anaconda.storage)
>  
>      # setup ntp servers and start NTP daemon if not requested otherwise
> -    if not flags.imageInstall and not flags.dirInstall:
> +    if flags.can_touch_runtime_system("start chronyd"):
>          if anaconda.ksdata.timezone.ntpservers:
>              ntp.save_servers_to_config(anaconda.ksdata.timezone.ntpservers)
>  
> diff --git a/pyanaconda/flags.py b/pyanaconda/flags.py
> index 8d24d13..7fb3a78 100644
> --- a/pyanaconda/flags.py
> +++ b/pyanaconda/flags.py
> @@ -191,6 +191,10 @@ def can_touch_runtime_system(msg):
>          log.info("Not doing '%s' in image installation" % msg)
>          return False
>  
> +    if flags.dirInstall:
> +        log.info("Not doing '%s' in directory installation" % msg)
> +        return False
> +
>      if flags.testing:
>          log.info("Not doing '%s', because we are just testing" % msg)
>          return False
Looks good to me. Just to be clear, we are not thinking about directory
installations from the booted iso or from PXE, right?

-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic



More information about the anaconda-patches mailing list