Add sinit.8 manpage - sinit - suckless init
 (HTM) git clone git://git.suckless.org/sinit
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit bd089dd5b18cd472c10f554a46c163e3b51a58a2
 (DIR) parent 76309c5e61defc04b88254111a764e849fa8ee71
 (HTM) Author: sin <sin@2f30.org>
       Date:   Tue, 22 Apr 2014 12:42:59 +0100
       
       Add sinit.8 manpage
       
       Diffstat:
         M Makefile                            |      10 ++++++++--
         M config.mk                           |       2 +-
         A sinit.8                             |      24 ++++++++++++++++++++++++
       
       3 files changed, 33 insertions(+), 3 deletions(-)
       ---
 (DIR) diff --git a/Makefile b/Makefile
       @@ -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
 (DIR) diff --git a/config.mk b/config.mk
       @@ -3,7 +3,7 @@ VERSION = 0.9
        
        # paths
        PREFIX = /usr/local
       -MANPREFIX = $(PREFIX)/man
       +MANPREFIX = $(PREFIX)/share/man
        
        CC = cc
        LD = $(CC)
 (DIR) diff --git a/sinit.8 b/sinit.8
       @@ -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)