Finit 4.0 initialization system available

After about three years of development, the Finit 4.0 (Fast init) init system has been released, developed as a simple alternative to SysV init and systemd. The project is based on a reverse engineering of the fastinit init system used in the Linux firmware of EeePC netbooks, which is notable for its very fast boot process. The system is primarily aimed at booting compact and embedded systems, but can also be used for general desktop and server environments. Sample embedding scripts have been prepared for Void Linux, Alpine Linux and Debian GNU/Linux. The project code is written in C and distributed under the MIT license.

Finit supports SysV init-style runlevels, monitoring the health of background processes (automatically restarting the service in case of failure), executing one-time handlers, starting services with dependencies and arbitrary conditions, attaching additional handlers to run before or after the service is executed. For example, you can configure the service to start only after network access is available, or after some other service, such as syslogd, is started. Cgroups v2 is used to set limits.

To expand the functionality and adapt to your needs, plugins can be used, for which a system of hooks is provided that allows you to attach a handler to various stages of loading and executing services, as well as provide binding to external events. For example, plugins have been prepared to support D-Bus, ALSA, netlink, resolvconf, hot plugging devices, checking availability and loading of kernel modules, handling PID files, and setting up the environment for the X server.

It supports the use of generic scripts to start services created for SysV init (/etc/rc.d and /etc/init.d are not used, but support for /etc/inittab can be implemented through a plugin), as well as rc.local scripts, files with environment and network settings /etc/network/interfaces, as in Debian and BusyBox. Settings can either be defined in a single configuration file /etc/finit.conf or distributed across multiple files in the /etc/finit.d directory.

Management is carried out through the standard initctl and run-parts toolkit, which allows you to activate and deactivate services in relation to run levels, as well as selectively start some of the services. Finit also includes a built-in getty implementation (terminal and user login management), a watchdog for health monitoring, and a crash recovery mode with built-in sulogin to run an isolated command shell.

Finit 4.0 initialization system available

Among the changes added in the Finit 4.0 release (version 3.2 was skipped due to backward compatibility changes):

  • The separate reboot utility has been replaced with a symbolic link to initctl, similar to the halt, shutdown, poweroff, and suspend utilities.
  • Implemented indication of the progress of operations.
  • The operation of the "inictl cond set|clear COND" commands has been changed to bind actions to various events. The syntax used to identify services is instead of binding to paths .
  • Removed the built-in implementation of the inetd server, where xinetd can be installed if necessary.
  • Added support for cgroups v2 to run services in separate cgroups.
  • Added crash recovery mode with custom suslogin.
  • Added support for start/stop scripts from SysV init.
  • Added pre:script and post:script handlers that allow you to specify your actions to be performed before or after starting the service.
  • Added support for env:file with environment variables.
  • Added the ability to track arbitrary PID files.
  • Added the ability to launch tasks and services using relative paths.
  • Added "-b" option to initctl to perform actions in non-interactive mode (batch mode).
  • The built-in watchdog has been replaced with a separate watchdogd variant.
  • Added plugin for automatic loading of kernel modules for devices connected during operation.
  • Added plugin to handle /etc/modules-load.d/.
  • Added support for automatically restarting services after changing settings, eliminating the need to manually execute the "initctl reload" command. Disabled by default and requires rebuilding with "./configure --enable-auto-reload".
  • Added the ability to log operations that affect security, such as changing the runlevel, starting and stopping services, service failures.
  • Improved support for /etc/network/interfaces.

    Source: opennet.ru

Add a comment