[PATCH] Always ignore hostname-only network lines in kickstart (#968034)
David Shea
dshea at redhat.com
Mon Mar 3 19:25:24 UTC 2014
On 03/03/2014 02:07 PM, David Shea wrote:
> + # If the only argument is a hostname, skip this line
> + hostname_state = False
> + for arg in args[1:]:
> + # If this argument is --hostname without the '=', the hostname is the
> + # the next argument, so set the state to skip that one too
> + if arg == '--hostname':
> + hostname_state = True
> + elif hostname_state:
> + hostname_state = False
> + elif not arg.startswith('--hostname='):
> + break
> + else:
> + return None
It just occurred to me that a line containing only "network" is
perfectly valid, and if that's the first line would be (should be?)
accepted as equivalent to ip=dhcp. So let's pretend I wrapped this whole
block in "if args[1:]:"
More information about the anaconda-patches
mailing list