Finit v3.1
Improvements to netlink.so plugin, per-service rlimit support, improved integration with watchdogd, auto-detect TTY console. Much improved debug, rescue and logging support. Also, many fixes to both big and small issues, most notably in the condition handling, which no longer is sensitive to time skips.
This version requires at least libuEv v2.1.0 and libite v2.0.1
Changes
- Support for more kernel command line settings:
- splash, enable boot progress
- debug, like
--debugbut also enable kernel debug - single, single user mode (no network)
- rescue, new rescue mode
- Support for
IFF_RUNNINGto netlink plugin =>net/IFNAME/running - Support for restarting
initctlAPI socket onSIGHUP - Greatly updated
initctl status <JOB|NAME>command - Support for
rlimitper service/run/task/inetd/tty, issue #45 - Support for setting
hardandsoftrlimit for a resource at once - Support for auto-detecting serial console using Linux SysFS, the new
tty @consoleeliminates the need to keep track of different console devices across embedded platforms:/dev/ttyS0,/dev/ttyAMA0, etc. - Add TTY
nologinoption. Bypasses login and skips immediately to a root shell. Useful during board bringup, in developer builds, etc. - Support for calling run/tasks on Finit internal HOOK points, issue #18
- Removed support for long-since deprecated
console DEVsetting - Cosmetic change to login, pressing enter at the
Press enter to ...prompt will now replace that line with the login issue text - Calling
initctlwithout any arguments or options now defaults to show status of all enabled services, and run/task/inetd jobs - Cosmetic change to boot messages, removed
Loading plugins ..., start of inetd services, andLoading configuration .... No end user knows what those plugins and configurations are, i.e. internal state+config - Change kernel WDT timeout (3 --> 30 sec) for built-in watchdog daemon
- Advise watchdog dawmon on shutdown and reboot using
SIGPWRand thenSIGTERM. It is recommended the daemon start a timer on the first signal, in case the shutdown process somehow hangs. - Handle
/etc/OverlayFS, reload /etc/finit.d/*.conf aftermount -a - initctl: Add support for printing previous runlevel
- initctl: Support short forms of all commands
- initctl: Support for
initctl touch <CONF>to be used withreload - initctl: Improved output of
initctl show <SVC> - Support reloading
/etc/finit.conf. The main finit.conf file previously did not support reloading at runtime, as of v3.1 all configuration directives supported in/etc/finit.d/*.confare now supported in/etc/finit.conf - Change
.confdependency + reload handling. Finit no longer relies on mtime of.conffiles, instead an inotify handler tracks file changes for time insensitive dependency tracking - Change condition handling to not rely on mtime but a generation id.
- New configure script option
--enable-redirectto automatically redirectstdoutandstderrof all applications to/dev/null - New
pidsub-option to services when a service does not create a PID file, or when the PID file has another name. Issue #95 - Greatly improved
logsub-option to service/run/tasks, selectively redirectstdoutandstderrusing the new toollogitto either syslog or a logfile. Issue #44 - Support for automatic log rotation of logfiles created by
logoption. Useconfigure --disable-logrotateon systems with a dedicated log rotation service. Issue #44 - Support for disabling service/run/task progress with empty
--description. Note: no description separator gives a default desc. - Create
/etc/mtabsymlink if missing on system (bootmisc plugin) - New hook:
hook/mount/postruns aftermount -abut before thehook/mount/all, wherebootmisc.soruns. This provides the possibility of running a second stage mount command before files in/runand similar are created - Skip
gdbserverwhen unleashing the grim reaper at shutdown - Distribute and install
docs/andcontrib/directories
Fixes
- Reset TTY before restarting it. A program may manipulate the TTY in various ways before the user logs out, Finit needs to reset the TTY to a sane state before restarting it. Issue #84
- On .conf parse errors, do not default to set TTY speed 38400, reuse current TTY speed instead
- Fix run/tasks, must be guaranteed to run once per declared runlevel. All run/tasks on
[S]with a condition<...>failed to run. Finit now tracks run/tasks more carefully, waiting for them to finish before switching to the configured runlevel at boot. Issue #86 - Allow inetd services to be registered with a unique ID, e.g.
:161, issue #87. Found by Westermo - inetd: drop UDP packets from blocked interfaces, issue #88
- Handle obscure inter-plugin dependency issue by calling the netlink plugin before the pidfile plugin on
HOOK_SVC_RECONFevents - Handle event loop failure modes, issue found by Westermo
- Handle API socket errors more gracefully, restart socket
- Do not attempt to load kernel modules more than once at bootstrap
- Remove reboot symlinks properly on uninstall
- Fix regression in condition handling, reconf condition must be kept as a reference point to previous reconfiguration, or bootstrap.
- Fix nasty race condition with internal service stop, abort kill if the service has already terminated, otherwise we may do
kill(0, SIGKILL) - Fix reconfiguration issue with (very quick) systems that don't have highres timers
- Fix formatting of runlevel string in
initctl show - Allow running
initctlwithSTDOUTredirected - Fix regression in
initctl start/stop <ID>, using name worked not id - Fix error handling in
initctl start/stopwithout any argument - Fix issue #81 properly, remove use of SYSV shm IPC completely. Finit now use the API socket for all communication between PID 1 and initctl
- Fix segfault on x86_64 when started with kernel cmdline
--debug - Normalize condition paths on systems with
/runinstead of/var/run