diff options
-rw-r--r-- | Makefile | 10 | ||||
-rw-r--r-- | config.mk | 2 | ||||
-rw-r--r-- | sinit.8 | 24 |
3 files changed, 33 insertions, 3 deletions
@@ -35,7 +35,7 @@ config.h: dist: clean @echo creating dist tarball @mkdir -p sinit-$(VERSION) - @cp LICENSE Makefile README config.def.h config.mk sinit.c \ + @cp LICENSE Makefile README config.def.h config.mk sinit.8 sinit.c \ sinit-$(VERSION) @tar -cf sinit-$(VERSION).tar sinit-$(VERSION) @gzip sinit-$(VERSION).tar @@ -45,11 +45,17 @@ install: all @echo installing executable to $(DESTDIR)$(PREFIX)/bin @mkdir -p $(DESTDIR)$(PREFIX)/bin @cp -f $(BIN) $(DESTDIR)$(PREFIX)/bin - @cd $(DESTDIR)$(PREFIX)/bin && chmod 755 $(BIN) + @chmod 755 $(DESTDIR)$(PREFIX)/bin/$(BIN) + @echo installing manual page to $(DESTDIR)$(MANPREFIX)/man8 + @mkdir -p $(DESTDIR)$(MANPREFIX)/man8 + @sed "s/VERSION/$(VERSION)/g" < sinit.8 > $(DESTDIR)$(MANPREFIX)/man8/sinit.8 + @chmod 644 $(DESTDIR)$(MANPREFIX)/man8/sinit.8 uninstall: @echo removing executable from $(DESTDIR)$(PREFIX)/bin @cd $(DESTDIR)$(PREFIX)/bin && rm -f $(BIN) + @echo removing manual page from $(DESTDIR)$(MANPREFIX)/man8 + @rm -f $(DESTDIR)$(MANPREFIX)/man8/sinit.8 clean: @echo cleaning @@ -3,7 +3,7 @@ VERSION = 0.9 # paths PREFIX = /usr/local -MANPREFIX = $(PREFIX)/man +MANPREFIX = $(PREFIX)/share/man CC = cc LD = $(CC) @@ -0,0 +1,24 @@ +.TH SINIT 8 sinit-VERSION +.SH NAME +sinit \- The suckless init +.SH DESCRIPTION +sinit is a simple init. It is configured by modifying `config.h' +and recompiling the code. +.SS Signal handling +sinit will respond to the following set of signals: +.IP USR1 +Default action is to initiate the shutdown sequence by +executing `/bin/rc.shutdown poweroff'. +.IP INT +Default action is to initiate the reboot sequence by +executing `/bin/rc.shutdown reboot'. +.IP CHLD +Reap children. +.SS General considerations +Calling the aforementioned scripts directly might or might not +work in your case. For example if any process in your session +has stale filesystem references then it is likely your init scripts +will fail to unmount the filesystem cleanly. It is recommended to +signal sinit via a wrapper script. +.SH SEE ALSO +killall5(8), getty(8) |