From 83cdc52dea9886e6c24683d2f3adc73ba511089c Mon Sep 17 00:00:00 2001 From: Alexander Bluhm Date: Fri, 19 Apr 2024 22:43:22 +0200 Subject: [PATCH] Net defaults to all interfaces. --- net.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net.pl b/net.pl index 5ad6c86..54e5a1b 100755 --- a/net.pl +++ b/net.pl @@ -71,7 +71,7 @@ $cvsdate = strftime("%FT%TZ", gmtime($cd)); } my $patch = $opts{P}; -my $iface = $opts{i}; +my $iface = $opts{i} || "all"; my $modify = $opts{m}; my $pseudo = $opts{c}; my $repeat = $opts{N}; @@ -214,7 +214,7 @@ END grep { $_ eq $iftype } @allifaces or die "Unknown interface '$if'"; unless (grep { /^$iftype\d+ at / } @dmesg) { - if ($opts{i} eq "all") { + if (!$opts{i} || $opts{i} eq "all") { next; } else { die "Interface type '$if' does not exist in dmesg";