summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Ball <nullspoon@oper.io>2017-12-24 13:57:34 -0700
committerAaron Ball <nullspoon@oper.io>2017-12-24 13:57:34 -0700
commit5fa3aee08a78889ec99adb85b009fdac39f028e0 (patch)
tree322b30c5a9ada8fc6ae9d29acd02f74e5621b6fa
parent0e3993c2a440ed4407ca210cf8b8bcc0487806e5 (diff)
parentc2927f0e4083ac07dff21c4af1e315417128fc1e (diff)
downloadluminous-5fa3aee08a78889ec99adb85b009fdac39f028e0.tar.gz
luminous-5fa3aee08a78889ec99adb85b009fdac39f028e0.tar.xz
Merge branch 'init'
-rw-r--r--Makefile7
-rwxr-xr-xinit.sh17
2 files changed, 22 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index f5f6b74..f4b2ef8 100644
--- a/Makefile
+++ b/Makefile
@@ -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
diff --git a/init.sh b/init.sh
new file mode 100755
index 0000000..6105698
--- /dev/null
+++ b/init.sh
@@ -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

Generated by cgit