diff options
-rw-r--r-- | Makefile | 7 | ||||
-rwxr-xr-x | init.sh | 17 |
2 files changed, 22 insertions, 2 deletions
@@ -1,12 +1,15 @@ out=luminous CCOPTS=-Wall -DESTDIR=/usr/bin + +BINDIR=/usr/bin +INITDIR=/etc/rc.d all: cc $(CCOPTS) $(DBG) src/main.c -o luminous install: - install -D luminous ${DESTDIR}/luminous + install -D luminous ${DESTDIR}/${BINDIR}/luminous + install -D init.sh ${DESTDIR}/${INITDIR}/luminous debug: make DBG=-g @@ -0,0 +1,17 @@ +#!/bin/sh +# +# start/stop luminous setup +# +# This only sets the permissions on the brightness + +case $1 in + start) + chmod 666 /sys/class/backlight/*/brightness + ;; + stop) + chmod 644 /sys/class/backlight/*/brightness + ;; + *) + printf "usage: $0 [start|stop]\n" + ;; +esac |