mirror of
https://github.com/samba-team/samba.git
synced 2025-03-26 18:50:30 +03:00
Eventscripts - fix 10.interface bash incompatibility.
In dash, this fails gracefully with nothing to stderr: t=$(cat /does_not_exist) 2>/dev/null In bash the error from cat is still printed due to different order of evaluation. This works everywhere: t=$(cat /does_not_exist 2>/dev/null) Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit a6e61867c7a58d5a77cd8641d8df0b105cddff77)
This commit is contained in:
parent
65d5c51278
commit
4e60075228
@ -44,7 +44,7 @@ monitor_interfaces()
|
||||
# When we use VLANs for bond interfaces, there will only
|
||||
# be an entry in /proc for the underlying real interface
|
||||
REALIFACE=`echo $IFACE |sed -e 's/\..*$//'`
|
||||
bi=$(get_proc "net/bonding/$REALIFACE") 2>/dev/null && {
|
||||
bi=$(get_proc "net/bonding/$REALIFACE" 2>/dev/null) && {
|
||||
echo "$bi" | grep -q 'Currently Active Slave: None' && {
|
||||
echo "ERROR: No active slaves for bond device $REALIFACE"
|
||||
fail=1
|
||||
|
Loading…
x
Reference in New Issue
Block a user