From 823edbf6fe26bcfa934c9aa46d9472b1a9abf36a Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Mon, 22 Apr 2013 13:48:06 +1000 Subject: scripts: Ensure even external scripts get tagged in logs as "ctdbd" Our practice is to search logs for "ctdbd:". We want to make sure we find everything. Signed-off-by: Martin Schwenke (This used to be ctdb commit 5940a2494e9e43a83f2bca098bd04dfc1a8f2e93) --- ctdb/config/ctdb-crash-cleanup.sh | 4 ++-- ctdb/config/ctdb.init | 2 +- ctdb/config/functions | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ctdb/config/ctdb-crash-cleanup.sh b/ctdb/config/ctdb-crash-cleanup.sh index b62e3c3abb3..d26838e9c5e 100755 --- a/ctdb/config/ctdb-crash-cleanup.sh +++ b/ctdb/config/ctdb-crash-cleanup.sh @@ -22,8 +22,8 @@ loadconfig ctdb [ -f "$CTDB_PUBLIC_ADDRESSES" ] || \ die "No public addresses file found. Can't clean up." -drop_all_public_ips "ctdb-crash-cleanup" +drop_all_public_ips "ctdb-crash-cleanup.sh" if [ -n "$CTDB_NATGW_PUBLIC_IP" ] ; then - drop_ip "$CTDB_NATGW_PUBLIC_IP" "ctdb-crash-cleanup" + drop_ip "$CTDB_NATGW_PUBLIC_IP" "ctdb-crash-cleanup.sh" fi diff --git a/ctdb/config/ctdb.init b/ctdb/config/ctdb.init index d92fef05ae7..a76b7639766 100755 --- a/ctdb/config/ctdb.init +++ b/ctdb/config/ctdb.init @@ -249,7 +249,7 @@ start() { # make sure we drop any ips that might still be held if previous # instance of ctdb got killed with -9 or similar - drop_all_public_ips + drop_all_public_ips "ctdb.init" if select_tdb_checker ; then check_persistent_databases || return $? diff --git a/ctdb/config/functions b/ctdb/config/functions index b755e554134..b4450c38b5e 100755 --- a/ctdb/config/functions +++ b/ctdb/config/functions @@ -83,7 +83,7 @@ script_log () esac if $_using_syslog ; then - logger -t "$_tag" "$*" + logger -t "ctdbd" "${_tag}: $*" else { if [ -n "$*" ] ; then @@ -101,7 +101,7 @@ background_with_logging () { ( "$@" 2>&1