[PATCH] In dracut, do not display a warning for network lines with just a hostname.

Brian C. Lane bcl at redhat.com
Tue May 12 15:55:42 UTC 2015


On Tue, May 12, 2015 at 09:49:20AM -0400, Chris Lumens wrote:
> We define the hostname for the system with a line like "network --hostname=",
> with no device provided.  The rest of anaconda and pykickstart are okay with
> this, but parse-kickstart is not.
> 
> Resolves: rhbz#1201512
> ---
>  dracut/parse-kickstart | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/dracut/parse-kickstart b/dracut/parse-kickstart
> index f366155..7d2371c 100755
> --- a/dracut/parse-kickstart
> +++ b/dracut/parse-kickstart
> @@ -153,11 +153,12 @@ class Network(commands.network.F22_Network):
>          '''
>          netline = None
>  
> +        # Setting only hostname in kickstart
> +        if not net.device and net.hostname and not self.handler.ksdevice:
> +            return None
> +
>          # first 'network' line
>          if len(self.network) == 1:
> -            # Setting only hostname in kickstart
> -            if not net.device and net.hostname and not self.handler.ksdevice:
> -                return None
>              net.activate = True
>              if net.device == "link" or not net.device:
>                  # NOTE: this might still be empty (e.g. 'ks=file:...')
> -- 
> 2.2.2

Ack

-- 
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)


More information about the anaconda-patches mailing list