diff options
author | Martin Schwenke <martin@meltin.net> | 2011-08-10 16:06:26 +1000 |
---|---|---|
committer | Martin Schwenke <martin@meltin.net> | 2011-08-10 16:06:26 +1000 |
commit | 4e60075228f205126e39c4de8cb47aa779282abe (patch) | |
tree | 01be4c54b8a28981d7aa87d6b170f82ac1d41762 | |
parent | 65d5c512784ab300fd6832f15441302a7362a69a (diff) | |
download | samba-4e60075228f205126e39c4de8cb47aa779282abe.tar.gz samba-4e60075228f205126e39c4de8cb47aa779282abe.tar.xz samba-4e60075228f205126e39c4de8cb47aa779282abe.zip |
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)
-rwxr-xr-x | ctdb/config/events.d/10.interface | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ctdb/config/events.d/10.interface b/ctdb/config/events.d/10.interface index b912ab3dc8..baf317166f 100755 --- a/ctdb/config/events.d/10.interface +++ b/ctdb/config/events.d/10.interface @@ -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 |