From ad043221e3b5d20e7a6ba707ed33fd8255e9a667 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 29 Oct 2014 22:04:33 +0100 Subject: m MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/logging | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/logging') diff --git a/src/logging b/src/logging index 14d2dfc..45e4815 100755 --- a/src/logging +++ b/src/logging @@ -71,12 +71,12 @@ user="${username}" # Execute a program only if it exists try () { - if hash "${1}" 2>/dev/null then + if hash "${1}" 2>/dev/null; then "$@" fi } # Call logging programs (those that exists) for a successful login action -log-login () +log_login () { # This is useful if you want to print the last logging. # log-login-lastlog updates the entry in lastlog so it is helpful @@ -95,12 +95,12 @@ log-login () try log-login-syslog "$@" } # Call logging programs (those that exists) for a logout action -log-logout () +log_logout () { true } # Call logging programs (those that exists) for a failed login action -log-denied () +log_denied () { try log-login-btmp "$@" try log-login-audit "$@" @@ -120,8 +120,8 @@ pid=--pid="${pid}" # Call the logging programs if [ "${hostname}" = "" ]; then - "log-${hook}" "${action}" "${username}" "${ttyname}" "${pid}" + "log_${hook}" "${action}" "${username}" "${ttyname}" "${pid}" else - "log-${hook}" "${action}" "${username}" "${ttyname}" "${pid}" --hostname="${hostname}" + "log_${hook}" "${action}" "${username}" "${ttyname}" "${pid}" --hostname="${hostname}" fi -- cgit v1.2.3-70-g09d2