Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 233681
Collapse All | Expand All

(-)hotkey-setup-0.1/debian/init.d (-12 / +9 lines)
Lines 1-4 Link Here
1
#!/bin/bash
1
#!/sbin/runscript
2
2
3
manufacturer=`dmidecode --string system-manufacturer`
3
manufacturer=`dmidecode --string system-manufacturer`
4
name=`dmidecode --string system-product-name`
4
name=`dmidecode --string system-product-name`
Lines 9-14 Link Here
9
THINKPAD_PROC_HOTKEY=/proc/acpi/ibm/hotkey
9
THINKPAD_PROC_HOTKEY=/proc/acpi/ibm/hotkey
10
THINKPAD_KEYS=/usr/sbin/thinkpad-keys
10
THINKPAD_KEYS=/usr/sbin/thinkpad-keys
11
11
12
12
do_video () {
13
do_video () {
13
    VIDEO=`sed -n -e '/^[ \t]*section[ \\t]*"device"/I,/^[ \t]*endsection/I{/^[ \t]*driver[ \t]*/I{s/^[ \t]*driver[ \t]*"*//I;s/"*[ \t]*$//;p}}' /etc/X11/xorg.conf`
14
    VIDEO=`sed -n -e '/^[ \t]*section[ \\t]*"device"/I,/^[ \t]*endsection/I{/^[ \t]*driver[ \t]*/I{s/^[ \t]*driver[ \t]*"*//I;s/"*[ \t]*$//;p}}' /etc/X11/xorg.conf`
14
    case $VIDEO in
15
    case $VIDEO in
Lines 47-54 Link Here
47
    fi
48
    fi
48
}
49
}
49
50
50
case "$1" in
51
start() {
51
    start)
52
52
53
# This entire block does nothing on desktops right now
53
# This entire block does nothing on desktops right now
54
    if laptop-detect; then
54
    if laptop-detect; then
Lines 148-164 Link Here
148
    esac
148
    esac
149
    . /usr/share/hotkey-setup/generic.hk
149
    . /usr/share/hotkey-setup/generic.hk
150
    fi
150
    fi
151
    ;;
151
}
152
    stop)
152
153
	if [ -f $THINKPAD_LOCKFILE ]; then
153
stop() {
154
 	if [ -f $THINKPAD_LOCKFILE ]; then
154
	    kill `pidof thinkpad-keys` || true ; rm -f $THINKPAD_LOCKFILE
155
	    kill `pidof thinkpad-keys` || true ; rm -f $THINKPAD_LOCKFILE
155
	fi
156
	fi
156
	if [ -f $SAVED_STATE ]; then
157
	if [ -f $SAVED_STATE ]; then
157
		setkeycodes $(cat $SAVED_STATE) || true
158
		setkeycodes $(cat $SAVED_STATE) || true
158
	fi
159
	fi
159
    ;;
160
}
160
    restart|force-reload)
161
161
    $0 stop || true
162
    $0 start
163
    ;;
164
esac

Return to bug 233681