“Elegance is not a dispensable luxury” — Edsger Wybe Dijkstra
Fast, Extensible Init for Linux Systems
Finit is a small event based SysV init replacement with built-in
process supervision similar to that of its more famous cousins
daemontools and runit. Services are supervised and
automatically restarted if they fail.
Finit targets small and embedded Linux systems by heavily reducing the
amount of context switches, forks, and calls to external tools that most
other init daemons suffer from.
Finit supports basic runlevels, process monitoring, and can launch
services on demand – either with the built-in inetd support, or by
triggering on Linux Netlink events like IFUP, IFDN or GW.
Finit can also be extended with custom callbacks for all services, hooks
into the boot process, or plugins to extend the functionality and adapt
the boot process to fit your needs. See the README for details.
# /etc/finit.conf - System bootstrap for TroglOSuser root
host default
# Default runlevelrunlevel2# Launch bootstrap servicesservice [S12345] /sbin/watchdogd -L -f -- System watchdog daemon
service [S12345] /sbin/syslogd -n -b 3 -D -- System log daemon
service [S12345] /sbin/klogd -n -- Kernel log daemon
# Services must not daemonize themselves, look for --foreground or# similar switches to standard services.#service [2345] /sbin/inetd -f -- Internet super daemonservice :1 [2345] <!IFUP:eth0,GW> /sbin/dropbear -R -F -p 22 -- SSH daemon
#service :2 [345] /sbin/dropbear -R -F -p 222 -- SSH daemon#service [2345] /sbin/telnetd -F -- Telnet daemon# Network bringup scriptnetwork/etc/init.d/networking# System patch or extension scripts, see run-parts(8).runparts/mnt/start.d# Inetd servicesinetd ftp/tcp nowait [2345] /sbin/uftpd -i -f -- FTP daemon
inetd tftp/udp wait [2345] /sbin/uftpd -i -y -- TFTP daemon
inetd time/udp wait [2345] internal -- UNIX rdate service
inetd time/tcp nowait [2345] internal -- UNIX rdate service
inetd3737/tcp nowait [2345] internal.time -- UNIX rdate service
inetd telnet/tcp@*,!eth1,!eth0, nowait [2345] /sbin/telnetd -i -F -- Telnet daemon
inetd2323/tcp@eth1,eth2,eth0 nowait [2345] /sbin/telnetd -i -F -- Telnet daemon
#inetd 222/tcp@eth0 nowait [2345] /sbin/dropbear -i -R -F -- SSH service#inetd ssh/tcp@*,!eth0 nowait [2345] /sbin/dropbear -i -R -F -- SSH service# Allow login on ttyUSB0, for systems with no dedicated console porttty [12345] /dev/ttyAMA0115200 vt100
tty [12345] /dev/ttyUSB0115200 vt100
console/dev/ttyAMA0
See TroglOS for an example of how to boot a small embedded system
with Finit.
This project is the continuation of the original finit by Claudio
Matsuoka, which was reverse engineered from syscalls of the
groundbreaking EeePC fastinit daemon – “gaps filled with frog DNA
…”
Issue tracker and GIT repository available at GitHub: