ctdb-scripts: Avoid shellcheck warning SC2154 (unassigned variables)
authorMartin Schwenke <martin@meltin.net>
Wed, 6 Jul 2016 07:41:55 +0000 (17:41 +1000)
committerAmitay Isaacs <amitay@samba.org>
Thu, 21 Jul 2016 00:24:26 +0000 (02:24 +0200)
commitb208ae73d1f65bfd64c343f0396885fa8f5de404
tree78811345669b4b2ab8c0b6c048c7903e2aa21d76
parent9255d645f3df9d6451ed0f1382c6752b7bec22ff
ctdb-scripts: Avoid shellcheck warning SC2154 (unassigned variables)

SC2154: VAR is referenced but not assigned.

Change ctdb_setup_service_state_dir(), ctdb_get_pnn() and
ctdb_get_ip_address() to print the value so it can be assigned to a
variable.  The performance gain from avoiding the sub-shells when
calling these functions is close to zero.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
13 files changed:
ctdb/config/events.d/00.ctdb
ctdb/config/events.d/05.system
ctdb/config/events.d/06.nfs
ctdb/config/events.d/10.external
ctdb/config/events.d/11.natgw
ctdb/config/events.d/20.multipathd
ctdb/config/events.d/49.winbind
ctdb/config/events.d/50.samba
ctdb/config/events.d/60.nfs
ctdb/config/events.d/70.iscsi
ctdb/config/events.d/91.lvs
ctdb/config/functions
ctdb/config/statd-callout