M Makefile => Makefile +6 -2
@@ 2,7 2,11 @@ PREFIX = /usr/local
BINDIR = ${PREFIX}/bin
install:
- install -Dm755 -t ${DESTDIR}${BINDIR} shinit
+ install -Dm755 shinit ${DESTDIR}${BINDIR}/shinit
+ install -Dm755 poweroff ${DESTDIR}${BINDIR}/poweroff
+ ln -sf poweroff ${DESTDIR}${BINDIR}/reboot
uninstall:
- rm -f ${DESTDIR}${BINDIR}/shinit
+ rm -f ${DESTDIR}${BINDIR}/shinit \
+ ${DESTDIR}${BINDIR}/poweroff \
+ ${DESTDIR}${BINDIR}/reboot
A poweroff => poweroff +4 -0
@@ 0,0 1,4 @@
+#!/bin/sh
+# An example way to poweroff/reboot.
+
+case "${0##*/}" in poweroff) kill -s USR1 1 ;; reboot) kill -s INT 1 ; esac