diff options
author | Aaron Ball <nullspoon@oper.io> | 2017-12-24 13:57:34 -0700 |
---|---|---|
committer | Aaron Ball <nullspoon@oper.io> | 2017-12-24 13:57:34 -0700 |
commit | 5fa3aee08a78889ec99adb85b009fdac39f028e0 (patch) | |
tree | 322b30c5a9ada8fc6ae9d29acd02f74e5621b6fa | |
parent | 0e3993c2a440ed4407ca210cf8b8bcc0487806e5 (diff) | |
parent | c2927f0e4083ac07dff21c4af1e315417128fc1e (diff) | |
download | luminous-5fa3aee08a78889ec99adb85b009fdac39f028e0.tar.gz luminous-5fa3aee08a78889ec99adb85b009fdac39f028e0.tar.xz |
Merge branch 'init'
-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 |