]> git.pld-linux.org Git - packages/i8kutils.git/commitdiff
- initial release
authoraverne <averne@pld-linux.org>
Fri, 17 Sep 2004 10:36:28 +0000 (10:36 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    i8kbuttons.aumix -> 1.1
    i8kbuttons.conf -> 1.1
    i8kutils -> 1.1

i8kbuttons.aumix [new file with mode: 0755]
i8kbuttons.conf [new file with mode: 0644]
i8kutils [new file with mode: 0755]

diff --git a/i8kbuttons.aumix b/i8kbuttons.aumix
new file mode 100755 (executable)
index 0000000..72bbcdc
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/bash
+if [ -f /etc/i8kbuttons.conf ]; then
+        . /etc/i8kbuttons.conf
+else
+        print "there's no /etc/i8kbuttons.conf"
+fi
+               
+exec /usr/bin/i8kbuttons -u '$I8KBUTTONS_UP_CMD' -d '$I8KBUTTONS_DOWN_CMD' \
+       -m '$I8KBUTTONS_MUTE_CMD' -r '$I8KBUTTONS_TIMEOUT' &
+               
+
+/sbin/kbdrate -r 30 -d 100 >/dev/null 2&>1 & echo
diff --git a/i8kbuttons.conf b/i8kbuttons.conf
new file mode 100644 (file)
index 0000000..3bbb9c4
--- /dev/null
@@ -0,0 +1,14 @@
+# Sample /etc/i8kbuttons configuration file (used by /etc/init.d/i8kbuttons).
+
+# Change these sample commands with your mixer commands!!!
+I8KBUTTONS_UP_CMD="aumix -v +10"
+I8KBUTTONS_DOWN_CMD="aumix -v -10"
+I8KBUTTONS_MUTE_CMD="aumix -v 0"
+
+# Poll interval (milliseconds)
+I8KBUTTONS_TIMEOUT=100
+
+# Autorepeat interval (milliseconds)
+I8KBUTTONS_REPEAT=0
+
+# end of file
diff --git a/i8kutils b/i8kutils
new file mode 100755 (executable)
index 0000000..35df160
--- /dev/null
+++ b/i8kutils
@@ -0,0 +1,70 @@
+#!/bin/sh
+#
+#
+# chkconfig:   2345 80 30
+# description: i8kutils is userspace for i8k kernel module
+# processname: i8kbuttons
+# config:      /etc/i8kbuttons.conf
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+# Source i8kutils configureation.
+if [ -f /etc/sysconfig/i8kutils ]; then
+       . /etc/sysconfig/i8kutils
+fi
+
+if [ -f /etc/i8kbuttons.conf ]; then
+       . /etc/i8kbuttons.conf
+else
+       print "there's no /etc/i8kbuttons.conf"
+fi
+
+# See how we were called.
+case "$1" in
+  start)
+       # Start daemons.
+       if [ ! -f /var/lock/subsys/i8kutils ]; then
+               msg_starting i8kutils
+               daemon /usr/bin/i8kbuttons.aumix
+               RETVAL=$?
+               [ $RETVAL -eq 0 ] && touch /var/lock/subsys/i8kutils
+       else
+               msg_already_running i8kutils
+       fi
+       ;;
+  stop)
+       # Stop daemons.
+       if [ -f /var/lock/subsys/i8kutils ]; then
+               msg_stopping i8kutils
+               killproc i8kbuttons
+               rm -f /var/lock/subsys/i8kutils >/dev/null 2>&1
+       else
+               msg_not_running i8kutils
+       fi      
+       ;;
+  restart)
+       $0 stop
+       $0 start
+       exit $?
+       ;;
+  status)
+       status i8kbuttons
+       exit $?
+       ;;
+  reload|force-reload)
+       if [ -f /var/lock/subsys/i8kutils ]; then
+               msg_reloading i8kutils
+               killproc i8kbuttns.aumix
+               RETVAL=$?
+       else
+               msg_not_running Exim >&2
+               exit 7
+       fi
+       ;;
+  *)
+       msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
+       exit 3
+esac
+
+exit $RETVAL
This page took 0.15305 seconds and 4 git commands to generate.