summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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