[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [OSSTEST PATCH 2/3] ts-xen-install: nohcp: Invert sense of interfaces loop
We are going to want to process other kinds of lines too. So change this loop around by inverting the condition and not using "next". No functional change. Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> --- ts-xen-install | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ts-xen-install b/ts-xen-install index 70e90ed..c59fdd3 100755 --- a/ts-xen-install +++ b/ts-xen-install @@ -218,11 +218,13 @@ sub nodhcp () { # preread /etc/network/interfaces to figure out the interface my %candidates; while (<EI>) { - next unless + if ( m{^ \s* ( auto \s+ (\S+) ) \s* $}x || m{^ \s* ( allow-hotplug \s+ (\S+) ) \s* $}x || - m{^ \s* ( iface \s+ (\S+) \s+ inet \s+ ) }x ; - push @{ $candidates{$2} }, $1; + m{^ \s* ( iface \s+ (\S+) \s+ inet \s+ ) }x + ) { + push @{ $candidates{$2} }, $1; + } } EI->error and die $!; delete $candidates{'lo'}; -- 1.7.10.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |