1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-22 02:50:28 +03:00

Initscript: clean up drop_all_public_ips()

This makes the case implicit where $CTDB_PUBLIC_ADDRESSES is unset.
This is OK because that's not an interesting code path.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 5b2725d1ae052e848c2487cb10c5393a877d118c)
This commit is contained in:
Martin Schwenke 2012-07-17 15:45:45 +10:00 committed by Amitay Isaacs
parent a90f6d7cd1
commit 748c3d7eb6

View File

@ -244,13 +244,9 @@ wait_until_ready () {
ctdbd=${CTDBD:-/usr/sbin/ctdbd}
drop_all_public_ips() {
[ -z "$CTDB_PUBLIC_ADDRESSES" ] && {
return
}
cat $CTDB_PUBLIC_ADDRESSES | while read IP IFACE REST; do
ip addr del $IP dev $IFACE >/dev/null 2>/dev/null
done
while read _ip _iface _rest; do
ip addr del $_ip dev $_iface >/dev/null 2>&1
done <"${CTDB_PUBLIC_ADDRESSES:-/dev/null}"
}
start() {