misc: improve documentation

Wed, 28 Jul 2021 20:41:50 +0200

author
David Demelier <markand@malikania.fr>
date
Wed, 28 Jul 2021 20:41:50 +0200
changeset 1
4365e2c3ec16
parent 0
b8575b063376
child 2
a1f663a4c828

misc: improve documentation

INSTALL.md file | annotate | diff | comparison | revisions
Makefile file | annotate | diff | comparison | revisions
rc.7 file | annotate | diff | comparison | revisions
rc.7.in file | annotate | diff | comparison | revisions
rc.conf.5 file | annotate | diff | comparison | revisions
rc.conf.5.in file | annotate | diff | comparison | revisions
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/INSTALL.md	Wed Jul 28 20:41:50 2021 +0200
@@ -0,0 +1,29 @@
+vinit-scripts INSTALL
+=====================
+
+Installation instructions.
+
+Requirements
+------------
+
+- POSIX make.
+
+Basic installation
+------------------
+
+Quick install.
+
+	$ tar xvzf vinit-x.y.z-tar.xz
+	$ cd vinit-x.y.z
+	$ make
+	# sudo make install
+
+Options
+-------
+
+The following options are available as make macros:
+
+- `PREFIX`: root directory for installing (default: /usr/local).
+- `BINDIR`: binaries (default: ${PREFIX}/bin).
+- `MANDIR`: manual pages directory (default: ${PREFIX}/share/man).
+- `SHAREDIR`: path to data directory (default: ${PREFIX}/share).
--- a/Makefile	Wed Jul 28 14:42:42 2021 +0200
+++ b/Makefile	Wed Jul 28 20:41:50 2021 +0200
@@ -1,5 +1,6 @@
 #
 # Makefile -- basic Makefile for vinit-scripts
+#
 # Copyright (c) 2021 David Demelier <markand@malikania.fr>
 #
 # Permission to use, copy, modify, and/or distribute this software for any
@@ -19,9 +20,18 @@
 
 PREFIX=         /usr/local
 SYSCONFDIR=     ${PREFIX}/etc
+SHAREDIR=       ${PREFIX}/share
 MANDIR=         ${PREFIX}/share/man
 
-all:
+OBJS=           rc.conf.5 rc.7
+
+.SUFFIXES:
+.SUFFIXES: .in
+
+.in:
+	sed -e "s,@SHAREDIR@,${SHAREDIR},g" < $< > $@
+
+all: ${OBJS}
 
 install:
 	mkdir -p ${DESTDIR}${SYSCONFDIR}/rc.d
@@ -34,4 +44,7 @@
 	mkdir -p ${DESTDIR}${MANDIR}/man7
 	cp rc.7 ${DESTDIR}${MANDIR}/man7
 
-.PHONY: all install
+clean:
+	rm -f ${OBJS}
+
+.PHONY: all install clean
--- a/rc.7	Wed Jul 28 14:42:42 2021 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-.\"
-.\" Copyright (c) 2019 David Demelier <markand@malikania.fr>
-.\"
-.\" Permission to use, copy, modify, and/or distribute this software for any
-.\" purpose with or without fee is hereby granted, provided that the above
-.\" copyright notice and this permission notice appear in all copies.
-.\"
-.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-.\"
-.Dd July 08, 2019
-.Dt RC 7
-.Os
-.Sh NAME
-.Nm rc
-.Nd vanilla init scripts
-.Sh DESCRIPTION
-Init scripts for Vanilla Linux.
-.Sh FILES AND DIRECTORIES
-.Pp
-The following files and directories are understood by Vanilla Linux init
-process:
-.Bl -tag -width 18n
-.It Pa /etc/rc.conf
-The global configuration file for system initialization and basic configuration.
-See
-.Xr rc.conf 5
-for more details.
-.It Pa /etc/rc.init
-File executed early by boot process to perform the machine initialization. It
-mounts filesystem, checks devices sets configuration from
-.Pa /etc/rc.conf
-file.
-.It Pa /etc/rc.networking
-Enable network interfaces and configure them. Called just before starting user
-services and mostly used for static address scenarios.
-.It Pa /etc/rc.shutdown
-This file is executed when the machine is going off. Its purpose is to shutdown
-all processed, unmount filesystem and halts the machine.
-.El
-.Pp
-All files are used editable and not replaced on upgrade.
-.Sh SEE ALSO
-.Xr rc.conf 5
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rc.7.in	Wed Jul 28 20:41:50 2021 +0200
@@ -0,0 +1,59 @@
+.\"
+.\" Copyright (c) 2019 David Demelier <markand@malikania.fr>
+.\"
+.\" Permission to use, copy, modify, and/or distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd July 08, 2019
+.Dt RC 7
+.Os
+.Sh NAME
+.Nm rc
+.Nd Vanilla Linux init scripts
+.Sh DESCRIPTION
+The following files are provided for use with the
+.Xr vinit 8
+init system. It provides a default set of features to startup a fully working
+system.
+.Pp
+List of available scripts and files:
+.Bl -tag -width 18n
+.It Pa /etc/rc.conf
+The global configuration file for system initialization and basic configuration.
+See
+.Xr rc.conf 5
+for more details.
+.It Pa /etc/rc.init
+File executed by boot process to perform the machine initialization. It mounts
+filesystem, checks devices and finally sets configuration from
+.Pa /etc/rc.conf
+file.
+.It Pa /etc/rc.networking
+Enable network interfaces and configure them. Called just before starting user
+services and mostly used for static address scenarios.
+.It Pa /etc/rc.shutdown
+This file is executed when the machine is going off. Its purpose is to shutdown
+all processed, unmount filesystem and halts the machine. It takes an argument
+which can be one of:
+.Dq halt ,
+.Dq poweroff
+or
+.Dq reboot .
+See
+.Xr vinit 8
+for more information.
+.El
+.Pp
+All files are used editable and not replaced on upgrade.
+.Sh SEE ALSO
+.Xr rc.conf 5 ,
+.Xr vinit 8
--- a/rc.conf.5	Wed Jul 28 14:42:42 2021 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,115 +0,0 @@
-.\"
-.\" Copyright (c) 2019 David Demelier <markand@malikania.fr>
-.\"
-.\" Permission to use, copy, modify, and/or distribute this software for any
-.\" purpose with or without fee is hereby granted, provided that the above
-.\" copyright notice and this permission notice appear in all copies.
-.\"
-.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-.\"
-.Dd July 08, 2019
-.Dt RC.CONF 5
-.Os
-.Sh NAME
-.Nm rc.conf
-.Nd system configuration
-.Sh DESCRIPTION
-The file
-.Nm
-contains information about the system.
-.Pp
-It is evaluated at boot time when
-.Pa /etc/rc.init
-is started from init and performs initialization. The file is sourced from a
-shell script and therefore can contain shell code.
-.Pp
-The following options are available:
-.Bl -tag -width indent-two
-.It Va HOSTNAME
-Sets the machine hostname. (Default: localhost)
-.It Va TIMEZONE
-Sets the time zone. You can get a list of timezones in the
-.Pa /usr/share/zoneinfo
-directory. The variable must be in the form
-.Ar Area/Region .
-(Default: empty)
-.Pp
-Note: this requires package
-.Ar tzdata
-to be installed.
-.It Va SERVICES
-This variable contains services to be started at boot. (Default: empty).
-.Pp
-In Vanilla Linux, services have no dependencies and therefore user is
-responsible of starting them is a specific order if needed. Thus, services
-marked in this list separated by spaces are executed in order.
-.Pp
-Entries in this variable should contain file names located in
-.Pa /etc/rc.d
-directory.
-.Pp
-Some services offer tunables to pass additional configuration to them. See the
-service file header for more information.
-.Pp
-Note: don't forget to mark the service file as executable or it won't be
-executed by init process.
-.It Va FONT
-Sets the console font. A list is available in /usr/share/kbd/consolefonts.
-(Default: empty).
-.Pp
-Note: this requires package
-.Ar kbd
-to be installed.
-.It Va KEYMAP
-Sets the console keymap. A list is available in /usr/share/kbd/keymaps.
-(Default: empty).
-.Pp
-Note: this requires package
-.Ar kbd
-to be installed.
-.It Va INTERFACES
-Interfaces to pass to
-.Pa /etc/rc.networking
-script during bootup and shutdown. Mostly used for static IP addresses. It's
-strongly advised to keep
-.Ar lo
-interface in this variable. (Default: lo)
-.Pp
-See the documentation in the
-.Pa /etc/rc.networking
-file.
-.It Va TTYS
-List of ttys to configure. (Default: tty1 to tty8).
-.Pp
-For each tty listed in this variable two variables
-.Va <TTY>_ARGS
-and
-.Va <TTY>_FONT
-can be specified where <TTY> is the uppercase tty number (e.g. TTY1 for tty1).
-The first one specifies the arguments to pass to the getty program which is set
-to
-.Dq 38400
-by default. The boolean _FONT option specifies if the tty must be configured
-with a font.
-.El
-.Sh EXAMPLES
-.Ss Starting sysklogd package
-The
-.Ar sysklogd
-package understand the variable
-.Va SYSKLOGD_ARGS
-and may be used instead. However, please note that setting this variable replace
-the original arguments so double check the service file before setting any
-variable.
-.Bd -literal
-SYSKLOGD_ARGS="-4"
-SERVICES="sysklogd"
-.Ed
-.Sh SEE ALSO
-.Xr rc 7
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rc.conf.5.in	Wed Jul 28 20:41:50 2021 +0200
@@ -0,0 +1,117 @@
+.\"
+.\" Copyright (c) 2019 David Demelier <markand@malikania.fr>
+.\"
+.\" Permission to use, copy, modify, and/or distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd July 08, 2019
+.Dt RC.CONF 5
+.Os
+.Sh NAME
+.Nm rc.conf
+.Nd system configuration
+.Sh DESCRIPTION
+The file
+.Nm
+contains information about the system.
+.Pp
+It is evaluated at boot time when
+.Pa /etc/rc.init
+is started from
+.Xr vinit 8
+and performs initialization. The file is sourced from a shell script and
+therefore can contain shell code.
+.Pp
+The following options are available:
+.Bl -tag -width indent-two
+.It Va HOSTNAME
+Sets the machine hostname. (Default: localhost)
+.It Va TIMEZONE
+Sets the time zone. You can get a list of timezones in the
+.Pa @SHAREDIR@/zoneinfo
+directory. The variable must be in the form
+.Ar Area/Region .
+(Default: empty)
+.Pp
+Note: this requires package
+.Ar tzdata
+to be installed.
+.It Va SERVICES
+This variable contains services to be started at boot. (Default: empty).
+.Pp
+In Vanilla Linux, services have no dependencies and therefore user is
+responsible of starting them is a specific order if needed. Thus, services
+marked in this list separated by spaces are executed in order.
+.Pp
+Entries in this variable should contain file names located in
+.Pa /etc/rc.d
+directory.
+.Pp
+Some services offer tunables to pass additional configuration to them. See the
+service file header for more information.
+.Pp
+Note: don't forget to mark the service file as executable or it won't be
+executed by init process.
+.It Va FONT
+Sets the console font. A list is available in @SHAREDIR@/kbd/consolefonts.
+(Default: empty).
+.Pp
+Note: this requires package
+.Ar kbd
+to be installed.
+.It Va KEYMAP
+Sets the console keymap. A list is available in @SHAREDIR@/kbd/keymaps.
+(Default: empty).
+.Pp
+Note: this requires package
+.Ar kbd
+to be installed.
+.It Va INTERFACES
+Interfaces to pass to
+.Pa /etc/rc.networking
+script during bootup and shutdown. Mostly used for static IP addresses. It's
+strongly advised to keep
+.Ar lo
+interface in this variable. (Default: lo)
+.Pp
+See the documentation in the
+.Pa /etc/rc.networking
+file.
+.It Va TTYS
+List of ttys to configure. (Default: tty1 to tty8).
+.Pp
+For each tty listed in this variable two variables
+.Va <TTY>_ARGS
+and
+.Va <TTY>_FONT
+can be specified where <TTY> is the uppercase tty number (e.g. TTY1 for tty1).
+The first one specifies the arguments to pass to the getty program which is set
+to
+.Dq 38400
+by default. The boolean _FONT option specifies if the tty must be configured
+with a font.
+.El
+.Sh EXAMPLES
+.Ss Starting sysklogd package
+The
+.Ar sysklogd
+package understand the variable
+.Va SYSKLOGD_ARGS
+and may be used instead. However, please note that setting this variable replace
+the original arguments so double check the service file before setting any
+variable.
+.Bd -literal
+SYSKLOGD_ARGS="-4"
+SERVICES="sysklogd"
+.Ed
+.Sh SEE ALSO
+.Xr rc 7

mercurial