From: Martin Schwenke Date: Sat, 7 Jul 2018 10:06:47 +0000 (+1000) Subject: ctdb-scripts: Drop event script CTDB_MANAGED_ variables X-Git-Tag: tevent-0.9.37~29 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e081cafc9c4fcf5c8cfc0032e3c73eb145a09a9e;p=thirdparty%2Fsamba.git ctdb-scripts: Drop event script CTDB_MANAGED_ variables Enable required event scripts to manage services. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- diff --git a/ctdb/config/events/README b/ctdb/config/events/README index 88d5da45b6e..766cb4f1064 100644 --- a/ctdb/config/events/README +++ b/ctdb/config/events/README @@ -68,8 +68,7 @@ startup If the "startup" event fails then CTDB will retry it until it succeeds. There is no limit on the number of retries. - Example: 50.samba uses this event to start the Samba daemon if - CTDB_MANAGES_SAMBA=yes. + Example: 50.samba uses this event to start the Samba daemon. shutdown @@ -80,7 +79,7 @@ shutdown event and use it to stop the service. Example: 50.samba uses this event to shut down the Samba - daemon if CTDB_MANAGES_SAMBA=yes. + daemon. monitor diff --git a/ctdb/config/events/legacy/06.nfs.script b/ctdb/config/events/legacy/06.nfs.script index 4e029065ab0..97086f78ed0 100755 --- a/ctdb/config/events/legacy/06.nfs.script +++ b/ctdb/config/events/legacy/06.nfs.script @@ -28,8 +28,6 @@ nfs_callout_pre () # shellcheck disable=SC2154 nfs_callout_init "$script_state_dir" -[ "$CTDB_MANAGES_NFS" = "yes" ] || exit 0 - case "$1" in takeip) nfs_callout_pre "$@" diff --git a/ctdb/config/events/legacy/31.clamd.script b/ctdb/config/events/legacy/31.clamd.script index e073608e995..3b19923cc1b 100755 --- a/ctdb/config/events/legacy/31.clamd.script +++ b/ctdb/config/events/legacy/31.clamd.script @@ -19,8 +19,6 @@ esac load_script_options -[ "$CTDB_MANAGES_CLAMD" = "yes" ] || exit 0 - case "$1" in startup) service "$service_name" stop > /dev/null 2>&1 diff --git a/ctdb/config/events/legacy/40.vsftpd.script b/ctdb/config/events/legacy/40.vsftpd.script index c2e0eda5c1a..69876d26dac 100755 --- a/ctdb/config/events/legacy/40.vsftpd.script +++ b/ctdb/config/events/legacy/40.vsftpd.script @@ -17,8 +17,6 @@ load_script_options ctdb_setup_state_dir "service" "$service_name" -[ "$CTDB_MANAGES_VSFTPD" = "yes" ] || exit 0 - case "$1" in startup) service "$service_name" stop > /dev/null 2>&1 diff --git a/ctdb/config/events/legacy/41.httpd.script b/ctdb/config/events/legacy/41.httpd.script index 4030d7cc3bb..3d67aee9028 100755 --- a/ctdb/config/events/legacy/41.httpd.script +++ b/ctdb/config/events/legacy/41.httpd.script @@ -43,8 +43,6 @@ service_stop () killall -q -9 $service_name || true } -[ "$CTDB_MANAGES_HTTPD" = "yes" ] || exit 0 - case "$1" in startup) service_start diff --git a/ctdb/config/events/legacy/49.winbind.script b/ctdb/config/events/legacy/49.winbind.script index 07d4c1c2b05..8b1c8b853c0 100755 --- a/ctdb/config/events/legacy/49.winbind.script +++ b/ctdb/config/events/legacy/49.winbind.script @@ -34,10 +34,6 @@ service_stop () ########################### -[ "$CTDB_MANAGES_WINBIND" = "yes" ] || exit 0 - -########################### - case "$1" in startup) service_start diff --git a/ctdb/config/events/legacy/50.samba.script b/ctdb/config/events/legacy/50.samba.script index f65f53a15db..ce9e05f9756 100755 --- a/ctdb/config/events/legacy/50.samba.script +++ b/ctdb/config/events/legacy/50.samba.script @@ -147,10 +147,6 @@ list_samba_ports () ########################### -[ "$CTDB_MANAGES_SAMBA" = "yes" ] || exit 0 - -########################### - case "$1" in startup) service_start diff --git a/ctdb/config/events/legacy/60.nfs.script b/ctdb/config/events/legacy/60.nfs.script index 51d87269520..2eb90b421c8 100755 --- a/ctdb/config/events/legacy/60.nfs.script +++ b/ctdb/config/events/legacy/60.nfs.script @@ -253,8 +253,6 @@ nfs_update_lock_info () # shellcheck disable=SC2154 nfs_callout_init "$script_state_dir" -[ "$CTDB_MANAGES_NFS" = "yes" ] || exit 0 - case "$1" in startup) nfs_callout "$@" || exit $? diff --git a/ctdb/config/events/legacy/70.iscsi.script b/ctdb/config/events/legacy/70.iscsi.script index 670e0d79e8c..0828d473b7a 100755 --- a/ctdb/config/events/legacy/70.iscsi.script +++ b/ctdb/config/events/legacy/70.iscsi.script @@ -13,8 +13,6 @@ service_name="iscsi" load_script_options -[ "$CTDB_MANAGES_ISCSI" = "yes" ] || exit 0 - [ -z "$CTDB_START_ISCSI_SCRIPTS" ] && { echo "No iscsi start script directory found" exit 0 diff --git a/ctdb/config/script.options b/ctdb/config/script.options index 0c280c5b926..79e82afbb6d 100644 --- a/ctdb/config/script.options +++ b/ctdb/config/script.options @@ -1,22 +1,16 @@ -# For now, use script.options to demonstrate these options. The -# CTDB_MANAGES_* variables will go away soon. See other *.options -# examples for more specific examples. +# For now, use script.options to demonstrate these options. See +# *.options examples for more specific examples. # # Samba configuration # # 50.samba.options -CTDB_MANAGES_SAMBA=yes # CTDB_SAMBA_SKIP_SHARE_CHECK=yes -# 49.winbind.options -CTDB_MANAGES_WINBIND=yes - # # NFS configuration # # 60.nfs.options -CTDB_MANAGES_NFS=yes CTDB_RPCINFO_LOCALHOST="127.0.0.1" diff --git a/ctdb/doc/ctdb-script.options.5.xml b/ctdb/doc/ctdb-script.options.5.xml index 22c5aa03c5b..be8d4f4ce5a 100644 --- a/ctdb/doc/ctdb-script.options.5.xml +++ b/ctdb/doc/ctdb-script.options.5.xml @@ -563,20 +563,6 @@ CTDB_PER_IP_ROUTING_TABLE_ID_HIGH=9000 - - - CTDB_MANAGES_CLAMD=yes|no - - - - Should CTDB manage ClamAV? - - - Default is no. - - - - CTDB_CLAMD_SOCKET=FILENAME @@ -595,52 +581,6 @@ CTDB_PER_IP_ROUTING_TABLE_ID_HIGH=9000 - - 40.vsftpd - - - Provides CTDB's vsftpd FTP service management. - - - - - CTDB_MANAGES_VSFTPD=yes|no - - - Should CTDB manage the vsftpd FTP server? - - - Default is no. - - - - - - - - 41.httpd - - - Provides CTDB's Apache web service management. - - - - - - CTDB_MANAGES_HTTPD=yes|no - - - - Should CTDB manage the Apache web server? - - - Default is no. - - - - - - 49.winbind @@ -650,20 +590,6 @@ CTDB_PER_IP_ROUTING_TABLE_ID_HIGH=9000 - - - CTDB_MANAGES_WINBIND=yes|no - - - - Should CTDB manage Winbind? - - - Default is no. - - - - CTDB_SERVICE_WINBIND=SERVICE @@ -691,20 +617,6 @@ CTDB_PER_IP_ROUTING_TABLE_ID_HIGH=9000 - - - CTDB_MANAGES_SAMBA=yes|no - - - - Should CTDB manage Samba? - - - Default is no. - - - - CTDB_SAMBA_CHECK_PORTS=PORT-LIST @@ -785,20 +697,6 @@ CTDB_PER_IP_ROUTING_TABLE_ID_HIGH=9000 - - - CTDB_MANAGES_NFS=yes|no - - - - Should CTDB manage NFS? - - - Default is no. - - - - CTDB_NFS_CALLOUT=COMMAND @@ -936,20 +834,6 @@ CTDB_PER_IP_ROUTING_TABLE_ID_HIGH=9000 - - - CTDB_MANAGES_ISCSI=yes|no - - - - Should CTDB manage iSCSI tgtd? - - - Default is no. - - - - CTDB_START_ISCSI_SCRIPTS=DIRECTORY