~cemkeylan/shinit

0fa554bb37efa23713707861b47c3e6e758b434d — Cem Keylan 4 years ago 1927bc6
add poweroff script
2 files changed, 10 insertions(+), 2 deletions(-)

M Makefile
A poweroff
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