mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-21 10:18:58 +02:00
Correct bridge detection and 'qt' implementation
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
fc754040d5
commit
565fb74795
@ -1140,6 +1140,32 @@ sub warning_message
|
|||||||
$| = 0; #Re-allow output buffering
|
$| = 0; #Re-allow output buffering
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Q[uie]t version of system(). Returns true for success
|
||||||
|
#
|
||||||
|
sub qt( $ ) {
|
||||||
|
if ( $debug ) {
|
||||||
|
print "SYS----> @_\n";
|
||||||
|
system( "@_ 2>&1 < /dev/null" ) == 0;
|
||||||
|
} else {
|
||||||
|
system( "@_ > /dev/null 2>&1 < /dev/null" ) == 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sub qt0( $ ) {
|
||||||
|
if ( $debug ) {
|
||||||
|
print "SYS----> @_\n";
|
||||||
|
system( "@_ 2>&1 < /dev/null" );
|
||||||
|
} else {
|
||||||
|
system( "@_ > /dev/null 2>&1 < /dev/null" );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sub qt1( $ ) {
|
||||||
|
1 while qt0( "@_" ) == 4;
|
||||||
|
$? == 0;
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Delete the test chains
|
# Delete the test chains
|
||||||
#
|
#
|
||||||
@ -3568,23 +3594,6 @@ sub load_kernel_modules( ) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
|
||||||
# Q[uie]t version of system(). Returns true for success
|
|
||||||
#
|
|
||||||
sub qt( $ ) {
|
|
||||||
if ( $debug ) {
|
|
||||||
print "SYS----> @_\n";
|
|
||||||
system( "@_ 2>&1" ) == 0;
|
|
||||||
} else {
|
|
||||||
system( "@_ > /dev/null 2>&1 < /dev/null" ) == 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
sub qt1( $ ) {
|
|
||||||
1 while qt( "@_" ) == 4;
|
|
||||||
$? == 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Get the current kernel version
|
# Get the current kernel version
|
||||||
#
|
#
|
||||||
|
@ -965,7 +965,7 @@ sub local_zones() {
|
|||||||
# Determine if the passed physical device is a bridge
|
# Determine if the passed physical device is a bridge
|
||||||
#
|
#
|
||||||
sub is_a_bridge( $ ) {
|
sub is_a_bridge( $ ) {
|
||||||
which 'brctl' && qt( "brctl show | tail -n+2 | grep -q '^$_[0]\[\[:space:\]\]'" );
|
which 'brctl' && system( "brctl show < /dev/null | tail -n+2 | grep -q '^$_[0]\[\[:space:\]\]' > /dev/null" ) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user