Finit v4.1
Bug fix release. Also disables handlers for SIGINT and SIGPWR, a new set of sys conditions are instead generated which can be used to trigger external programs.
Changes
- Change behavior on SIGUSR1 to be compatible with sysvinit and systemd. Previously SIGUSR1 caused Finit to halt, like BusyBox init. This had "interesting" side effects on Debian systems when coexisting with sysvinit (upgrading/reinstalling causes scripts to
kill -USR1 1) - Change how
contrib/debian/install.shsets up a Grub boot entry for finit. We now modify the $SUPPORTED_INITS variable in10_linux - Disable default kernel ctrl-alt-delete handler and let Finit instead catch
SIGINTfrom kernel to be able to perform a proper reboot. There is no default command for this, you need to set up a task that triggers on<sys/key/ctrlaltdel>to issueinitctl reboot - Added keventd to provide
<sys/pwr/ac>condition to Finit. keventd is currently only responsible for monitoring/sys/class/power_supplyfor changes to active AC mains power online status. Enable keventd withconfigure --with-keventd - For handling power fail events (from UPS and similar) a process may send
SIGPWRto PID 1. Finit no longer redirects this toSIGUSR1(poweroff). There is no default command for this, you need to set up a task that triggers on<sys/pwr/fail>to issueinitctl poweroff - Built-in Finit getty is now a standalone program
- Default termios for TTYs now enable
IUTF8on input - If
/bin/loginis not found, Finit now triessuloginbefore it falls back to an unauthenticated/bin/sh - Dropped (broken) support for multiple consoles. Finit now follows the default console selected by the kernel,
/dev/console - Dropped signal handlers for SIGSTOP/TSTP and SIGCONT
- Added support for
\n, in addition to\r, in "Please press Enter" prompt before starting getty - Finit no longer parses
/proc/cmdlinefor its options. Instead all options are by default now read fromargv[], like a normal program, this is also what the kernel does by default. Please note, this may not work if your systems boots with an initramfs (ymmv), for such cases, seeconfigure --enable-kernel-cmdline - The following plugins are now possible to disable (for containers):
rtc.so,urandom.so, you may also want to disablehotplug.so. They are all enabled by default, as in Finit 4.0, but may be moved to external tools or entries infinit.confin Finit 5.0 - Added support for reading
PRETTY_NAMEfrom/etc/os-releaseto use as heading in progress output, unless--with-heading=GREETis used. - Added manual pages for finit(8), initctl(8), and finit.conf(5)
Fixes
-
Stricter interface name validation in netlink plugin, modeled after the kernel. Suggested by Coverity Scan
-
Fix problem of re-registering a service as a task. Previously, if a fundamental change, like type, was made to an active service/run/task it did not take. Only possible workaround was to remove from config
-
initctl: drop warning when removing a non-existing usr condition
-
initctl: drop confusing
errno 0when timing out waiting for reply -
Ensure services in plugins and from Finit main belong to a cgroup
-
Ensure init top-level cgroup remains a leaf group
-
Fix tty parse error for detecting use of external getty
-
Fix default
name:and:IDfor tty's, e.g.ttyS0now givestty:S0as expected. This was default for built-in getty already -
Fix max username (32 chars) in bundled Finit getty
-
The
contrib/*/install.shscripts failed to run from tarball -
Finit no longer forcibly mounts;
/dev,/proc, or/sys, instead it checks first if they are already mounted (devtmpfs or container) -
Fix
/etc/fstabparser to properly check for 'ro' to not remount the root filesystem at boot. The wrong field was read, so a root mounted by an initramfs, or by lxc for a container, had their root remounted -
Fix SIGCHLD handler,
waitpd()may be interrupted by a signal -
Reset
startingflag of services being stopped. When a service is started and then stopped before it has created its pid file, it could be left forever in the stopping state, unless we reset the starting flag. -
Fix #170: detect loss of default route when interfaces go down. This emulates the missing kernel netlink message to remove the condition net/default/route to allow stopping dependent services
-
Fix #171: restore automatic mount of
/dev/shm,/dev/pts,/runand/tmp, unless mounted already by/etc/fstab. This is what most desktop systems expect PID 1 to do. Here we also make sure to mount/run/lockas a tmpfs as well, with write perms for regular users, this prevents regular users from filling up/runand causing DoS. -
Fix #173: netlink plugin runs out of socket buffer space;
finit[1]: nl_callback():recv(): No buffer space availableFixed by adding support for resync with kernel on
ENOBUFS. See netlink(7) for details. As a spin-off the plugin now supports any number of interfaces and routes on a system. On resync, the following message is now logged, as a warning:finit[1]: nl_callback():busy system, resynchronizing with kernel. -
Fix #174: loss of log messages using combo of prio and facility, e.g.,
logit(LOG_CONSOLE | LOG_NOTICE, ...), by Jacques de Laval, Westermo -
Fix #175: ensure Finit does not acquire a controlling TTY when checking if a device is a TTY before starting a getty. This fixes an old bug where Ctrl-C after logout from a shell could cause PID 1 to get SIGINT, which in turn could lead to a system reboot