summaryrefslogtreecommitdiffstats
path: root/kcontrol/input/consoleUserPerms
diff options
context:
space:
mode:
Diffstat (limited to 'kcontrol/input/consoleUserPerms')
-rwxr-xr-xkcontrol/input/consoleUserPerms16
1 files changed, 16 insertions, 0 deletions
diff --git a/kcontrol/input/consoleUserPerms b/kcontrol/input/consoleUserPerms
new file mode 100755
index 000000000..af7e267bd
--- /dev/null
+++ b/kcontrol/input/consoleUserPerms
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+GROUP=plugdev
+
+if [ "${ACTION}" = "add" ]
+then
+ if getent group $GROUP > /dev/null; then
+ N=0
+ while [ ! -e $DEVICE ] && [ $N -lt 25 ]; do
+ sleep 1
+ N=$(expr $N + 1)
+ done
+ chmod 660 "${DEVICE}"
+ chown root:$GROUP "${DEVICE}"
+ fi
+fi