Bot releases are visible (Hide)
nowarn
cgroup.root
workaround for SCHED_RR
taskskeventd
, not needed at reboot/poweroff/dev/shm
with mode 1777 (sticky bit)/dev/mqueue
if available, inspiration from Alpine Linux/run/lock/subsys
, ordering/var/tmp
and /var/lock -> /run/lock
(tmpfiles.d)libgen.h
for basename()
function.basenm()
function by StargirlPublished by github-actions[bot] 11 months ago
notify:pid
and readiness none
globalFINIT_RUNPATH_
before defining it in config.h
VAR="foo bar qux"
drops everything but foo
<int/bootstrap>
turn into fluxset VAR=NAME
doset
, causing 'set VAR'='NAME'
in env.set
Published by github-actions[bot] 12 months ago
runparts
and /etc/rc.local
to no longer block the main loop, allowing initctl
calls to interact with Finit. Issue #356run
stanza to no longer block the main loop, issue #362sulogin
with a user different from root
, issue #357initctl -f
to force-skip asking Finit for existing services when creating new services during bootstrap, e.g. /etc/rc.local
initctl runlevel
now returns N S
instead of N 10
in bootstrapinitctl runlevel N
during bootstrap is now allowed. It changes the next runlevel to go to when bootstrap has completed. Effectively overriding the runlevel N
statement in /etc/finit.conf
execvp()
a run/task/service, now with errno
, e.g., "No such file or directory" when the command is missing from $PATH
initctl
, configurable, issue #360initctl [enable|disable]
, not supportedfinit.conf(5)
man page with the recommended directory hierarchy in /etc/finit.d/
runparts
code has been split into /libexec/finit/runparts
runparts
command now takes two options: sysv
and progress
. The former ensures only SNNfoo
and KNNfoo
scripts are run.if:
option with runtime evaluation of conditions. E.g., start a task only if:<run/foo/failure>
(here the run task 'foo' failed)if:
, conflict:
, nowarn
options for run/task/service first introduced in v4.4/dev/kmsg
/lib/finit/system/*.conf
, added numbered prefix to ensure proper execution order, e.g., udevd
should always run first/lib/finit/system/
. A new runtime-only path (for inspection) in /run/finit/system/
is usedlog*
output to console when finit.debug
is enabled<int/container>
condition if we detect running in container10-hotplug.conf
, preferred over plain mdev/run
and /tmp
if:!name
matches a known service. This allows conditional loading of alternative services, e.g. if udevd is already loaded we do not need mdevddoc/bootstrap.md
, inaccurate and confusing to usersFix #227: believed to have been fixed in v4.3, the root cause was actually that Finit was waiting for a process that was no longer in the system. The fix is to ask the kernel on process-stop-timeout and replay the lost PID so that Finit can continue with reboot/shutdown
Fix #358: fix inotify events for /etc/finit.conf
, improved log messages and error handling
Fix #361: cgroup move fail if run/task/services start as non-root. Regression in the v4.4 release cycle while adding support for the pre:/post:/ready: scripts. Now the latter scripts also properly run in their correct cgroup
Fix #366: document fsck.*
kernel command line options and simplify the configure flags --enable-fsckfix
and --enable-fastboot
to only adjust the default values for the fsck.*
options.
Fix #371: swap load order of /lib/finit/system/*
vs /etc/finit.d/*
We must run 10-hotplug.conf
first to ensure devices and modules are up and loaded before the user's run/task/services are called. The order at bootstrap is now saved in /run/finit/conf.order
for inspection, /run/finit/exec.order
shows the start order of each process
Fix #372: lost udevadm
calls due to overloading
Adjust final udevadm settle
timeout: 5 -> 30 sec
Fixed dbus plugin, the function that located <pidfile> ...
in the dbus/system.conf
caused spurious line breaks which led to the service not being loaded properly
The runparts
executor now skips backup files (foo~
)
The runparts
stanza now properly appends start
to scripts that start with S[0-9]+
. This has been broken for a very long time.
Fix #377: expand service env:file
variables, allow constructs like:
RUNDIR=/var/run/somesvc
DAEMON_ARGS=--workdir $RUNDIR --other-args...
Fix #378: warn on console if run/task times out during bootstrap
Fix #378: add run/task support for <!>
to allow transition from bootstrap to multi-user runlevel even though task has not run yet.
Fix #382: do not clear <service/foo/STATE>
conditions on reload.
Introduced back in v4.3-rc2, 82cc10be8, the support for automatic service conditions have had a weird and unintended behavior. Any change in state (see doc/svc-machine.png
) caused Finit to clear out all previously acquired service conditions.
However, when moving between RUNNING and PAUSED states, a service should not have its conditions cleared. The PAUSED state, seen also by all conditions moving to FLUX, is only temporary while an initctl reload
is processed. If a service has no changes to be applied it will move back to RUNNING.
Also, we cannot clear the service conditions because other run/task or services may depend on it and clearing them would cause Finit to SIGTERM
these processes (since they are no longer eligible to run).
Published by github-actions[bot] about 1 year ago
runparts
and /etc/rc.local
to no longer block the maininitctl
calls to interact with Finit. Issue #356run
stanza to no longer block the main loop, issue #362sulogin
with a user different from root
, issue #357initctl -f
to force-skip asking Finit for existing services/etc/rc.local
initctl runlevel
now returns N S
instead of N 10
in bootstrapinitctl runlevel N
during bootstrap is now allowed. It changesrunlevel N
statement in /etc/finit.conf
execvp()
a run/task/service, nowerrno
, e.g., "No such file or directory" when the command$PATH
initctl
, issue #360initctl [enable|disable]
, not supportedfinit.conf(5)
man page with the recommended directory/etc/finit.d/
runparts
code has been split into /libexec/finit/runparts
runparts
command now takes two options: sysv
and progress
.SNNfoo
and KNNfoo
scripts are run.if:
option with runtime evaluation of conditions. E.g., startif:<run/foo/failure>
(here the run task 'foo' failed)if:
, conflict:
, nowarn
options for run/task/service/dev/kmsg
/lib/finit/system/*.conf
, added numbered prefix to ensureudevd
should always run first/lib/finit/system/
. A new/run/finit/system/
is used/etc/finit.conf
, improved logfsck.*
kernel command line options and simplify--enable-fsckfix
and --enable-fastboot
tofsck.*
options./lib/finit/system/*
vs /etc/finit.d/*
10-hotplug.conf
first to ensure devices and modules are/run/finit/conf.order
for inspection,/run/finit/exec.order
shows the start order of each processudevadm
calls due to overloading<pidfile> ...
in thedbus/system.conf
caused spurious line breaks which led to therunparts
executor now skips backup files (foo~
)runparts
stanza now properly appends start
to scripts thatS[0-9]+
. This has been broken for a very long time.Published by github-actions[bot] about 1 year ago
runparts
and /etc/rc.local
to no longer block the maininitctl
calls to interact with Finit. Issue #356run
stanza to no longer block the main loop, issue #362sulogin
with a user different from root
, issue #357initctl -f
to force-skip asking Finit for existing services/etc/rc.local
initctl runlevel
now returns N S
instead of N 10
in bootstrapinitctl runlevel N
during bootstrap is now allowed. It changesrunlevel N
statement in /etc/finit.conf
execvp()
a run/task/service, nowerrno
, e.g., "No such file or directory" when the command$PATH
initctl
, issue #360initctl [enable|disable]
, not supportedfinit.conf(5)
man page with the recommended directory/etc/finit.d/
runparts
code has been split into /libexec/finit/runparts
runparts
command now takes two options: sysv
and progress
.SNNfoo
and KNNfoo
scripts are run.if:
option with runtime evaluation of conditions. E.g., startif:<run/foo/failure>
(here the run task 'foo' failed)if:
, conflict:
, nowarn
options for run/task/service/etc/finit.conf
, improved logfsck.*
kernel command line options and simplify--enable-fsckfix
and --enable-fastboot
tofsck.*
options.runparts
executor now skips backup files (foo~
)runparts
stanza now properly appends start
to scripts thatS[0-9]+
. This has been broken for a very long time.Published by github-actions[bot] about 1 year ago
runparts
and /etc/rc.local
to no longer block the maininitctl
calls to interact with Finit. Issue #356run
stanza to no longer block the main loop, issue #362sulogin
with a user different from root
, issue #357initctl -f
to force-skip asking Finit for existing services/etc/rc.local
initctl runlevel
now returns N S
instead of N 10
in bootstrapexecvp()
a run/task/service, nowerrno
, e.g., "No such file or directory" when the command$PATH
initctl
, issue #360initctl [enable|disable]
, not supportedfinit.conf(5)
man page with the recommended directory/etc/finit.d/
runparts
code has been split into /libexec/finit/runparts
runparts
command now takes two options: sysv
and progress
.SNNfoo
and KNNfoo
scripts are run./etc/finit.conf
, improved logfsck.*
kernel command line options and simplify--enable-fsckfix
and --enable-fastboot
tofsck.*
options.runparts
executor now skips backup files (foo~
)runparts
stanza now properly appends start
to scripts thatS[0-9]+
. This has been broken for a very long time.Published by github-actions[bot] about 1 year ago
runparts
and /etc/rc.local
to no longer block the main loop, allowing these scripts to call initctl
to interact with Finit. Still in a limited way due to them being used at bootstrap, issue #356run
stanza to no longer block the main loop, issue #362sulogin
with a user different from root
, issue #357initctl -f
to force-skip asking Finit for existing services when creating new services during bootstrap, e.g. /etc/rc.local
initctl runlevel
now returns N S
instead of N 10
in bootstrapexecvp()
a run/task/service, now with errno
, e.g., "No such file or directory" when the command is missing from $PATH
initctl
, issue #360initctl [enable|disable]
, not supportedfinit.conf(5)
man page with the recommended directory hierarchy in /etc/finit.d/
runparts
code has been split into /libexec/finit/runparts
/etc/finit.conf
, improved log messages and error handlingrunparts
executor now skips backup files (foo~
)runparts
stanza now properly appends start
to scripts that start with S[0-9]+
. This has been broken for a very long time.Published by github-actions[bot] over 1 year ago
Note 1: this release contains changes to the
.conf
parser. If you have .conf file statements with comment character (#
) in the command options or description, you must now escape them (\#
). Issue #186Note 2: prior to this release, runlevel
S
and0
were after boot treated as the same runlevel. This causedtask [06] ...
to also run at bootstrap instead of just at shutdown and reboot. The changes made to Finit to separateS
from0
require you to update the allowed runlevels for services that are allowed to continue running at shutdown. I.e., change[S123456789]
to[S0123456789]
for, e.g.,sysklogd
. Issue #352
Add limited tmpfiles.d(5) support
This change adds very basic tmpfiles.d/
support to Finit. Most of
the basic types are supported, but not all, so for now, please check
the code and examples for details on what is working.
If a run/task/service command does not exist, skip registering it
This changes the semantics of Finit a bit by checking for the command
to run when registering it, skipping commands that cannot be found in
the absolute path provided in the command, or in $PATH
This change includes a new nowarn
flag that can be used to prevent
Finit from warning for missing commands. See below for an example.
Add run/task/service support for conflict:foo
handling
Add run/task/service support for if:[!]ident
and if:<[!]cond>
Conditional loading of stanza depending on ident is already loaded (or
not), or condition satisfied (or not). E.g., do not run mdev
if we
found and registered udevd
, or load service only if <boot/testing>
condition is set.
The optional leading !
negates the comparison, if NOT foo then ...
Add support for static services in /lib/finit/system/*.conf
Slowly migrating away from hard-coded services in plugins. This way
it's possible for the user to both inspect and override as needed.
Migrate hotplug plugin to a conditional /lib/finit/system/hotplug.conf
This is the first example of the just minted advanced stanza syntax with
if:
-statements, conflict:
handling, and nowarn
flags.
Initial support for template services, [email protected]
, similar to systemd
$ initctl show avahi-autoipd@
service :%i avahi-autoipd --syslog %i -- ZeroConf for %i
To enable ZeroConf for, e.g., eth0
, use
$ initctl enable [email protected]
The enabled symlink will be set up to [email protected]
and every
instance of %i
will in the instantiated directive be replaced with
eth0
. Inspect the result with:
$ initctl status avahi-autoipd:eth0
Add devmon
, a <dev/foo>
condition provider, issue #185
Support for line continuation character \
in .conf files, issue #186
service name:sysklogd [S123456789] \
env:-/etc/default/sysklogd \
syslogd -F $SYSLOGD_ARGS \
-- System log daemon
HOOK_BASEFS_UP
has been moved! External plugins that need to call
service_register()
, please use HOOK_SVC_PLUGIN
from now on.
Apologies for any inconveniences this might cause!
getty: add support for /etc/os-release
to replace uname
output
This change, which has a fallback to /usr/lib/os-release
, overrides
traditional modifiers with the os-release variant. These values were
taken from uname
, which on Linux systems are pretty useless since
they always return the kernel name and version instead of the
distro/OS values.
E.g., \s becomes PRETTY_NAME
instead of 'Linux' and \v becomes the
pretty VERSION
, while \r becomes VERSION_ID
.
Support for overriding /etc/finit.conf
and /etc/finit.d
issue #235
New (kernel) command line option finit.config=PATH
which can be used
to redirect Finit to start up with, e.g., /etc/factory.conf
instead of
/etc/finit.conf
.
For the complete experience a new top-level configuration file directive
rcsd PATH
has aslo been added. It in turn can be used by factory.conf
as follows to override /etc/finit.d
:
rcsd /etc/factory.d
Support for overriding /etc/finit.d
from the alternate finit.conf
with a new rcsd /path/to/dot.d/
.conf file directive
Support for fsck_mode=[auto,skip,force]
+ fsck_repair=[preen,no,yes]
Add set
keyword for environment variables set in /etc/finit.conf
Support finit.cond=foo
cmdline <boot/foo>
conditions, issue #250
initctl
JSON output support for status and conditions, issue #273
Example:
root@infix:~$ initctl status -j resolvconf
{
"identity": "resolvconf",
"description": "Update DNS configuration",
"type": "task",
"forking": false,
"status": "done",
"exit": { "code": 0 },
"origin": "/etc/finit.d/enabled/sysrepo.conf",
"command": "resolvconf -u",
"restarts": 0,
"pidfile": "none",
"pid": 0,
"user": "root",
"group": "root",
"uptime": 0,
"runlevels": [ 1, 2, 3, 4, 5, 7, 8, 9 ]
}
The excellent tool jq
can be used to extract parts of the output for
further scripting. E.g. initctl status -j foo | jq .exit.status
Add JSON support to initctl ls
command
This allows for easy access to the disabled services:
root@anarchy:~# initctl ls --json |jq '.available - .enabled'
[
"chronyd.conf",
"dnsmasq.conf",
"gdbserver.conf",
"inadyn.conf",
"inetd.conf",
"isisd.conf",
"lldpd.conf",
"mstpd.conf",
"ntpd.conf",
"ospf6d.conf",
"ospfd.conf",
"querierd.conf",
"ripd.conf",
"ripng.conf",
"sshd.conf",
"syslogd.conf",
"telnetd.conf",
"uftpd.conf",
"wpa_supplicant.conf",
"zebra.conf"
]
Allow manual:yes
on sysv/service/run/task stanzas, issue #274
Add support for oncrash:script
to call the post:script
action, if
defined, for a crashing service. The EXIT_CODE
variable sent to the
script is set to crashed
. Issue #282
Search for plugins in /usr
and /usr/local
as well, issue #284
tty: add support for passenv
flag to /bin/login
, issue #286
Add reboot/shutdown/poweroff timeout -t SEC
to initctl, issue #295
Add support for s6 and systemd readiness notification, issue #299.
Service readiness notification to support daemons employing systemd
and s6 notification. Complementing the native Finit readiness support
using PID files that exist already.
The two have slightly different ways of implementing readiness:
Finit now provides both a NOTIFY_SOCKET
environment variable, for
systemd, and a way to start s6 daemons with a descriptor argument.
For details on the syntax, see the service
documentation.
This change also renames internal states for run/task/services to
avoid any confusion with the introduction of ready:scripts
:
WAITING -> PAUSED
READY -> WAITING
A service condition that used, e.g., <service/foo/ready>
should now
instead use <service/foo/waiting>
Add ready:script
for services, called when daemon is ready, issue #300
Add support for running scripts at shutdown at two new hook points
during the shutdown process, issue #302. See doc/plugins.md for details:
HOOK_SVC_DN
: after all services and non-reserved processes have beenHOOK_SYS_DN
: after all file systems have been unmounted, just priorreboot()
to shut down or reboot the systemThe modules-load
plugin now default to runlevel [S]
, in previous
releases it was [2345]
. This breaking change is to align it more
with what users mostly want (modules loaded before services start) and
can be changed back to the old behavior with a per-file setting:
set runlevel 2345
The modules-load
plugin now adds silent tasks for modprobe. This to
prevent confusing [ OK ]
boot messages when in fact modprobe failed.
The modules-load
plugin now support set modprobe /path/to/modprobe
The header files finit/conf.h
and finit/service.h
are now exported
for external plugins
Add support for multiple args to initctl cond set/clr
, issue #329
Silence confusing [ OK ]
progress from modules-load plugin, issue #332
This change drops the confusing status progress output, which was always
OK since the actual modprobe operation runs in the background. No need
to show status of the "added a task to finit, found modprobe" command.
dbus plugin: adapt to other operating systems
Not all Linux systems are based on Debian, and even if they are inspired
by Debian (Buildroot), they do not necessarily use the same defaults.
Probes the system at runtime for:
If the user/group cannot be found we fall back to root
, if the PID
file cannot be determined we ignore PID file readiness.
Improve documentation for runparts and hook scripts. Issue #315, #320
Add HOOK_NETWORK_DN
, called after change to runlevel 6 or 0, issue #319
Use sysklogd logger
tool instead of legacy logit
tool, issue #344
For log redirection Finit has the legacy logit
tool. This change
allows Finit to use the sysklogd
project's extended logger
tool
instead, when available. Allowing logging with the process' PID.
Add initctl
aliases: cat -> show
, kill -> signal
Add initctl -n,--noerr
to return OK(0) if services do not exist, for
integration with openresolv and scripts with similar requirements
Add initctl plugins
, list installed plugins
Add timestamp to log messages in fallback and logging to stderr
.
When there is no log daemon, and we are running in a container, or we
cannot log to the kernel ring buffer, then we log to stderr
. This
change improves log output by prefixing each message with a timestamp.
Fix #254: document limitations in rc.local
and runparts
scripts
Fix #269: add compulsory kernel symlinks in /dev
Fix #275: initctl status foo
should list all instances, regression
introduced in v4.3
Fix #278: enforce conditions also for running pre:
scripts
Fix #279: allow restart:always
, of crashing services. Similar to
respawn
but honors restart_sec
Fix #280: allow calling initctl restart foo
from within foo
Fix #283: too quick timeout at bootstrap of lingering tasks
Fix #285: initctl restart
should start crashed service
Fix #288: enable built-in sulogin
in Alpine and Void Linux builds
Fix #293: modprobe plugin: support for coldplugging more devices. It
turns out, not all buses in Linux add modalias
attributes to their
devices in sysfs. One notable exception are MDIO buses. The plugin's
scan routine would thus not pick them up.
Fix #294: shutdown --help
mistakenly shuts down system
Fix #310: Always use configured restart delay for crashing services.
If no delay is configured, default to an initial 2000 msec for forking
daemons and start-stop scripts, and 1 msec for non-forking daemons
Fix #311: document how to combine device tree with conditions
Fix #312: restart services with respawn set, e.g. ttys, immediately
Fix #313: Cancel pending restart timer on stop/start/restart/reload
Fix #314: skip run/task/service restart if conditions are lost
Fix #315: add environment variables to hook scripts
All hook scripts are called with at least one environment variable
set, FINIT_HOOK_NAME
, useful when reusing the same hook script for
multiple hook points. It is set to the string name, also used by the
path, e.g., hook/net/up
For all hook points from hook/sys/shutdown and later, FINIT_SHUTDOWN
is also set, to one of: halt
, poweroff
, reboot
Fix #317: make sure hook scripts don't run twice, also fixes #316
Fix #318: only show [ OK ] Calling foo
progress for runparts ...
Fix #320: the API/IPC socket is closed immediately at shutdown/reboot
to protect hook scripts or services calling initctl. There is no way
to service these requests safely at that time
Fix #333: consider a service dirty if command line args have changed
This fixes initctl reload
correctly restarting all daemons that have
new command line arguments.
Previously command line arguments changes were only acted upon if the
service was explicitly reloaded initctl reload myservice
.
Found and fixed by Jack Newman
Fix #338: ensure shutdown hooks are called properly; hook/sys/down
and hook/svc/down
hook scripts, found and fixed by Jack Newman
Fix #339: use absolute path in /etc/finit.d/enabled/
symlinks, for
use-cases when /etc
is read-only and /etc/finit.d/enabled -> /mnt/finit.d/enabled
, reported by Jack Newman
Fix #340: Finit ignores deleted/moved .conf
file sin /etc/finit.d
Fix #342: in runlevel S (bootstrap), not all initctl
commands can be
supported, block the following: runlevel, reload, start/stop, restart,
reload, halt, poweroff, suspend. Also, prevent SIGHUP
and SIGUSR1
signals when in shutdown or reboot
Fix #352: separate runlevel S from runlevel 0
Fix #355: regression in v3.2 stopping a process and its group
In Finit v3.2 a regression was introduced that affects the way Finit
stops a supervised process and its process group.
Instead of sending SIGTERM to the process, and thus delegating the
responsibility to that process to inform any children it may have, as
of commit 91a9c83 Finit sends SIGTERM to the entire process group.
For SIGKILL this is fine, SIGKILL only runs as cleanup and as a last
ditch effort if the process doesn't respond to SIGTERM.
This regression, introduced in v3.2, directly affects services like
avahi-autoipd
that have forked off children that it needs to tell to
exit cleanly before it returns. With the patch in question these
children are never allowed to complete, which in turn causes lingering
169.254 link-local addresses on interfaces.
Fix bootmisc plugin: octal permission on /run/lock
and /var/lock
Ensure initctl cond get
support the flux state (exit code 255)
Fix potential socket leak at bootstrap and shutdown
Fix potential NULL pointer deref in kernel command line parser
Fix lingering condition in service after reload of service with new
config that has no condition
Fix wrong path to command in service after reload, may have changed
logit
: fall back to package name if $LOGNAME
and $USER
are
unset. Note: you should probably not use logit
in your own
scripts, it is only meant for internal use by Finit. We recommend
using logger
from the bsdutils
or sysklogd
packages instead
Fix issue where env:
/pre:
/post:
/etc. is removed from a service
The trick is when reloading a service like this:
service env:/etc/env serv -np -e foo:bar
into this:
service pre:/bin/pre.sh serv -np
In the second the env:
has been removed and pre:
added. Prior to
this patch, env:
was kept leading to unintended behavior.
Fix parse/diff of command line args, e.g., nginx -g 'daemon off;'
Starting a service like this works fine:
service [2345789] env:-/etc/default/nginx nginx -g 'daemon off;'
However, on initctl reload
(and no change to .conf files) the arg
list was lost while parsing the .conf files. Leading to a false
positive 'diff' in args causing nginx to be unnecessarily restarted.
Fix issue with disabled "linewrap" on the console TTY after login.
The root cause is qemu-system-x86_64 -nographics
disabling it when
starting up. The correct \e[?7h
escape code is now used.
Published by github-actions[bot] over 1 year ago
Note 1: this release contains changes to the
.conf
parser. If you
have .conf file statements with comment character (#
) in the command
options or description, you must now escape them (\#
). Issue #186Note 2: prior to this release, runlevel
S
and0
were after
boot treated as the same runlevel. This causedtask [06] ...
to
also run at bootstrap instead of just at shutdown and reboot. The
changes made to Finit to separateS
from0
require you to update
the allowed runlevels for services that are allowed to continue
running at shutdown. I.e., change[S123456789]
to[S0123456789]
for, e.g.,sysklogd
. Issue #352
Add limited tmpfiles.d(5) support
This change adds very basic tmpfiles.d/
support to Finit. Most of
the basic types are supported, but not all, so for now, please check
the code and examples for details on what is working.
If a run/task/service command does not exist, skip registering it
This changes the semantics of Finit a bit by checking for the command
to run when registering it, skipping commands that cannot be found in
the absolute path provided in the command, or in $PATH
This change includes a new nowarn
flag that can be used to prevent
Finit from warning for missing commands. See below for an example.
Add run/task/service support for conflict:foo
handling
Add run/task/service support for if:[!]ident
and if:<[!]cond>
Conditional loading of stanza depending on ident is already loaded (or
not), or condition satisfied (or not). E.g., do not run mdev
if we
found and registered udevd
, or load service only if <boot/testing>
condition is set.
The optional leading !
negates the comparison, if NOT foo then ...
Add support for static services in /lib/finit/system/*.conf
Slowly migrating away from hard-coded services in plugins. This way
it's possible for the user to both inspect and override as needed.
Migrate hotplug plugin to a conditional /lib/finit/system/hotplug.conf
This is the first example of the just minted advanced stanza syntax with
if:
-statements, conflict:
handling, and nowarn
flags.
Initial support for template services, [email protected]
, similar to systemd
$ initctl show avahi-autoipd@
service :%i avahi-autoipd --syslog %i -- ZeroConf for %i
To enable ZeroConf for, e.g., eth0
, use
$ initctl enable [email protected]
The enabled symlink will be set up to [email protected]
and every
instance of %i
will in the instantiated directive be replaced with
eth0
. Inspect the result with:
$ initctl status avahi-autoipd:eth0
Add devmon
, a <dev/foo>
condition provider, issue #185
Support for line continuation character \
in .conf files, issue #186
service name:sysklogd [S123456789] \
env:-/etc/default/sysklogd \
syslogd -F $SYSLOGD_ARGS \
-- System log daemon
HOOK_BASEFS_UP
has been moved! External plugins that need to call
service_register()
, please use HOOK_SVC_PLUGIN
from now on.
Apologies for any inconveniences this might cause!
getty: add support for /etc/os-release
to replace uname
output
This change, which has a fallback to /usr/lib/os-release
, overrides
traditional modifiers with the os-release variant. These values were
taken from uname
, which on Linux systems are pretty useless since
they always return the kernel name and version instead of the
distro/OS values.
E.g., \s becomes PRETTY_NAME
instead of 'Linux' and \v becomes the
pretty VERSION
, while \r becomes VERSION_ID
.
Support for overriding /etc/finit.conf
and /etc/finit.d
issue #235
New (kernel) command line option finit.config=PATH
which can be used
to redirect Finit to start up with, e.g., /etc/factory.conf
instead of
/etc/finit.conf
.
For the complete experience a new top-level configuration file directive
rcsd PATH
has aslo been added. It in turn can be used by factory.conf
as follows to override /etc/finit.d
:
rcsd /etc/factory.d
Support for overriding /etc/finit.d
from the alternate finit.conf
with a new rcsd /path/to/dot.d/
.conf file directive
Support for fsck_mode=[auto,skip,force]
+ fsck_repair=[preen,no,yes]
Add set
keyword for environment variables set in /etc/finit.conf
Support finit.cond=foo
cmdline <boot/foo>
conditions, issue #250
initctl
JSON output support for status and conditions, issue #273
Example:
root@infix:~$ initctl status -j resolvconf
{
"identity": "resolvconf",
"description": "Update DNS configuration",
"type": "task",
"forking": false,
"status": "done",
"exit": { "code": 0 },
"origin": "/etc/finit.d/enabled/sysrepo.conf",
"command": "resolvconf -u",
"restarts": 0,
"pidfile": "none",
"pid": 0,
"user": "root",
"group": "root",
"uptime": 0,
"runlevels": [ 1, 2, 3, 4, 5, 7, 8, 9 ]
}
The excellent tool jq
can be used to extract parts of the output for
further scripting. E.g. initctl status -j foo | jq .exit.status
Add JSON support to initctl ls
command
This allows for easy access to the disabled services:
root@anarchy:~# initctl ls --json |jq '.available - .enabled'
[
"chronyd.conf",
"dnsmasq.conf",
"gdbserver.conf",
"inadyn.conf",
"inetd.conf",
"isisd.conf",
"lldpd.conf",
"mstpd.conf",
"ntpd.conf",
"ospf6d.conf",
"ospfd.conf",
"querierd.conf",
"ripd.conf",
"ripng.conf",
"sshd.conf",
"syslogd.conf",
"telnetd.conf",
"uftpd.conf",
"wpa_supplicant.conf",
"zebra.conf"
]
Allow manual:yes
on sysv/service/run/task stanzas, issue #274
Add support for oncrash:script
to call the post:script
action, if
defined, for a crashing service. The EXIT_CODE
variable sent to the
script is set to crashed
. Issue #282
Search for plugins in /usr
and /usr/local
as well, issue #284
tty: add support for passenv
flag to /bin/login
, issue #286
Add reboot/shutdown/poweroff timeout -t SEC
to initctl, issue #295
Add support for s6 and systemd readiness notification, issue #299.
Service readiness notification to support daemons employing systemd
and s6 notification. Complementing the native Finit readiness support
using PID files that exist already.
The two have slightly different ways of implementing readiness:
Finit now provides both a NOTIFY_SOCKET
environment variable, for
systemd, and a way to start s6 daemons with a descriptor argument.
For details on the syntax, see the service
documentation.
This change also renames internal states for run/task/services to
avoid any confusion with the introduction of ready:scripts
:
WAITING -> PAUSED
READY -> WAITING
A service condition that used, e.g., <service/foo/ready>
should now
instead use <service/foo/waiting>
Add ready:script
for services, called when daemon is ready, issue #300
Add support for running scripts at shutdown at two new hook points
during the shutdown process, issue #302. See doc/plugins.md for details:
HOOK_SVC_DN
: after all services and non-reserved processes have beenHOOK_SYS_DN
: after all file systems have been unmounted, just priorreboot()
to shut down or reboot the systemThe modules-load
plugin now default to runlevel [S]
, in previous
releases it was [2345]
. This breaking change is to align it more
with what users mostly want (modules loaded before services start) and
can be changed back to the old behavior with a per-file setting:
set runlevel 2345
The modules-load
plugin now adds silent tasks for modprobe. This to
prevent confusing [ OK ]
boot messages when in fact modprobe failed.
The modules-load
plugin now support set modprobe /path/to/modprobe
The header files finit/conf.h
and finit/service.h
are now exported
for external plugins
Add support for multiple args to initctl cond set/clr
, issue #329
Silence confusing [ OK ]
progress from modules-load plugin, issue #332
This change drops the confusing status progress output, which was always
OK since the actual modprobe operation runs in the background. No need
to show status of the "added a task to finit, found modprobe" command.
dbus plugin: adapt to other operating systems
Not all Linux systems are based on Debian, and even if they are inspired
by Debian (Buildroot), they do not necessarily use the same defaults.
Probes the system at runtime for:
If the user/group cannot be found we fall back to root
, if the PID
file cannot be determined we ignore PID file readiness.
Improve documentation for runparts and hook scripts. Issue #315, #320
Add HOOK_NETWORK_DN
, called after change to runlevel 6 or 0, issue #319
Use sysklogd logger
tool instead of legacy logit
tool, issue #344
For log redirection Finit has the legacy logit
tool. This change
allows Finit to use the sysklogd
project's extended logger
tool
instead, when available. Allowing logging with the process' PID.
Add initctl
aliases: cat -> show
, kill -> signal
Add initctl -n,--noerr
to return OK(0) if services do not exist, for
integration with openresolv and scripts with similar requirements
Add initctl plugins
, list installed plugins
Add timestamp to log messages in fallback and logging to stderr
.
When there is no log daemon, and we are running in a container, or we
cannot log to the kernel ring buffer, then we log to stderr
. This
change improves log output by prefixing each message with a timestamp.
Fix #254: document limitations in rc.local
and runparts
scripts
Fix #269: add compulsory kernel symlinks in /dev
Fix #275: initctl status foo
should list all instances, regression
introduced in v4.3
Fix #278: enforce conditions also for running pre:
scripts
Fix #279: allow restart:always
, of crashing services. Similar to
respawn
but honors restart_sec
Fix #280: allow calling initctl restart foo
from within foo
Fix #283: too quick timeout at bootstrap of lingering tasks
Fix #285: initctl restart
should start crashed service
Fix #288: enable built-in sulogin
in Alpine and Void Linux builds
Fix #293: modprobe plugin: support for coldplugging more devices. It
turns out, not all buses in Linux add modalias
attributes to their
devices in sysfs. One notable exception are MDIO buses. The plugin's
scan routine would thus not pick them up.
Fix #294: shutdown --help
mistakenly shuts down system
Fix #310: Always use configured restart delay for crashing services.
If no delay is configured, default to an initial 2000 msec for forking
daemons and start-stop scripts, and 1 msec for non-forking daemons
Fix #311: document how to combine device tree with conditions
Fix #312: restart services with respawn set, e.g. ttys, immediately
Fix #313: Cancel pending restart timer on stop/start/restart/reload
Fix #314: skip run/task/service restart if conditions are lost
Fix #315: add environment variables to hook scripts
All hook scripts are called with at least one environment variable
set, FINIT_HOOK_NAME
, useful when reusing the same hook script for
multiple hook points. It is set to the string name, also used by the
path, e.g., hook/net/up
For all hook points from hook/sys/shutdown and later, FINIT_SHUTDOWN
is also set, to one of: halt
, poweroff
, reboot
Fix #317: make sure hook scripts don't run twice, also fixes #316
Fix #318: only show [ OK ] Calling foo
progress for runparts ...
Fix #320: the API/IPC socket is closed immediately at shutdown/reboot
to protect hook scripts or services calling initctl. There is no way
to service these requests safely at that time
Fix #333: consider a service dirty if command line args have changed
This fixes initctl reload
correctly restarting all daemons that have
new command line arguments.
Previously command line arguments changes were only acted upon if the
service was explicitly reloaded initctl reload myservice
.
Found and fixed by Jack Newman
Fix #338: ensure shutdown hooks are called properly; hook/sys/down
and hook/svc/down
hook scripts, found and fixed by Jack Newman
Fix #339: use absolute path in /etc/finit.d/enabled/
symlinks, for
use-cases when /etc
is read-only and /etc/finit.d/enabled -> /mnt/finit.d/enabled
, reported by Jack Newman
Fix #340: Finit ignores deleted/moved .conf
file sin /etc/finit.d
Fix #342: in runlevel S (bootstrap), not all initctl
commands can be
supported, block the following: runlevel, reload, start/stop, restart,
reload, halt, poweroff, suspend. Also, prevent SIGHUP
and SIGUSR1
signals when in shutdown or reboot
Fix #352: separate runlevel S from runlevel 0
Fix bootmisc plugin: octal permission on /run/lock
and /var/lock
Ensure initctl cond get
support the flux state (exit code 255)
Fix potential socket leak at bootstrap and shutdown
Fix potential NULL pointer deref in kernel command line parser
Fix lingering condition in service after reload of service with new
config that has no condition
Fix wrong path to command in service after reload, may have changed
logit
: fall back to package name if $LOGNAME
and $USER
are
unset. Note: you should probably not use logit
in your own
scripts, it is only meant for internal use by Finit. We recommend
using logger
from the bsdutils
or sysklogd
packages instead
Fix issue where env:
/pre:
/post:
/etc. is removed from a service
The trick is when reloading a service like this:
service env:/etc/env serv -np -e foo:bar
into this:
service pre:/bin/pre.sh serv -np
In the second the env:
has been removed and pre:
added. Prior to
this patch, env:
was kept leading to unintended behavior.
Fix parse/diff of command line args, e.g., nginx -g 'daemon off;'
Starting a service like this works fine:
service [2345789] env:-/etc/default/nginx nginx -g 'daemon off;'
However, on initctl reload
(and no change to .conf files) the arg
list was lost while parsing the .conf files. Leading to a false
positive 'diff' in args causing nginx to be unnecessarily restarted.
Published by github-actions[bot] over 2 years ago
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.
[1-9]
may be selected, except 6 (reboot). Issue #261finit.fstab=/etc/fstab.custom
, with full support for mounting, mount helpers, fsck, and swapon/off, issue #224/dev/root
, which may not exist in /dev
. Finit now looks up the matching block device for /
in /sys/block/
module
s no longer shows arguments in progress outputinitctl
, new command line option -V,--version
for ease of usedone
for run task, issue #207 by Ming Liu, Atlas Copcorun/foo/success
and task/bar/failure
. Issue #232, by Ming Liu, Atlas Copcoservice/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 match cond [set | clear]
, issue #255[WARN]
messages on console now printed in yellow, issue #214ifup
is missing on the system, bring at least lo
up at bootifup -a
(and ifdown -a
), to syslogpid:
for SysV init scriptsstderr
when running in a container w/o syslog daemontype:forking
to services, already supported but with a very difficult pid:
syntax, issue #223. Docs updatedfinit.conf
, please note: this also affects Finit itself, be careful!respawn
, which bypasses the crash semantics, allowing endless restartsHOOK_BANNER
, the first hook point before the bannerinitctl reload foo
command. It does not reload the service's .conf
file! Issue #263basename cmd
of a service was used to identify the service, now the proper name:id
is used instead. Meaning, a service without a custom :ID
or name:
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!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 in sulogin
recovery mode, issue #247sulogin
is no longer enabled by default, in favor of distribution versions. Enable with ./configure --with-sulogin
bridge-stp br0 start
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 skippedname:id
tuple is now more consistently used in all log and debug messages instead of the basename of the commandinitctl start/stop/restart/signal
, no more extra usage help, just a plain error messageinitctl
have changed to use LSB script standard and BSD sysexits.h exit codes. As before, a non-zero exit is error or missinginitctl -q
to more commands: stop, start, restart, reload, signal, etc.-D_TIME_BITS=64
[WARN]
env:file
also in pre:
and post
scriptsChecking filesystem...
outputswapoff
at shutdown, does not support -e
flagreboot(RB_SW_SUSPEND)
was used, now the modern /sys/power/state
API is used instead.:ID
. Caused Finit to match with already registered but different run/task/servicePublished by github-actions[bot] over 2 years ago
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.
[1-9]
may be selected, except 6 (reboot). Issue #261finit.fstab=/etc/fstab.custom
, with full support for mounting, mount helpers, fsck, and swapon/off, issue #224/dev/root
, which may not exist in /dev
. Finit now looks up the matching block device for /
in /sys/block/
module
s no longer shows arguments in progress outputinitctl
, new command line option -V,--version
for ease of usedone
for run task, issue #207 by Ming Liu, Atlas Copcorun/foo/success
and task/bar/failure
. Issue #232, by Ming Liu, Atlas Copcoservice/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 match cond [set | clear]
, issue #255[WARN]
messages on console now printed in yellow, issue #214ifup
is missing on the system, bring at least lo
up at bootifup -a
(and ifdown -a
), to syslogpid:
for SysV init scriptsstderr
when running in a container w/o syslog daemontype:forking
to services, already supported but with a very difficult pid:
syntax, issue #223. Docs updatedfinit.conf
, please note: this also affects Finit itself, be careful!respawn
, which bypasses the crash semantics, allowing endless restartsHOOK_BANNER
, the first hook point before the bannerhook-scripts
, allows run-parts(8) style scripts to run on any hook point. Contributed by Tobias Waldekranzinitctl
(reboot
) falls back to -f
when it detects it is in sulogin
recovery mode, issue #247sulogin
is no longer enabled by default, in favor of distribution versions. Enable with ./configure --with-sulogin
bridge-stp br0 start
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 skippedname:id
tuple is now more consistently used in all log and debug messages instead of the basename of the command-D_TIME_BITS=64
[WARN]
env:file
also in pre:
and post
scriptsChecking filesystem
...` outputswapoff
at shutdown, does not support -e
flagreboot(RB_SW_SUSPEND)
was used, now the modern /sys/power/state
API is used instead.:ID
. Caused Finit to match with already registered but different run/task/servicePublished by github-actions[bot] over 2 years ago
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.
module
s no longer shows arguments in progress outputinitctl
, new command line option -v,--version
for ease of usedone
for run task, issue #207 by Ming Liu, Atlas Copcorun/foo/success
and task/bar/failure
. Issue #232, by Ming Liu, Atlas Copco[WARN]
messages on console now printed in yellow, issue #214ifup
is missing on the system, bring at least lo
up at bootifup -a
(and ifdown -a
), to syslogpid:
for SysV init scriptsstderr
when running in a container w/o syslog daemontype:forking
to services, already supported but with a very difficult pid:
syntax. Documentation updated-D_TIME_BITS=64
[WARN]
swapoff
at shutdown, does not support -e
flagreboot(RB_SW_SUSPEND)
was used, now the modern /sys/power/state
API is used instead.Published by github-actions[bot] almost 3 years ago
The "Try before you buy!" release. For more information, see this blog post.
initctl
, e.g. group wheelLOG_NOTICE
to LOG_INFO
/etc/nologin
file with an external #define
, by Ming Liu, Atlas Copco/var/run/dbus/pid
file with an external #define
, by Ming Liu, Atlas Copcoinitctl ident [NAME]
which lists all instances of NAME
, or all enabled system run/tasks and servicesinitctl status foo
manual:yes
) services accidentally started by initctl reload
, regression introduced in Finit v4.0initctl 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_SC_LOGIN_NAME_MAX
from sysconf(3)
initctl status foo
Published by troglobit over 3 years ago
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.
kill -USR1 1
)contrib/debian/install.sh
sets up a Grub boot entry for finit. We now modify the $SUPPORTED_INITS variable in 10_linux
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 issue initctl reboot
<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 with configure --with-keventd
SIGPWR
to PID 1. Finit no longer redirects this to SIGUSR1
(poweroff). There is no default command for this, you need to set up a task that triggers on <sys/pwr/fail>
to issue initctl poweroff
IUTF8
on input/bin/login
is not found, Finit now tries sulogin
before it falls back to an unauthenticated /bin/sh
/dev/console
\n
, in addition to \r
, in "Please press Enter" prompt before starting getty/proc/cmdline
for its options. Instead all options are by default now read from argv[]
, 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, see configure --enable-kernel-cmdline
rtc.so
, urandom.so
, you may also want to disable hotplug.so
. They are all enabled by default, as in Finit 4.0, but may be moved to external tools or entries in finit.conf
in Finit 5.0PRETTY_NAME
from /etc/os-release
to use as heading in progress output, unless --with-heading=GREET
is used.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 gives tty: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
Published by troglobit over 3 years ago
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.
kill -USR1 1
)contrib/debian/install.sh
sets up a Grub boot entry for finit. We now modify the $SUPPORTED_INITS variable in 10_linux
SIGINT
from kernel to be able to perform a proper reboot.<sys/key/ctrlaltdel>
to issue initctl reboot
<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 with configure --with-keventd
SIGPWR
to PID 1. Finit no longer redirects this to SIGUSR1
(poweroff). There is no default command for this, you need to set up a task that triggers on <sys/pwr/fail>
to issue initctl poweroff
IUTF8
on input/bin/login
is not found, Finit now tries sulogin
before it falls back to an unauthenticated /bin/sh
/dev/console
/proc/cmdline
for its options. Instead all options are by default now read from argv[]
, 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, see configure --enable-kernel-cmdline
rtc.so
, urandom.so
, you may also want to disable hotplug.so
. They are all enabled by default, as in Finit 4.0, but may be moved to external tools or entries in finit.conf
in Finit 5.0Stricter 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 gives tty: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
Published by troglobit over 3 years ago
Bug fix release.
kill -USR1 1
)contrib/debian/install.sh
sets up a Grub boot entry for finit. We now modify the $SUPPORTED_INITS variable in 10_linux
contrib/*/install.sh
scripts failed to run from tarball/dev/shm
, /dev/pts
, /run
and /tmp
, unless mounted already by /etc/fstab
. This is what mostPublished by troglobit over 3 years ago
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.
reboot
tool has been replaced with a symlink to initctl
, like its siblings: halt, shutdown, poweroff, and suspend. Calling reboot
& C:o now defaults to the corresponding initctl cmd
with a fallback to sending signals as per traditional SysV init. The -f
(force) flag remains, where reboot(2)
is called directlyinictl cond set|clear COND
have changed completely. Constrained to a flat <usr/...>
namespace and automatically activated by a new usr.so
plugin that checks services for usr condition changesconfigure
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 the contrib/
section<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's pid:!foo
pidfile is another service's <pid/foo>
condition, issue #143initctl [top|ps|cgroup]
commands to inspect runtime statemain()
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 toolssuslogin
. Exiting rescue mode now brings up the system as a normal boot, as one expectssysv
start/stop scripts as well as monitoring forking services, stared using sysv
or service
stanzakill:DELAY
, default 3 sec.halt:SIGNAL
, default SIGTERMpre:script
and post:script
, allows for setup and teardown/cleanup before and after a service runs, issue #129env: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 on initctl reload
pid:!/path/to/foo.pid
, useful with new sysv
or service
which fork to background$PATH
--disable-doc
and --disable-contrib
to speed up builds and work around issue with massively parallel builds@console
also for external gettynotty
option to built-in getty, for board bring-uprescue
option to built-in getty, for rescue shells-b
, batch mode, for non-interactive use to initctl
/dev/
if mdev is also available$SHELL
, like $PATH
, to a sane default value, needed by BusyBox*.conf
files after running /etc/rc.local
or run-parts. Use initctl reload
instead.initctl
without an argument or option now defaults to list servicessvc_t
and not PIDHOOK_SVC_START
and HOOK_SVC_LOST
, caused more problems than they were worth. Users are encouraged to use accounting insteadsvc_t
until any SIGKILL
timer has elapseduev_init1()
to reduce event cache so that the kernel can invalidate deleted events before enqueing to userspacehwclock.so
plugin to rtc.so
since it now is stand-alone from the hwclock
tool. Note: the kernel can also be set to load and store RTC to/from system clock at boot/halt as well, issue #110/sys/devices/*
/etc/modules-load.d/
by Robert Andersson, Atlas Copconame:foo
support for services, by Robert Andersson, Atlas Copcomanual:yes
support for services, by Robert Andersson, Atlas Copcolog:console
support for services, by Robert Andersson, Atlas Copco:ID
as a string, by Jonas Johansson, Westermoinitctl reload
, when a service configuration has changed. Disabled by default, but can be enabled with ./configure --enable-auto-reload
ptxmode=0666
console
as alias for @console
in tty stanzas--enable-rw-roots
configure option, use rw
for your /
partition in /etc/fstab
instead to trigger remount at boot:ID
optional, use NULL/zero internally this allows ...name:foo
syntax, creates conditions w/o a path, and ...:ID
qualifier to conditions if set for a service/run/finit.sock
to /run/finit/socket
officially only supported for use by the initctl
toolSOCK_SEQPACKET
instead of SOCK_STREAM
./etc/network/interfaces
, which has include statements. No more native ifup
of individual interfaces,ifup -a
, or ifdown -a
, delegating all details to the operating system. Also, this is now done in the background, by popular request/var/run
does not yet exist (symlink to /run
). Added compat layer for access@console
resolves to >1 TTY,/var/run
stdin
to /dev/null
for services by defaultnanosleep()
to achieve "signal safe" sleep. Fixed by Jacques de Laval, Westermologit
processes when parent diesrc.local
. Fixed by Jacques de Laval, Westermo/bin/sh -c foo
just like the standard run-parts tool. Found by Magnus Malm, Westermoinitctl [start | restart]
, should behave the same for services that have crashed. Found by Mattias Walström, WestermoSIGPWR
like SIGSUR2
, i.e., power off the systemtzset()
on initctl reload
to activate system timezone changes (for logging)Published by troglobit over 3 years ago
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.
Published by troglobit over 3 years ago
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.
Published by troglobit over 3 years ago
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.