From d52409dd952ea7047eadd6524bf5681072802436 Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Mon, 11 Jul 2016 15:04:16 +1000 Subject: [PATCH] ctdb-scripts: Drop use of ctdb_standard_event_handler() It doesn't do anything. Add a comment to its definition to explain why it is still there. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- ctdb/config/events.d/00.ctdb | 4 ---- ctdb/config/events.d/01.reclock | 4 ---- ctdb/config/events.d/05.system | 4 ---- ctdb/config/events.d/10.interface | 3 --- ctdb/config/events.d/11.natgw | 4 ---- ctdb/config/events.d/11.routing | 4 ---- ctdb/config/events.d/13.per_ip_routing | 4 ---- ctdb/config/events.d/20.multipathd | 4 ---- ctdb/config/events.d/31.clamd | 4 ---- ctdb/config/events.d/40.vsftpd | 4 ---- ctdb/config/events.d/41.httpd | 4 ---- ctdb/config/events.d/49.winbind | 4 ---- ctdb/config/events.d/50.samba | 4 ---- ctdb/config/events.d/60.nfs | 4 ---- ctdb/config/events.d/70.iscsi | 4 ---- ctdb/config/events.d/99.timeout | 5 ----- ctdb/config/functions | 2 ++ 17 files changed, 2 insertions(+), 64 deletions(-) diff --git a/ctdb/config/events.d/00.ctdb b/ctdb/config/events.d/00.ctdb index d7b238f87a3..c4d98a29cf7 100755 --- a/ctdb/config/events.d/00.ctdb +++ b/ctdb/config/events.d/00.ctdb @@ -142,10 +142,6 @@ case "$1" in startup) $CTDB attach ctdb.tdb persistent ;; - - *) - ctdb_standard_event_handler "$@" - ;; esac # all OK diff --git a/ctdb/config/events.d/01.reclock b/ctdb/config/events.d/01.reclock index 52e65b98466..0377ca4c847 100755 --- a/ctdb/config/events.d/01.reclock +++ b/ctdb/config/events.d/01.reclock @@ -47,10 +47,6 @@ case "$1" in ctdb_check_counter "error" -gt 3 ;; - - *) - ctdb_standard_event_handler "$@" - ;; esac exit 0 diff --git a/ctdb/config/events.d/05.system b/ctdb/config/events.d/05.system index 2dbfca52ba7..38e40276bf2 100755 --- a/ctdb/config/events.d/05.system +++ b/ctdb/config/events.d/05.system @@ -168,10 +168,6 @@ case "$1" in monitor_filesystem_usage monitor_memory_usage ;; - - *) - ctdb_standard_event_handler "$@" - ;; esac exit 0 diff --git a/ctdb/config/events.d/10.interface b/ctdb/config/events.d/10.interface index 9b9a8cdb6b9..57baba7c4ff 100755 --- a/ctdb/config/events.d/10.interface +++ b/ctdb/config/events.d/10.interface @@ -246,9 +246,6 @@ case "$1" in monitor) monitor_interfaces || exit 1 ;; - *) - ctdb_standard_event_handler "$@" - ;; esac exit 0 diff --git a/ctdb/config/events.d/11.natgw b/ctdb/config/events.d/11.natgw index 04eea81b43d..9fdf93f2887 100755 --- a/ctdb/config/events.d/11.natgw +++ b/ctdb/config/events.d/11.natgw @@ -238,10 +238,6 @@ case "$1" in interface_monitor "$CTDB_NATGW_PUBLIC_IFACE" || exit 1 fi ;; - - *) - ctdb_standard_event_handler "@" - ;; esac exit 0 diff --git a/ctdb/config/events.d/11.routing b/ctdb/config/events.d/11.routing index 87c0027124b..941a7a8f131 100755 --- a/ctdb/config/events.d/11.routing +++ b/ctdb/config/events.d/11.routing @@ -44,10 +44,6 @@ case "$1" in fi done <"${CTDB_BASE}/static-routes" ;; - - *) - ctdb_standard_event_handler "$@" - ;; esac exit 0 diff --git a/ctdb/config/events.d/13.per_ip_routing b/ctdb/config/events.d/13.per_ip_routing index 20f9085383e..34bbf7f332a 100755 --- a/ctdb/config/events.d/13.per_ip_routing +++ b/ctdb/config/events.d/13.per_ip_routing @@ -415,10 +415,6 @@ case "$1" in add_missing_routes remove_bogus_routes ;; - - *) - ctdb_standard_event_handler "$@" - ;; esac exit 0 diff --git a/ctdb/config/events.d/20.multipathd b/ctdb/config/events.d/20.multipathd index b5f71e55630..c16c24cf335 100755 --- a/ctdb/config/events.d/20.multipathd +++ b/ctdb/config/events.d/20.multipathd @@ -75,10 +75,6 @@ case "$1" in monitor) multipathd_check || die "multipath monitoring failed" ;; - - *) - ctdb_standard_event_handler "$@" - ;; esac exit 0 diff --git a/ctdb/config/events.d/31.clamd b/ctdb/config/events.d/31.clamd index 2e5eefea251..22b11b8f851 100755 --- a/ctdb/config/events.d/31.clamd +++ b/ctdb/config/events.d/31.clamd @@ -43,10 +43,6 @@ case "$1" in monitor) ctdb_check_unix_socket ${CTDB_CLAMD_SOCKET} || exit $? ;; - - *) - ctdb_standard_event_handler "$@" - ;; esac exit 0 diff --git a/ctdb/config/events.d/40.vsftpd b/ctdb/config/events.d/40.vsftpd index c1f193bcf8e..5f2f44a79ad 100755 --- a/ctdb/config/events.d/40.vsftpd +++ b/ctdb/config/events.d/40.vsftpd @@ -59,10 +59,6 @@ case "$1" in fi fi ;; - - *) - ctdb_standard_event_handler "$@" - ;; esac exit 0 diff --git a/ctdb/config/events.d/41.httpd b/ctdb/config/events.d/41.httpd index 6c70d1f2edb..9fb75072254 100755 --- a/ctdb/config/events.d/41.httpd +++ b/ctdb/config/events.d/41.httpd @@ -76,10 +76,6 @@ case "$1" in } fi ;; - - *) - ctdb_standard_event_handler "$@" - ;; esac exit 0 diff --git a/ctdb/config/events.d/49.winbind b/ctdb/config/events.d/49.winbind index da04546b1f4..db93fafc160 100755 --- a/ctdb/config/events.d/49.winbind +++ b/ctdb/config/events.d/49.winbind @@ -52,10 +52,6 @@ case "$1" in monitor) ctdb_check_command wbinfo -p ;; - - *) - ctdb_standard_event_handler "$@" - ;; esac exit 0 diff --git a/ctdb/config/events.d/50.samba b/ctdb/config/events.d/50.samba index 7c3a804475f..ee4033f1c44 100755 --- a/ctdb/config/events.d/50.samba +++ b/ctdb/config/events.d/50.samba @@ -180,10 +180,6 @@ case "$1" in testparm_background_update 10 fi ;; - - *) - ctdb_standard_event_handler "$@" - ;; esac exit 0 diff --git a/ctdb/config/events.d/60.nfs b/ctdb/config/events.d/60.nfs index 249b2262179..e5d87424ce6 100755 --- a/ctdb/config/events.d/60.nfs +++ b/ctdb/config/events.d/60.nfs @@ -280,10 +280,6 @@ case "$1" in nfs_callout "monitor-post" || exit $? ;; - - *) - ctdb_standard_event_handler "$@" - ;; esac exit 0 diff --git a/ctdb/config/events.d/70.iscsi b/ctdb/config/events.d/70.iscsi index 2d9e4a64fa1..8c3f712b28d 100755 --- a/ctdb/config/events.d/70.iscsi +++ b/ctdb/config/events.d/70.iscsi @@ -82,10 +82,6 @@ EOF monitor) ctdb_check_tcp_ports 3260 || exit $? ;; - - *) - ctdb_standard_event_handler "$@" - ;; esac exit 0 diff --git a/ctdb/config/events.d/99.timeout b/ctdb/config/events.d/99.timeout index 7c226d6566b..2c70599d25c 100755 --- a/ctdb/config/events.d/99.timeout +++ b/ctdb/config/events.d/99.timeout @@ -19,11 +19,6 @@ case "$1" in echo "sleeping for $((TIMEOUT * 2)) seconds..." sleep $((TIMEOUT * 2)) ;; - - - *) - ctdb_standard_event_handler "$@" - ;; esac exit 0 diff --git a/ctdb/config/functions b/ctdb/config/functions index 8f0b790983c..9b4e479c631 100755 --- a/ctdb/config/functions +++ b/ctdb/config/functions @@ -1127,6 +1127,8 @@ service_stop () ################################################################## +# This exists only for backward compatibility with 3rd party scripts +# that call it ctdb_standard_event_handler () { : -- 2.11.4.GIT