[hackers] [sinit] Add sinit.8 manpage || sin

From: <git_AT_suckless.org>
Date: Wed, 23 Apr 2014 11:52:53 +0200

commit bd089dd5b18cd472c10f554a46c163e3b51a58a2
Author: sin <sin_AT_2f30.org>
Date: Tue Apr 22 12:42:59 2014 +0100

    Add sinit.8 manpage

diff --git a/Makefile b/Makefile
index 4d8d11c..1b7867f 100644
--- a/Makefile
+++ b/Makefile
_AT_@ -35,7 +35,7 @@ config.h:
 dist: clean
         _AT_echo creating dist tarball
         _AT_mkdir -p sinit-$(VERSION)
- _AT_cp LICENSE Makefile README config.def.h config.mk sinit.c \
+ _AT_cp LICENSE Makefile README config.def.h config.mk sinit.8 sinit.c \
                 sinit-$(VERSION)
         _AT_tar -cf sinit-$(VERSION).tar sinit-$(VERSION)
         _AT_gzip sinit-$(VERSION).tar
_AT_@ -45,11 +45,17 @@ install: all
         _AT_echo installing executable to $(DESTDIR)$(PREFIX)/bin
         _AT_mkdir -p $(DESTDIR)$(PREFIX)/bin
         _AT_cp -f $(BIN) $(DESTDIR)$(PREFIX)/bin
- _AT_cd $(DESTDIR)$(PREFIX)/bin && chmod 755 $(BIN)
+ _AT_chmod 755 $(DESTDIR)$(PREFIX)/bin/$(BIN)
+ _AT_echo installing manual page to $(DESTDIR)$(MANPREFIX)/man8
+ _AT_mkdir -p $(DESTDIR)$(MANPREFIX)/man8
+ _AT_sed "s/VERSION/$(VERSION)/g" < sinit.8 > $(DESTDIR)$(MANPREFIX)/man8/sinit.8
+ _AT_chmod 644 $(DESTDIR)$(MANPREFIX)/man8/sinit.8
 
 uninstall:
         _AT_echo removing executable from $(DESTDIR)$(PREFIX)/bin
         _AT_cd $(DESTDIR)$(PREFIX)/bin && rm -f $(BIN)
+ _AT_echo removing manual page from $(DESTDIR)$(MANPREFIX)/man8
+ _AT_rm -f $(DESTDIR)$(MANPREFIX)/man8/sinit.8
 
 clean:
         _AT_echo cleaning
diff --git a/config.mk b/config.mk
index bc1b0dc..b766d3b 100644
--- a/config.mk
+++ b/config.mk
_AT_@ -3,7 +3,7 @@ VERSION = 0.9
 
 # paths
 PREFIX = /usr/local
-MANPREFIX = $(PREFIX)/man
+MANPREFIX = $(PREFIX)/share/man
 
 CC = cc
 LD = $(CC)
diff --git a/sinit.8 b/sinit.8
new file mode 100644
index 0000000..dd01387
--- /dev/null
+++ b/sinit.8
_AT_@ -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)
Received on Wed Apr 23 2014 - 11:52:53 CEST

This archive was generated by hypermail 2.3.0 : Wed Apr 23 2014 - 12:00:09 CEST