diff options
author | Jason Cox <steel300@gentoo.org> | 2004-04-02 20:25:59 +0000 |
---|---|---|
committer | Jason Cox <steel300@gentoo.org> | 2004-04-02 20:25:59 +0000 |
commit | a770a098aade75f5b595dda348b4e8470e779910 (patch) | |
tree | ca1529146560ae5d14e147c81ed1722696113e09 /media-libs/libnjb/files | |
parent | add s390 to keywords (diff) | |
download | historical-a770a098aade75f5b595dda348b4e8470e779910.tar.gz historical-a770a098aade75f5b595dda348b4e8470e779910.tar.bz2 historical-a770a098aade75f5b595dda348b4e8470e779910.zip |
Add the hotplug script. Version Bump.
Diffstat (limited to 'media-libs/libnjb/files')
-rw-r--r-- | media-libs/libnjb/files/digest-libnjb-1.0.2_pre20040222-r1 | 1 | ||||
-rw-r--r-- | media-libs/libnjb/files/nomadjukebox | 35 |
2 files changed, 36 insertions, 0 deletions
diff --git a/media-libs/libnjb/files/digest-libnjb-1.0.2_pre20040222-r1 b/media-libs/libnjb/files/digest-libnjb-1.0.2_pre20040222-r1 new file mode 100644 index 000000000000..023412233897 --- /dev/null +++ b/media-libs/libnjb/files/digest-libnjb-1.0.2_pre20040222-r1 @@ -0,0 +1 @@ +MD5 70fd867fc47cda7abfefc4e9b9cdb2ca libnjb-1.0.2-0.20040222.tar.gz 658821 diff --git a/media-libs/libnjb/files/nomadjukebox b/media-libs/libnjb/files/nomadjukebox new file mode 100644 index 000000000000..bc6c9e32d64c --- /dev/null +++ b/media-libs/libnjb/files/nomadjukebox @@ -0,0 +1,35 @@ +#!/bin/sh +# Lifts a plugged in nomad jukebox to user space and +# optionally runs a client program. +# Written by Linus Walleij 2004, based on the "usbcam" +# script by Nalin Dahyabhai. +DEVICEOWNER=CONSOLE +DEVICEPERMS=0600 +PROGRAM="cd ~; gnomad2 --display=localhost:0" + +if [ "${ACTION}" = "add" ] && [ -f "${DEVICE}" ] +then + # New code, using lock files instead of copying /dev/console permissions + # This also works with non-gdm logins (e.g. on a virtual terminal) + # Idea and code from Nalin Dahyabhai <nalin@redhat.com> + if [ "x$DEVICEOWNER" = "xCONSOLE" ] + then + if [ -f /var/run/console.lock ] + then + DEVICEOWNER=`cat /var/run/console.lock` + elif [ -f /var/lock/console.lock ] + then + DEVICEOWNER=`cat /var/lock/console.lock` + else + DEVICEOWNER= + fi + fi + if [ -n "$DEVICEOWNER" ] + then + chmod 0000 "${DEVICE}" + chown "${DEVICEOWNER}" "${DEVICE}" + chmod "${DEVICEPERMS}" "${DEVICE}" + # Then run an optional program - this does not work yet. + # su "${CONSOLEOWNER}" -c "${PROGRAM}" + fi +fi |