Releases: troglobit/finit
Finit v4.3
Critical bug fix release. If you run a 32-bit target with GLIBC 2.34 you need to upgrade!
Note: system verbosity on console at start and shutdown has been
increased. Now the output of all commands is logged to the
system logger, for early services/dev/kmsg
is used.Also: please notice the updated support for enabling and disabling
kernel and Finit debug messages on the system console. Very
useful when debugging either of them, e.g., a kernel module.
For details, see cmdline.md.
Changes
- Support for overriding default runlevel from kernel command line. Any runlevel
[1-9]
may be selected, except 6 (reboot). Issue #261 - New command line option:
finit.fstab=/etc/fstab.custom
, with full support for mounting, mount helpers, fsck, and swapon/off, issue #224 - Support for special device
/dev/root
, which may not exist in/dev
. Finit now looks up the matching block device for/
in/sys/block/
- Loading
module
s no longer shows arguments in progress output - Warning messages in progress output now in yellow, not red, issue #214
initctl
, new command line option-V,--version
for ease of use- New condition
done
for run task, issue #207 by Ming Liu, Atlas Copco - Refactor parts of shutdown and reboot sequence for PREEMPT-RT kernels, by Robert Andersson, Mathias Thore, and Ming Liu, Atlas Copco
- Conditions for run/task/sysv status, e.g.
run/foo/success
andtask/bar/failure
. Issue #232, by Ming Liu, Atlas Copco - Conditions for services, can be used to synchronize other stanzas:
service/foo/running
service/foo/halted
service/foo/missing
service/foo/crashed
service/foo/stopped
service/foo/busy
service/foo/restart
initctl signal
support, by Jörgen Sigvardsson, issue #225initctl cond get
support to matchcond [set | clear]
, issue #255[WARN]
messages on console now printed in yellow, issue #214- Network services now also stopped when going to runlevel 6 (reboot), not just runlevel 0 (shutdown) or 1 (single-user)
- When
ifup
is missing on the system, bring at leastlo
up at boot - Log output from
ifup -a
(andifdown -a
), to syslog - Avoid blocking PID 1 when starting SysV init scripts
- Allow custom
pid:
for SysV init scripts - Document supported types of forking/non-forking services
- Auto-detect running in some common forms of containers
- Simplify shutdown/reboot when running in a container
- Log to
stderr
when running in a container w/o syslog daemon - Add support for
type:forking
to services, already supported but with a very difficultpid:
syntax, issue #223. Docs updated - Support for setting global environment variables in
finit.conf
, please note: this also affects Finit itself, be careful! - Extended environment variables for pre/post scripts, issue #189
- Document secret service option
respawn
, which bypasses the crash semantics, allowing endless restarts - Document secret
HOOK_BANNER
, the first hook point before the banner - Document slightly confusing
initctl reload foo
command. It does not reload the service's.conf
file! Issue #263 - Log changes; all instances where previously the
basename cmd
of a service was used to identify the service, now the propername:id
is used instead. Meaning, a service without a custom:ID
orname:
will display the same as before, but with any of those customization the name and name:id will now be shown. Note: this may affect any log scrapers out there! - New plugin:
hook-scripts
, allows run-parts(8) style scripts to run on any hook point. Contributed by Tobias Waldekranz initctl
(reboot
) falls back to-f
when it detects it is insulogin
recovery mode, issue #247- The bundled
sulogin
is no longer enabled by default, in favor of distribution versions. Enable with./configure --with-sulogin
- Support args to sysv-like scripts, e.g.
bridge-stp br0 start
- The
modules-load
plugin now skips all lines starting with#
and;
. Furthermore, files in/etc/modules-load.d/*.conf
are now read in lexicographic order and UNIX backup files (foo.conf~
) are skipped - The
name:id
tuple is now more consistently used in all log and debug messages instead of the basename of the command - Simplify error output of
initctl start/stop/restart/signal
, no more extra usage help, just a plain error message - Exit codes of
initctl
have changed to use LSB script standard and BSD sysexits.h exit codes. As before, a non-zero exit is error or missing - Add support for
initctl -q
to more commands: stop, start, restart, reload, signal, etc.
Fixes
- Fix nasty 32/64-bit alignment issue between finit and its plugins, applicable to 32-bit targets with GLIBC 2.34 and later. External plugins must make sure to use, at least:
-D_TIME_BITS=64
- Fix #215: disable cgroup support at runtime if kernel lacks support or does not have the required controllers (cpu)
- Fix #217: iwatcher initialization issue, by Ming Liu, Atlas Copco
- Fix #218: initctl matches too many services, by Ming Liu, Atlas Copco
- Fix #219: not all filesystems unmounted at shutdown, by Ming Liu, Mathias Thore, and Robert Andersson, Atlas Copco
- Fix #226: initctl shows wrong PID for crashing services
- Fix #227: reboot stalls if process stopped with
[WARN]
- Fix #233: initctl shows wrong status for run/task, by Sergio Morlans and Ming Liu, Atlas Copco
- Fix #248: source
env:file
also inpre:
andpost
scripts - Fix #260: drop limit on device name in
Checking filesystem...
output - Fix start/stop and monitoring (restart) of SysV init scripts and forking services, see the updated documentation for details
- Fix call to
swapoff
at shutdown, does not support-e
flag - Fix suspend to RAM issue. Previously
reboot(RB_SW_SUSPEND)
was used, now the modern/sys/power/state
API is used instead. - Fix nasty run/task/service matcher bug, triggered by stanzas using the same basename of a command but different
:ID
. Caused Finit to match with already registered but different run/task/service
Finit v4.3-rc2
Critical bug fix release. If you run a 32-bit target with GLIBC 2.34 you need to upgrade!
Note: system verbosity on console at start and shutdown has been
increased. Now the output of all commands is logged to the
system logger, for early services/dev/kmsg
is used.Also: please notice the updated support for enabling and disabling
kernel and Finit debug messages on the system console. Very
useful when debugging either of them, e.g., a kernel module.
For details, see cmdline.md.
Changes
- Support for overriding default runlevel from kernel command line. Any runlevel
[1-9]
may be selected, except 6 (reboot). Issue #261 - New command line option:
finit.fstab=/etc/fstab.custom
, with full support for mounting, mount helpers, fsck, and swapon/off, issue #224 - Support for special device
/dev/root
, which may not exist in/dev
. Finit now looks up the matching block device for/
in/sys/block/
- Loading
module
s no longer shows arguments in progress output - Warning messages in progress output now in yellow, not red, issue #214
initctl
, new command line option-V,--version
for ease of use- New condition
done
for run task, issue #207 by Ming Liu, Atlas Copco - Refactor parts of shutdown and reboot sequence for PREEMPT-RT kernels, by Robert Andersson, Mathias Thore, and Ming Liu, Atlas Copco
- Conditions for run/task/sysv status, e.g.
run/foo/success
andtask/bar/failure
. Issue #232, by Ming Liu, Atlas Copco - Conditions for services, can be used to synchronize other stanzas:
service/foo/running
service/foo/halted
service/foo/missing
service/foo/crashed
service/foo/stopped
service/foo/busy
service/foo/restart
initctl signal
support, by Jörgen Sigvardsson, issue #225initctl cond get
support to matchcond [set | clear]
, issue #255[WARN]
messages on console now printed in yellow, issue #214- Network services now also stopped when going to runlevel 6 (reboot), not just runlevel 0 (shutdown) or 1 (single-user)
- When
ifup
is missing on the system, bring at leastlo
up at boot - Log output from
ifup -a
(andifdown -a
), to syslog - Avoid blocking PID 1 when starting SysV init scripts
- Allow custom
pid:
for SysV init scripts - Document supported types of forking/non-forking services
- Auto-detect running in some common forms of containers
- Simplify shutdown/reboot when running in a container
- Log to
stderr
when running in a container w/o syslog daemon - Add support for
type:forking
to services, already supported but with a very difficultpid:
syntax, issue #223. Docs updated - Support for setting global environment variables in
finit.conf
, please note: this also affects Finit itself, be careful! - Extended environment variables for pre/post scripts, issue #189
- Document secret service option
respawn
, which bypasses the crash semantics, allowing endless restarts - Document secret
HOOK_BANNER
, the first hook point before the banner - New plugin:
hook-scripts
, allows run-parts(8) style scripts to run on any hook point. Contributed by Tobias Waldekranz initctl
(reboot
) falls back to-f
when it detects it is insulogin
recovery mode, issue #247- The bundled
sulogin
is no longer enabled by default, in favor of distribution versions. Enable with./configure --with-sulogin
- Support args to sysv-like scripts, e.g.
bridge-stp br0 start
- The
modules-load
plugin now skips all lines starting with#
and;
. Furthermore, files in/etc/modules-load.d/*.conf
are now read in lexicographic order and UNIX backup files (foo.conf~
) are skipped - The
name:id
tuple is now more consistently used in all log and debug messages instead of the basename of the command
Fixes
- Fix nasty 32/64-bit alignment issue between finit and its plugins, applicable to 32-bit targets with GLIBC 2.34 and later. External plugins must make sure to use, at least:
-D_TIME_BITS=64
- Fix #215: disable cgroup support at runtime if kernel lacks support or does not have the required controllers (cpu)
- Fix #217: iwatcher initialization issue, by Ming Liu, Atlas Copco
- Fix #218: initctl matches too many services, by Ming Liu, Atlas Copco
- Fix #219: not all filesystems unmounted at shutdown, by Ming Liu, Mathias Thore, and Robert Andersson, Atlas Copco
- Fix #226: initctl shows wrong PID for crashing services
- Fix #227: reboot stalls if process stopped with
[WARN]
- Fix #233: initctl shows wrong status for run/task, by Sergio Morlans and Ming Liu, Atlas Copco
- Fix #248: source
env:file
also inpre:
andpost
scripts - Fix #260: drop limit on device name in
Checking filesystem
...` output - Fix start/stop and monitoring (restart) of SysV init scripts and forking services, see the updated documentation for details
- Fix call to
swapoff
at shutdown, does not support-e
flag - Fix suspend to RAM issue. Previously
reboot(RB_SW_SUSPEND)
was used, now the modern/sys/power/state
API is used instead. - Fix nasty run/task/service matcher bug, triggered by stanzas using the same basename of a command but different
:ID
. Caused Finit to match with already registered but different run/task/service
Finit v4.3-rc1
Critical bug fix release. If you run a 32-bit target with GLIBC 2.34 you need to upgrade!
Note: system verbosity on console at start and shutdown has been
increased. Now the output of all commands is logged to the
system logger, for early services/dev/kmsg
is used.Also: please notice the updated support for enabling and disabling
kernel and Finit debug messages on the system console. Very
useful when debugging either of them, e.g., a kernel module.
For details, see cmdline.md.
Changes
- Loading
module
s no longer shows arguments in progress output - Warning messages in progress output now in yellow, not red, issue #214
initctl
, new command line option-v,--version
for ease of use- Extended environment variables for pre/post scripts, issue #189
- New condition
done
for run task, issue #207 by Ming Liu, Atlas Copco - Refactor parts of shutdown and reboot sequence for PREEMPT-RT kernels, by Robert Andersson, Mathias Thore, and Ming Liu, Atlas Copco
- Conditions for run/task/sysv status, e.g.
run/foo/success
andtask/bar/failure
. Issue #232, by Ming Liu, Atlas Copco - initctl support for sending signals to services, by Jörgen Sigvardsson, issue #225
[WARN]
messages on console now printed in yellow, issue #214- Network services now also stopped when going to runlevel 6 (reboot), not just runlevel 0 (shutdown) or 1 (single-user)
- When
ifup
is missing on the system, bring at leastlo
up at boot - Log output from
ifup -a
(andifdown -a
), to syslog - Avoid blocking PID 1 when starting SysV init scripts
- Allow custom
pid:
for SysV init scripts - Document supported types of forking/non-forking services
- Auto-detect running in some common forms of containers
- Simplify shutdown/reboot when running in a container
- Log to
stderr
when running in a container w/o syslog daemon - Add support for
type:forking
to services, already supported but with a very difficultpid:
syntax. Documentation updated
Fixes
- Fix nasty 32/64-bit alignment issue between finit and its plugins, applicable to 32-bit targets with GLIBC 2.34 and later. External plugins must make sure to use, at least:
-D_TIME_BITS=64
- Fix #215: disable cgroup support at runtime if kernel lacks support or does not have the required controllers (cpu)
- Fix #217: iwatcher initialization issue, by Ming Liu, Atlas Copco
- Fix #218: initctl matches too many services, by Ming Liu, Atlas Copco
- Fix #219: not all filesystems unmounted at shutdown, by Ming Liu, Mathias Thore, and Robert Andersson, Atlas Copco
- Fix #226: initctl shows wrong PID for crashing services
- Fix #227: reboot stalls if process stopped with
[WARN]
- Fix #233: initctl shows wrong status for run/task, by Sergio Morlans and Ming Liu, Atlas Copco
- Fix start/stop of SysV init scripts
- Fix call to
swapoff
at shutdown, does not support-e
flag - Fix suspend to RAM issue. Previously
reboot(RB_SW_SUSPEND)
was used, now the modern/sys/power/state
API is used instead.
Finit v4.2
The "Try before you buy!" release. For more information, see this blog post.
Changes
- Support for non-root users to use
initctl
, e.g. group wheel - Support for new libite (-lite) header namespace
- RTC plugin now reset an invalid RTC time to the kernel default time, 2000-01-01 00:00, prevents errors and is less crazy than some systems coming with with <= Jan 1, 1970
- urandom plugin now use RNDADDENTROPY ioctl to seed kernel rng, incrementing entropy count. Also, 32 kiB instead of 512 bytes are now saved (and restored) on reboot. This should greatly improve reliability of systems with none or poor HWRNG
- Kernel logging to console (loglevel >= 7, debug, when quiet mode is not used) is now honored by Finit, regardless of the finit.debug command line option
- Reduced default log level from
LOG_NOTICE
toLOG_INFO
- Wrapped all calls to mount(2) to add logging in case of failure
- New configure options to control fastboot (no fsck) and fsck fix options, by Ming Liu, Atlas Copco
- Support for overriding default
/etc/nologin
file with an external#define
, by Ming Liu, Atlas Copco - Support for overriding default
/var/run/dbus/pid
file with an external#define
, by Ming Liu, Atlas Copco - Support for more service options to control respawn behavior of crashing services, by Robert Andersson and Ming Liu, Atlas Copco
- Support for
initctl ident [NAME]
which lists all instances ofNAME
, or all enabled system run/tasks and services - Show number of total restarts and current respawn count for a service in
initctl status foo
- Crashing services no longer have the crash/restart counter reset as soon as they have stabilized. Instead, a background timer will slowly (every 300 sec) age (decrement) the counter. This will still catch services that "rage quit", but also those that crash after a longer period of activity
Fixes
- Fix #180: user managed (
manual:yes
) services accidentally started byinitctl reload
, regression introduced in Finit v4.0 - Fix #181: lots of typos all over the tree, by David Yang, Debian
- Fix #187: fix typos, incl. small cleanup, in doc/bootstrap.md
- Fix #188: support running on kernels that do not have cgroups v2. When this is detect, all functions related to cgroups support in Finit are disabled, except the .conf file parser. Hence, you may get parse error if you have invalid cgroup configuration in your Finit .conf files
- Fix #197:
initctl status foo
now shows a focused overview of all matching instances; foo:1, foo:2 -- if only one instance matches the command line argument, or if onle one instance exists, the detailed view is shown, as before - Fix #198: a few typos found by Tim Gates
- Fix #199: avoid using C++ reserved keywords
- Fix #201: memory leak in usr condition plugin, by Ming Liu, Atlas Copco
- Fix #203: ensure all filesystems listed in /proc/mounts are properly unumounted on shutdown/reboot, by Robert Andersson, Atlas Copco
- Fix #210: resizing terminal (smaller) after boot causes empty lines to be inserted between boot progress
- Fix #211: drop hard-coded 32 character limit in getty, now reads
_SC_LOGIN_NAME_MAX
fromsysconf(3)
- Fix #212: service PID file lost after inictl reload, visible from the output from
initctl status foo
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.sh
sets 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
SIGINT
from 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_supply
for 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
SIGPWR
to 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
IUTF8
on input - If
/bin/login
is not found, Finit now triessulogin
before 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/cmdline
for 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.conf
in Finit 5.0 - Added support for reading
PRETTY_NAME
from/etc/os-release
to use as heading in progress output, unless--with-heading=GREET
is 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 0
when 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:ID
for tty's, e.g.ttyS0
now givestty:S0
as expected. This was default for built-in getty already -
Fix max username (32 chars) in bundled Finit getty
-
The
contrib/*/install.sh
scripts 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/fstab
parser 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
starting
flag 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
,/run
and/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/lock
as a tmpfs as well, with write perms for regular users, this prevents regular users from filling up/run
and causing DoS. -
Fix #173: netlink plugin runs out of socket buffer space;
finit[1]: nl_callback():recv(): No buffer space available
Fixed 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
Finit v4.1-rc2
Bug fix release for Debian and buildroot based containers. 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.sh
sets 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
SIGINT
from 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_supply
for 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
SIGPWR
to 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
IUTF8
on input - If
/bin/login
is not found, Finit now triessulogin
before 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
- Finit no longer parses
/proc/cmdline
for 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.conf
in Finit 5.0
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 0
when 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:ID
for tty's, e.g.ttyS0
now givestty:S0
as expected. This was default for built-in getty already -
Fix max username (32 chars) in bundled Finit getty
-
The
contrib/*/install.sh
scripts 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/fstab
parser 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 #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
,/run
and/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/lock
as a tmpfs as well, with write perms for regular users, this prevents regular users from filling up/run
and causing DoS. -
Fix #173: netlink plugin runs out of socket buffer space;
finit[1]: nl_callback():recv(): No buffer space available
Fixed 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
Finit v4.1-rc1
Bug fix release.
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.sh
sets up a Grub boot entry for finit. We now modify the $SUPPORTED_INITS variable in10_linux
Fixes
- Stricter interface name validation in netlink plugin, modeled after the kernel. Suggested by Coverity Scan
- The
contrib/*/install.sh
scripts failed to run from tarball - 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
,/run
and/tmp
, unless mounted already by/etc/fstab
. This is what most
desktop systems expect PID 1 to do
Finit v4.0
This release became v4.0, and not v3.2, because of incompatible changes to service conditions. There are other significant changes as well, so make sure to read the whole change log when upgrading.
Changes
- The stand-alone
reboot
tool has been replaced with a symlink toinitctl
, like its siblings: halt, shutdown, poweroff, and suspend. Callingreboot
& C:o now defaults to the correspondinginitctl cmd
with a fallback to sending signals as per traditional SysV init. The-f
(force) flag remains, wherereboot(2)
is called directly - Introducing Finit progress 𝓜𝓸𝓭𝓮𝓻𝓷
- The
inictl cond set|clear COND
have changed completely. Constrained to a flat<usr/...>
namespace and automatically activated by a newusr.so
plugin that checks services for usr condition changes - Removed built-in inetd super server. If you need this functionality, use an external inetd, like xinetd, instead. A pull request for a stand-alone inetd, like watchdogd and getty, is most welcome!
- Incompatible
configure
script changes, i.e., no guessing--prefix
and other paths. Also, many options have been changed, renamed, or flipped defaults, or even dropped altogether. There are examples in the documentation and thecontrib/
section - Service conditions change from the non-obvious
<svc/path/to/foo>
to<pid/foo:id>
. Not only does this give simpler internal semantics, it hopefully also makes it clear that one service'spid:!foo
pidfile is another service's<pid/foo>
condition, issue #143 - Initial support for cgroups v2:
- services runs in a cgroup named after their respective *.conf file
- top-level groups are; init, user, and system
- all top-level groups can be configured from finit *.conf files
- each service can tweak the cgroup settings
- Use
initctl [top|ps|cgroup]
commands to inspect runtime state - https://twitter.com/b0rk/status/1214341831049252870?s=20
- Major refactor of Finit's
main()
function to be able to start the event loop earlier. This also facilitated factoring out functionality previously hard-coded in Finit, e.g., starting the bundled watchdogd, various distro packed udevd and other hotplugging tools - A proper rescue mode has been added. It is started extremely early and is protected with a bundled
suslogin
. Exiting rescue mode now brings up the system as a normal boot, as one expects - Support for
sysv
start/stop scripts as well as monitoring forking services, stared usingsysv
orservice
stanza - Support for custom
kill:DELAY
, default 3 sec. - Support for custom
halt:SIGNAL
, default SIGTERM - Support for
pre:script
andpost:script
, allows for setup and teardown/cleanup before and after a service runs, issue #129 - Support for
env:file
in/etc/default/foo
or/etc/conf.d/foo
, see the contrib section for examples that utilize this feature. Variables expanded from env files, and the env files themselves, are tracked for changes to see if a service .conf file is "dirty" and needs restart oninitctl reload
- Support for tracking custom PID files, using
pid:!/path/to/foo.pid
, useful with newsysv
orservice
which fork to background - Support starting run/task/services without absolute path, trust
$PATH
- Add support for
--disable-doc
and--disable-contrib
to speed up builds and work around issue with massively parallel builds - Support for
@console
also for external getty - Support for
notty
option to built-in getty, for board bring-up - Support for
rescue
option to built-in getty, for rescue shells - Add
-b
, batch mode, for non-interactive use toinitctl
- Prefer udev to handle
/dev/
if mdev is also available - Redirect dbus daemon output to syslog
- Set
$SHELL
, like$PATH
, to a sane default value, needed by BusyBox - Finit no longer automatically reloads its
*.conf
files after running/etc/rc.local
or run-parts. Useinitctl reload
instead. initctl
without an argument or option now defaults to list services- Convert built-in watchdog daemon to standalone mini watchdogd, issue #102
- Improved watchdog hand-over, now based on
svc_t
and not PID - Extended bootstrap, runlevel S, timeout: 10 --> 120 sec. before services not allowed in the runtime runlevel are unconditionally stopped
- Removed
HOOK_SVC_START
andHOOK_SVC_LOST
, caused more problems than they were worth. Users are encouraged to use accounting instead - Skip displaying "Restarting ..." progress for bootstrap processes
- Added a simple work queue mechanism to queue up work at boot + runtime
- Postpone deletion of
svc_t
until anySIGKILL
timer has elapsed - As long as a stepped service changes state we queue another step all event, because services may depend on each other
- Postpone deletion of
- Require new libuEv API:
uev_init1()
to reduce event cache so that the kernel can invalidate deleted events before enqueing to userspace - Rename
hwclock.so
plugin tortc.so
since it now is stand-alone from thehwclock
tool. Note: the kernel can also be set to load and store RTC to/from system clock at boot/halt as well, issue #110 - New plugin to support cold plugging devices, auto-loading of modules at boot. Detects required modules by reading
/sys/devices/*
- New plugin for
/etc/modules-load.d/
by Robert Andersson, Atlas Copco - New
name:foo
support for services, by Robert Andersson, Atlas Copco - New
manual:yes
support for services, by Robert Andersson, Atlas Copco - New
log:console
support for services, by Robert Andersson, Atlas Copco - Support for
:ID
as a string, by Jonas Johansson, Westermo - Support for auto-reload, instead of having to do
initctl reload
, when a service configuration has changed. Disabled by default, but can be enabled with./configure --enable-auto-reload
- Support for logging security related events, e.g., runlevel change, start/stop or failure to start services, by Jonas Holmberg, Westermo
- Mount devtpts with recommended
ptxmode=0666
- Mount /run tmpfs with nosuid,nodev,noexec for added security
- Support for
console
as alias for@console
in tty stanzas - Drop
--enable-rw-roots
configure option, userw
for your/
partition in/etc/fstab
instead to trigger remount at boot - Drop default tty speed (38400) and use 0 (kernel default) instead
- Make
:ID
optional, use NULL/zero internally this allows ... - Handle use-cases where multiple services share the same PID file and thus the same condition path, e.g. different instances for different runlevels. Allow custom condition path with
name:foo
syntax, creates conditions w/o a path, and ... - Always append
:ID
qualifier to conditions if set for a service - The IPC socket has moved from
/run/finit.sock
to/run/finit/socket
officially only supported for use by theinitctl
tool - The IPC socket now uses
SOCK_SEQPACKET
instead ofSOCK_STREAM
.
Recommend using watchdogd v3.4, or later, which support this - Improved support for modern
/etc/network/interfaces
, which has include statements. No more nativeifup
of individual interfaces,
Finit now callsifup -a
, orifdown -a
, delegating all details to the operating system. Also, this is now done in the background, by popular request
Fixes
- Fix #96: Start udevd as a proper service
- Ensure we track run commands as well as task/service, once per runlevel
- Ensure run/tasks also go to stopping state on exit, like services, otherwise it is unnecessarily hard to restart them
- Fix missing OS/Finit title bug, adds leading newline before banner
- Remove "Failed connecting to watchdog ..." error message on systems that do not have a watchdog
- Fix #100: Early condition handling may not work if
/var/run
does not yet exist (symlink to/run
). Added compat layer for access - Fix #101: Built-in inetd removed
- Fix #102: Start built-in watchdogd as a regular service
- Fix #103: Register multiple getty if
@console
resolves to >1 TTY, - Fix #105: Only remove /etc/nologin when moving from runlevel 0, 1, 6. Fixed by Jonas Johansson, Westermo
- Fix #109: Support for PID files in sub-directories to
/var/run
- Handle rename of PID files, by Robert Andersson, Atlas Copco
- Fix #110: automatic modprobe of RTC devices, built-in hwclock
- Fix #120: Redirect
stdin
to/dev/null
for services by default - Fix #122: Switch to
nanosleep()
to achieve "signal safe" sleep. Fixed by Jacques de Laval, Westermo - Fix #124: Lingering processes in process group when session leader exits. E.g., lingering
logit
processes when parent dies - Fix #127: Show all runparts scripts as they start, like
rc.local
. Fixed by Jacques de Laval, Westermo - Fix service name matching, e.g. for condition handling, may match with wrong service. Fixed by Jonas Holmberg, Westermo
- Run all run-parts scripts using
/bin/sh -c foo
just like the standard run-parts tool. Found by Magnus Malm, Westermo - Fix
initctl [start | restart]
, should behave the same for services that have crashed. Found by Mattias Walström, Westermo - Wait for bootstrap phase to complete before cleaning out any bootstrap processes that have stopped, they may be restarted again
- Reassert condition when an unmodified run/task/service goes from WAITING back to RUNNING again after a reconfiguration event. Found and fixed by Jonas Johansson, Westermo
- Restore Ctrl-D and Ctrl-U support in built-in getty
- Remove service condition when service is deleted
- Fix C++ compilation issues, by Robert Andersson, Atlas Copco
- Build fixes for uClibc
- Provide service description for built-in watchdog daemon
- Fix #138: Handle
SIGPWR
likeSIGSUR2
, i.e., power off the system - Drop the '%m' GNUism, for compat with older musl libc
- Fix #139: call
tzset()
oninitctl reload
to activate system timezone changes (for logging)
Finit v4.0-rc4
This is a pre-release, for internal testing at Westermo at the moment. Version 4.0 replaces the previously planned 3.2 because of major changes, for instance; removal of the built-in inetd, incompatible changes to kernel command options and configure script. See the changelog for more detailed information. A fully up-to-date list of changes is expected for the GA release.
Finit v4.0-rc3
This is a pre-release, for internal testing at Westermo at the moment. Version 4.0 replaces the previously planned 3.2 because of major changes, for instance; removal of the built-in inetd, incompatible changes to kernel command options and configure script. See the changelog for more detailed information. A fully up-to-date list of changes is expected for the GA release.