commit: 0c9a68e0915b7c10aea37f2209579858a3d010dd Author: Kerin Millar <kfm <AT> plushkava <DOT> net> AuthorDate: Fri Feb 10 03:29:07 2023 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Fri Feb 10 06:07:30 2023 +0000 URL: https://gitweb.gentoo.org/proj/gentoo-functions.git/commit/?id=0c9a68e0
Consistently specify the tag where calling esyslog() In some cases, the tag name is specified as "rc-scripts" whereas, in others, it is specified as "${0##*/}". Consistently use the latter. Eliminate some useless uses of the (non-portable) local builtin. Convey the positional parameters to esyslog() with "$@". They end up being re-joined, so they may as well be conveyed exactly as they were. Signed-off-by: Kerin Millar <kfm <AT> plushkava.net> Signed-off-by: Sam James <sam <AT> gentoo.org> functions.sh | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/functions.sh b/functions.sh index f756a9f..9775e2c 100644 --- a/functions.sh +++ b/functions.sh @@ -127,9 +127,8 @@ ewarnn() printf " ${WARN}*${NORMAL} ${RC_INDENTATION}$*" >&2 fi - local name="${0##*/}" # Log warnings to system log - esyslog "daemon.warning" "${name}" "$*" + esyslog "daemon.warning" "${0##*/}" "$@" LAST_E_CMD="ewarnn" return 0 @@ -149,9 +148,8 @@ ewarn() printf " ${WARN}*${NORMAL} ${RC_INDENTATION}$*\n" >&2 fi - local name="${0##*/}" # Log warnings to system log - esyslog "daemon.warning" "${name}" "$*" + esyslog "daemon.warning" "${0##*/}" "$@" LAST_E_CMD="ewarn" return 0 @@ -171,9 +169,8 @@ eerrorn() printf " ${BAD}*${NORMAL} ${RC_INDENTATION}$*" >&2 fi - local name="${0##*/}" # Log errors to system log - esyslog "daemon.err" "rc-scripts" "$*" + esyslog "daemon.err" "${0##*/}" "$@" LAST_E_CMD="eerrorn" return 1 @@ -193,9 +190,8 @@ eerror() printf " ${BAD}*${NORMAL} ${RC_INDENTATION}$*\n" >&2 fi - local name="${0##*/}" # Log errors to system log - esyslog "daemon.err" "rc-scripts" "$*" + esyslog "daemon.err" "${0##*/}" "$@" LAST_E_CMD="eerror" return 1