Switch to systemd renaming some things
This commit is contained in:
parent
126c36289d
commit
2af3d8c5c4
15
Makefile
15
Makefile
@ -17,16 +17,17 @@ backlight: backlight.c Makefile
|
|||||||
gcc -DVERSION=\"$(VERSION)\" -Wall backlight.c -o backlight -lpci -static
|
gcc -DVERSION=\"$(VERSION)\" -Wall backlight.c -o backlight -lpci -static
|
||||||
|
|
||||||
install: backlight applesmc
|
install: backlight applesmc
|
||||||
install -d $(DESTDIR)$(BINDIR) $(DESTDIR)$(INITDIR) \
|
install -d $(DESTDIR)$(BINDIR) $(DESTDIR)$(INITDIR)
|
||||||
$(DESTDIR)$(SBIN) $(DESTDIR)$(SBINDIR) $(DESTDIR)/lib/modprobe.d \
|
install -d $(DESTDIR)$(SBIN) $(DESTDIR)$(SBINDIR) $(DESTDIR)/lib/modprobe.d
|
||||||
$(DESTDIR)$(SBIN) $(DESTDIR)$(SBINDIR) \
|
install -d $(DESTDIR)$(SBIN) $(DESTDIR)$(SBINDIR)
|
||||||
$(DESTDIR)$(SYSCONFDIR)/sysconfig
|
install -d $(DESTDIR)$(SYSCONFDIR)/sysconfig
|
||||||
|
install -d $(DESTDIR)/lib/systemd/system
|
||||||
install -s -m 4755 applesmc $(DESTDIR)$(BINDIR)
|
install -s -m 4755 applesmc $(DESTDIR)$(BINDIR)
|
||||||
install -s -m 4755 backlight $(DESTDIR)$(BINDIR)
|
install -s -m 4755 backlight $(DESTDIR)$(BINDIR)
|
||||||
install -m 0755 macbook-set-input $(DESTDIR)$(BINDIR)/
|
install -m 0755 macbook-set-input $(DESTDIR)$(BINDIR)/
|
||||||
install -m 0755 macbook-tools-init $(DESTDIR)$(INITDIR)/macbook-tools
|
install -m 0644 applesmcd.service $(DESTDIR)/lib/systemd/system/applesmcd.service
|
||||||
install -m 644 macbook-tools-sysconfig $(DESTDIR)$(SYSCONFDIR)/sysconfig/macbook-tools
|
install -m 0644 appleir.service $(DESTDIR)/lib/systemd/system/appleir.service
|
||||||
install -m 0755 macbook-lightd $(DESTDIR)$(SBINDIR)/
|
install -m 0755 applesmcd $(DESTDIR)$(SBINDIR)/
|
||||||
install -m 0644 macbook-modprobe $(DESTDIR)/lib/modprobe.d/macbook.conf
|
install -m 0644 macbook-modprobe $(DESTDIR)/lib/modprobe.d/macbook.conf
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
6
appleir.service
Normal file
6
appleir.service
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=lircd Apple IR remote daemon
|
||||||
|
ConditionPathExists=/dev/appleir
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=lircd -H macmini /etc/lirc/apple/lircd.conf.macmini
|
6
applesmcd.service
Normal file
6
applesmcd.service
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=MacBook keyboard backlight daemon
|
||||||
|
ConditionPathExists=/sys/devices/platform/applesmc.768
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/sbin/applesmcd
|
@ -1,84 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
#
|
|
||||||
# Macbook tools initscript
|
|
||||||
# Copyright (c) 2006-2009 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
|
||||||
# Released under the GPL v.2 license
|
|
||||||
#
|
|
||||||
# /etc/rc.d/init.d/macbook-tools
|
|
||||||
#
|
|
||||||
# chkconfig: 345 42 58
|
|
||||||
# description: set screen backlight level and load iSight firmware on Apple MacBooks
|
|
||||||
# processname: macbook-tools
|
|
||||||
|
|
||||||
# Source function library.
|
|
||||||
. /etc/rc.d/init.d/functions
|
|
||||||
|
|
||||||
[ -e /etc/sysconfig/machine ] && . /etc/sysconfig/machine
|
|
||||||
|
|
||||||
# Check for Apple manufacturer or exit
|
|
||||||
[ "${SYSTEM_MANUFACTURER:0:5}" = "Apple" ] || {
|
|
||||||
sed -i "s|KEYMAP=it-macbook|KEYMAP=it|" /etc/vconsole.conf
|
|
||||||
exit 0
|
|
||||||
}
|
|
||||||
|
|
||||||
[ -f /etc/sysconfig/macbook-tools ] && . /etc/sysconfig/macbook-tools
|
|
||||||
|
|
||||||
sed -i "s|KEYMAP=it$|KEYMAP=it-macbook|" /etc/vconsole.conf
|
|
||||||
|
|
||||||
[ "$BACKLIGHT_LEVEL" ] || BACKLIGHT_LEVEL=190
|
|
||||||
|
|
||||||
RETVAL=0
|
|
||||||
|
|
||||||
#
|
|
||||||
# See how we were called.
|
|
||||||
#
|
|
||||||
|
|
||||||
start() {
|
|
||||||
[ -e /sys/devices/platform/applesmc.768 ] || modprobe applesmc
|
|
||||||
|
|
||||||
if [ "$IR_EVENT_DEVICE" ]; then
|
|
||||||
echo -n "Starting lircd for Apple IR remote: "
|
|
||||||
lircd -H macmini /etc/lirc/apple/lircd.conf.macmini
|
|
||||||
evaluate_retval
|
|
||||||
echo
|
|
||||||
fi
|
|
||||||
|
|
||||||
#echo -n "Setting middle and right click mouse emulation: "
|
|
||||||
#echo 1 > /proc/sys/dev/mac_hid/mouse_button_emulation
|
|
||||||
#echo 125 > /proc/sys/dev/mac_hid/mouse_button2_keycode
|
|
||||||
#echo 96 > /proc/sys/dev/mac_hid/mouse_button3_keycode
|
|
||||||
#evaluate_retval
|
|
||||||
#echo
|
|
||||||
|
|
||||||
echo -n "Loading MacBook light sensor control daemon: "
|
|
||||||
macbook-lightd &>/dev/null &
|
|
||||||
evaluate_retval
|
|
||||||
echo
|
|
||||||
}
|
|
||||||
|
|
||||||
stop() {
|
|
||||||
echo -n "Stopping MacBook light sensor control daemon: "
|
|
||||||
killall -9 macbook-lightd
|
|
||||||
evaluate_retval
|
|
||||||
echo
|
|
||||||
}
|
|
||||||
|
|
||||||
restart() {
|
|
||||||
stop
|
|
||||||
start
|
|
||||||
}
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
start)
|
|
||||||
start
|
|
||||||
;;
|
|
||||||
restart)
|
|
||||||
restart
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
INITNAME=`basename $0`
|
|
||||||
echo "Usage: $INITNAME {start|restart}"
|
|
||||||
exit 1
|
|
||||||
esac
|
|
||||||
|
|
||||||
exit $RETVAL
|
|
@ -1,2 +0,0 @@
|
|||||||
ISIGHT_FIRMWARE_FILE=/mnt/osx/System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/AppleUSBVideoSupport.kext/Contents/MacOS/AppleUSBVideoSupport
|
|
||||||
IR_EVENT_DEVICE=/dev/appleir
|
|
Loading…
Reference in New Issue
Block a user