mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
Eventscripts: 11.natgw $CTDB_NATGW_PUBLIC_IP splitting optimisation
$CTDB_NATGW_PUBLIC_IP can be split into $_ip and $_maskbits without forking lots of processes. Also "local" isn't supported by POSIX. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit e20fdb974158061f4627d6f360c168d764690e6f)
This commit is contained in:
parent
f2339da878
commit
c0b7fbf2a4
@ -18,8 +18,8 @@ else
|
||||
fi
|
||||
|
||||
delete_all() {
|
||||
local _ip=`echo $CTDB_NATGW_PUBLIC_IP | cut -d '/' -f1`
|
||||
local _maskbits=`echo $CTDB_NATGW_PUBLIC_IP | cut -d '/' -f2`
|
||||
_ip="${CTDB_NATGW_PUBLIC_IP%/*}"
|
||||
_maskbits="${CTDB_NATGW_PUBLIC_IP#*/}"
|
||||
|
||||
[ -z "$CTDB_NATGW_PUBLIC_IFACE" ] || {
|
||||
delete_ip_from_iface $CTDB_NATGW_PUBLIC_IFACE $_ip $_maskbits 2>/dev/null
|
||||
|
Loading…
Reference in New Issue
Block a user