aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-10-29 18:35:43 +0100
committerMattias Andrée <maandree@operamail.com>2014-10-29 18:35:43 +0100
commita138753cb5e299861d74302c775b19664e8d589d (patch)
tree8d36cad66775eb79a971ea18f77aa3a667a9c8f7
parentneed pid of login process (diff)
downloadcerberus-logging-a138753cb5e299861d74302c775b19664e8d589d.tar.gz
cerberus-logging-a138753cb5e299861d74302c775b19664e8d589d.tar.bz2
cerberus-logging-a138753cb5e299861d74302c775b19664e8d589d.tar.xz
m
Signed-off-by: Mattias Andrée <maandree@operamail.com>
-rwxr-xr-xsrc/logging3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/logging b/src/logging
index ce879b5..db14adb 100755
--- a/src/logging
+++ b/src/logging
@@ -24,6 +24,9 @@ hostname=
ttyname="$(tty | cut -d / -f 1,2 --complement)"
hook="${1}"
pid=$PPID
+if [ ! "${LOGIN_PID}" = "" ]; then
+ pid="${LOGIN_PID}"
+fi
# Remove the hookname from $@
shift 1