From 766a756dd7ed3226587ca1e7e798725e70a9a5be Mon Sep 17 00:00:00 2001 From: sibel Date: Fri, 8 Apr 2011 11:03:39 +0200 Subject: consolekit, petites corrections --- extra/consolekit/.footprint.i686 | 1 + extra/consolekit/.footprint.x86_64 | 1 + extra/consolekit/.md5sum.i686 | 1 + extra/consolekit/.md5sum.x86_64 | 1 + extra/consolekit/Pkgfile | 9 ++++++--- extra/consolekit/pam-foreground-compat.ck | 16 ++++++++++++++++ 6 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 extra/consolekit/pam-foreground-compat.ck (limited to 'extra/consolekit') diff --git a/extra/consolekit/.footprint.i686 b/extra/consolekit/.footprint.i686 index 577382604..28d4f2132 100755 --- a/extra/consolekit/.footprint.i686 +++ b/extra/consolekit/.footprint.i686 @@ -27,6 +27,7 @@ drwxr-xr-x root/root usr/lib/ConsoleKit/ -rwxr-xr-x root/root usr/lib/ConsoleKit/ck-get-x11-server-pid drwxr-xr-x root/root usr/lib/ConsoleKit/run-seat.d/ drwxr-xr-x root/root usr/lib/ConsoleKit/run-session.d/ +-rwxr-xr-x root/root usr/lib/ConsoleKit/run-session.d/pam-foreground-compat.ck drwxr-xr-x root/root usr/lib/ConsoleKit/scripts/ -rwxr-xr-x root/root usr/lib/ConsoleKit/scripts/ck-system-restart -rwxr-xr-x root/root usr/lib/ConsoleKit/scripts/ck-system-stop diff --git a/extra/consolekit/.footprint.x86_64 b/extra/consolekit/.footprint.x86_64 index 577382604..28d4f2132 100755 --- a/extra/consolekit/.footprint.x86_64 +++ b/extra/consolekit/.footprint.x86_64 @@ -27,6 +27,7 @@ drwxr-xr-x root/root usr/lib/ConsoleKit/ -rwxr-xr-x root/root usr/lib/ConsoleKit/ck-get-x11-server-pid drwxr-xr-x root/root usr/lib/ConsoleKit/run-seat.d/ drwxr-xr-x root/root usr/lib/ConsoleKit/run-session.d/ +-rwxr-xr-x root/root usr/lib/ConsoleKit/run-session.d/pam-foreground-compat.ck drwxr-xr-x root/root usr/lib/ConsoleKit/scripts/ -rwxr-xr-x root/root usr/lib/ConsoleKit/scripts/ck-system-restart -rwxr-xr-x root/root usr/lib/ConsoleKit/scripts/ck-system-stop diff --git a/extra/consolekit/.md5sum.i686 b/extra/consolekit/.md5sum.i686 index 1b94c75d5..c0a4662bb 100755 --- a/extra/consolekit/.md5sum.i686 +++ b/extra/consolekit/.md5sum.i686 @@ -1 +1,2 @@ b57eb18eae8c4d3631d5f4f030218a29 ConsoleKit-0.4.4.tar.bz2 +a8a4de71d9b0549b8143e5f6c2a36fc7 pam-foreground-compat.ck diff --git a/extra/consolekit/.md5sum.x86_64 b/extra/consolekit/.md5sum.x86_64 index 1b94c75d5..c0a4662bb 100755 --- a/extra/consolekit/.md5sum.x86_64 +++ b/extra/consolekit/.md5sum.x86_64 @@ -1 +1,2 @@ b57eb18eae8c4d3631d5f4f030218a29 ConsoleKit-0.4.4.tar.bz2 +a8a4de71d9b0549b8143e5f6c2a36fc7 pam-foreground-compat.ck diff --git a/extra/consolekit/Pkgfile b/extra/consolekit/Pkgfile index 39bdfd437..964f3ff34 100755 --- a/extra/consolekit/Pkgfile +++ b/extra/consolekit/Pkgfile @@ -7,8 +7,9 @@ name=consolekit version=0.4.4 -release=1 -source=(http://www.freedesktop.org/software/ConsoleKit/dist/ConsoleKit-$version.tar.bz2) +release=3 +source=(http://www.freedesktop.org/software/ConsoleKit/dist/ConsoleKit-$version.tar.bz2 + pam-foreground-compat.ck) build() { cd ConsoleKit-$version @@ -18,9 +19,11 @@ build() { --localstatedir=/var \ --libexecdir=/usr/lib/ConsoleKit \ --enable-pam-module \ - --enable-docbook-docs + --enable-docbook-docs \ + --with-dbus-services=$PKG/usr/share/dbus-1/services make make DESTDIR=$PKG install + install -m755 $SRC/pam-foreground-compat.ck $PKG/usr/lib/ConsoleKit/run-session.d/ } diff --git a/extra/consolekit/pam-foreground-compat.ck b/extra/consolekit/pam-foreground-compat.ck new file mode 100644 index 000000000..7f6b122d5 --- /dev/null +++ b/extra/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 -- cgit v1.2.3-70-g09d2