From 0eb757329e7d9932ee35d5e5d658fd93794ac901 Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Thu, 3 Jan 2013 15:07:07 +1100 Subject: [PATCH] scripts: Move drop_all_public_ips() to the functions file ... so it can be improved and used elsewhere. Signed-off-by: Martin Schwenke (This used to be ctdb commit b23c30253cc9eb274b895cac0f8c65245ba0a200) --- ctdb/config/ctdb.init | 6 ------ ctdb/config/functions | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ctdb/config/ctdb.init b/ctdb/config/ctdb.init index 85c17285227..9f9b6865e7c 100755 --- a/ctdb/config/ctdb.init +++ b/ctdb/config/ctdb.init @@ -219,12 +219,6 @@ wait_until_ready () { ctdbd=${CTDBD:-/usr/sbin/ctdbd} -drop_all_public_ips() { - while read _ip _iface _rest; do - ip addr del $_ip dev $_iface >/dev/null 2>&1 - done <"${CTDB_PUBLIC_ADDRESSES:-/dev/null}" -} - start() { echo -n $"Starting ctdbd service: " diff --git a/ctdb/config/functions b/ctdb/config/functions index 330d0579854..f27dccf4e98 100755 --- a/ctdb/config/functions +++ b/ctdb/config/functions @@ -939,6 +939,12 @@ delete_ip_from_iface() # and doing anything here will affect the return code. } +drop_all_public_ips() { + while read _ip _iface _rest; do + ip addr del $_ip dev $_iface >/dev/null 2>&1 + done <"${CTDB_PUBLIC_ADDRESSES:-/dev/null}" +} + ######################################################## # some simple logic for counting events - per eventscript # usage: ctdb_counter_init