Commit 85314dd1 authored by Natanael Copa's avatar Natanael Copa

main/consolekit: use pam compat hook from debian

this fixes 'at_console' for dbus so logged in users are allowed to
communicate with org.bluez. (bluetooth-applet and bluez-simple-agent)

was found here:
http://git.debian.org/?p=pkg-utopia/consolekit.git;a=tree;f=debian;hb=HEAD
parent be43b434
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=consolekit
pkgver=0.4.4
pkgrel=1
pkgrel=2
pkgdesc="Framework for defining and tracking users, login sessions, and seats"
url="http://www.freedesktop.org/wiki/Software/ConsoleKit"
arch="all"
......@@ -13,6 +13,7 @@ install=
subpackages="$pkgname-dev $pkgname-doc"
source="http://www.freedesktop.org/software/ConsoleKit/dist/ConsoleKit-$pkgver.tar.bz2
0001-busybox-reboot-and-poweroff-support.patch
pam-foreground-compat.ck
"
_builddir="$srcdir"/ConsoleKit-$pkgver
......@@ -40,7 +41,10 @@ build() {
package() {
cd "$_builddir"
make DESTDIR="$pkgdir" install || return 1
install -m 755 "$srcdir"/pam-foreground-compat.ck \
"$pkgdir"/usr/lib/ConsoleKit/run-session.d/
}
md5sums="b57eb18eae8c4d3631d5f4f030218a29 ConsoleKit-0.4.4.tar.bz2
acc4f44190cd677f95fd529d528c9cef 0001-busybox-reboot-and-poweroff-support.patch"
acc4f44190cd677f95fd529d528c9cef 0001-busybox-reboot-and-poweroff-support.patch
d75ed3438dab01552304c06fd9a967b1 pam-foreground-compat.ck"
#!/bin/sh
TAGDIR=/var/run/console
[ -n "$CK_SESSION_USER_UID" ] || exit 1
[ "$CK_SESSION_IS_LOCAL" = "true" ] || exit 0
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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment