diff options
author | Martin Schwenke <martin@meltin.net> | 2014-12-30 17:07:09 +1100 |
---|---|---|
committer | Amitay Isaacs <amitay@samba.org> | 2015-01-28 06:01:09 +0100 |
commit | 9b67c1fa3748678552400a81172d124e59d5eb79 (patch) | |
tree | 7e36d1ab2a68d7b69d0f0356c7f637b0e9b56451 /ctdb/config | |
parent | 1a5414b6d25ed1b1abdafd8594183b84af33a6fb (diff) | |
download | samba-9b67c1fa3748678552400a81172d124e59d5eb79.tar.gz |
ctdb-scripts: Error message, comment and whitespace cleanups
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'ctdb/config')
-rwxr-xr-x | ctdb/config/events.d/70.iscsi | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/ctdb/config/events.d/70.iscsi b/ctdb/config/events.d/70.iscsi index 7d00494d51c..42d261b8f02 100755 --- a/ctdb/config/events.d/70.iscsi +++ b/ctdb/config/events.d/70.iscsi @@ -1,5 +1,6 @@ #!/bin/sh -# ctdb event script for TGTD based iSCSI + +# CTDB event script for TGTD based iSCSI [ -n "$CTDB_BASE" ] || \ export CTDB_BASE=$(cd -P $(dirname "$0") ; dirname "$PWD") @@ -19,7 +20,7 @@ is_ctdb_managed_service || exit 0 exit 0 } -case "$1" in +case "$1" in ipreallocated) all_ips=$(ctdb -X ip | tail -n +2) @@ -43,21 +44,22 @@ EOF ip6tables -I INPUT 1 -p tcp --dport 3260 -j DROP fi - # shut down the iscsi service + # Stop iSCSI daemon killall -9 tgtd >/dev/null 2>/dev/null + # What node is this? this_node=$(ctdb xpnn | sed -e 's@PNN:@@') [ -n "$this_node" ] || die "Failed to get node pnn" - # start the iscsi daemon - tgtd >/dev/null 2>/dev/null + # Start iSCSI daemon + tgtd >/dev/null 2>&1 # Run a script for each currently hosted public IP address ips=$(echo "$all_ips" | awk -F'|' -v pnn=$this_node '$3 == pnn {print $2}') for ip in $ips ; do script="${CTDB_START_ISCSI_SCRIPTS}/${ip}.sh" if [ -x "$script" ] ; then - echo "Starting iscsi service for public address ${ip}" + echo "Starting iSCSI service for public address ${ip}" "$script" fi done @@ -74,8 +76,8 @@ EOF ;; shutdown) - # shutdown iscsi when ctdb goes down - killall -9 tgtd >/dev/null 2>/dev/null + # Shutdown iSCSI daemon when ctdb goes down + killall -9 tgtd >/dev/null 2>&1 ;; monitor) |