Skip to content

Finit v3.1

Choose a tag to compare

@troglobit troglobit released this 23 Jan 13:55
· 2299 commits to master since this release

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 --debug but also enable kernel debug
    • single, single user mode (no network)
    • rescue, new rescue mode
  • Support for IFF_RUNNING to netlink plugin => net/IFNAME/running
  • Support for restarting initctl API socket on SIGHUP
  • Greatly updated initctl status <JOB|NAME> command
  • Support for rlimit per service/run/task/inetd/tty, issue #45
  • Support for setting hard and soft rlimit for a resource at once
  • Support for auto-detecting serial console using Linux SysFS, the new tty @console eliminates the need to keep track of different console devices across embedded platforms: /dev/ttyS0, /dev/ttyAMA0, etc.
  • Add TTY nologin option. 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 DEV setting
  • Cosmetic change to login, pressing enter at the Press enter to ... prompt will now replace that line with the login issue text
  • Calling initctl without 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, and Loading 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 SIGPWR and then SIGTERM. 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 after mount -a
  • initctl: Add support for printing previous runlevel
  • initctl: Support short forms of all commands
  • initctl: Support for initctl touch <CONF> to be used with reload
  • 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/*.conf are now supported in /etc/finit.conf
  • Change .conf dependency + reload handling. Finit no longer relies on mtime of .conf files, 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-redirect to automatically redirect stdout and stderr of all applications to /dev/null
  • New pid sub-option to services when a service does not create a PID file, or when the PID file has another name. Issue #95
  • Greatly improved log sub-option to service/run/tasks, selectively redirect stdout and stderr using the new tool logit to either syslog or a logfile. Issue #44
  • Support for automatic log rotation of logfiles created by log option. Use configure --disable-logrotate on 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/mtab symlink if missing on system (bootmisc plugin)
  • New hook: hook/mount/post runs after mount -a but before the hook/mount/all, where bootmisc.so runs. This provides the possibility of running a second stage mount command before files in /run and similar are created
  • Skip gdbserver when unleashing the grim reaper at shutdown
  • Distribute and install docs/ and contrib/ 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_RECONF events
  • 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 initctl with STDOUT redirected
  • Fix regression in initctl start/stop <ID>, using name worked not id
  • Fix error handling in initctl start/stop without 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 /run instead of /var/run