diff options
author | Cecil Hugh Watson <knoppmyth@gmail.com> | 2010-09-05 06:06:06 (GMT) |
---|---|---|
committer | Cecil Hugh Watson <knoppmyth@gmail.com> | 2010-09-05 06:06:06 (GMT) |
commit | bd2fce4f72e5fedac6a0af36b6538090b63b845a (patch) | |
tree | da1669dbbc0d2810a94294032a1414b27c62252b /abs/extra-testing/consolekit/pam-foreground-compat.ck | |
parent | 2004b65ff841a4e63fe9e4c6d244c3a1cb477e88 (diff) | |
download | linhes_pkgbuild-bd2fce4f72e5fedac6a0af36b6538090b63b845a.zip linhes_pkgbuild-bd2fce4f72e5fedac6a0af36b6538090b63b845a.tar.gz linhes_pkgbuild-bd2fce4f72e5fedac6a0af36b6538090b63b845a.tar.bz2 |
consolekit:Bumped/Updated for LinHES 7.
Diffstat (limited to 'abs/extra-testing/consolekit/pam-foreground-compat.ck')
-rw-r--r-- | abs/extra-testing/consolekit/pam-foreground-compat.ck | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/abs/extra-testing/consolekit/pam-foreground-compat.ck b/abs/extra-testing/consolekit/pam-foreground-compat.ck new file mode 100644 index 0000000..7f6b122 --- /dev/null +++ b/abs/extra-testing/consolekit/pam-foreground-compat.ck @@ -0,0 +1,16 @@ +#!/bin/sh +TAGDIR=/var/run/console + +[ -n "$CK_SESSION_USER_UID" ] || exit 1 + +TAGFILE="$TAGDIR/`getent passwd $CK_SESSION_USER_UID | cut -f 1 -d:`" + +if [ "$1" = "session_added" ]; then + mkdir -p "$TAGDIR" + echo "$CK_SESSION_ID" >> "$TAGFILE" +fi + +if [ "$1" = "session_removed" ] && [ -e "$TAGFILE" ]; then + sed -i "\%^$CK_SESSION_ID\$%d" "$TAGFILE" + [ -s "$TAGFILE" ] || rm -f "$TAGFILE" +fi |