[PATCH 1/2] Set hostname when leaving network spokes

Brian C. Lane bcl at redhat.com
Tue Sep 10 18:39:06 UTC 2013


On Tue, Sep 10, 2013 at 11:56:55AM +0200, Vratislav Podzimek wrote:
> Related: rhbz#972362
> 
> Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
> ---
>  pyanaconda/ui/gui/spokes/network.py | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/pyanaconda/ui/gui/spokes/network.py b/pyanaconda/ui/gui/spokes/network.py
> index 43d12e1..2e80a3c 100644
> --- a/pyanaconda/ui/gui/spokes/network.py
> +++ b/pyanaconda/ui/gui/spokes/network.py
> @@ -1275,6 +1275,10 @@ class NetworkSpoke(FirstbootSpokeMixIn, NormalSpoke):
>          log.debug("network: apply ksdata %s", self.data.network)
>          self.network_control_box.kill_nmce(msg="leaving network spoke")
>  
> +    def execute(self):
> +        # update system's hostname
> +        network.set_hostname(self.data.network.hostname)
> +
>      @property
>      def completed(self):
>          # TODO: check also if source requires updates when implemented
> @@ -1436,6 +1440,10 @@ class NetworkStandaloneSpoke(StandaloneSpoke):
>  
>          self.network_control_box.kill_nmce(msg="leaving standalone network spoke")
>  
> +    def execute(self):
> +        # update system's hostname
> +        network.set_hostname(self.data.network.hostname)
> +
>      @property
>      def completed(self):
>          return (not can_touch_runtime_system("require network connection")
> -- 
> 1.7.11.7

I noticed that set_hostname is only blocking hostname setting on image
installs. It also needs to make sure it doesn't set it for dirinstall
since that could also be on a host not related to the target.


-- 
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 482 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/anaconda-patches/attachments/20130910/1a8f185d/attachment-0001.sig>


More information about the anaconda-patches mailing list