-
- my $dir = "/sys/class/net/$bridge/brif";
-
- #check if we have an only one ethX or bondX interface in the bridge
-
- my $iface;
- PVE::Tools::dir_glob_foreach($dir, '((eth|bond)\d+)', sub {
- my ($slave) = @_;
-
- die "more then one physical interfaces on bridge '$bridge'\n" if $iface;
- $iface = $slave;
-
- });
-
- die "no physical interface on bridge '$bridge'\n" if !$iface;
-