Finit v4.0 #169
Replies: 5 comments 6 replies
-
Thanks for all of your hard work, can't wait to try this out this week! |
Beta Was this translation helpful? Give feedback.
-
I wanted to ask: can finit run scripts in parallel? I know my Gentoo/OpenRC installation can be configured to boot the system with parallel processes, making the boot process significantly faster, but I wanted to know if finit has the same functionality or only runs scripts in sequence? |
Beta Was this translation helpful? Give feedback.
-
Ping @yangfl :-) |
Beta Was this translation helpful? Give feedback.
-
How does finit compare to dinit - https://davmac.org/projects/dinit/alpine-demo/ ? |
Beta Was this translation helpful? Give feedback.
-
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
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 directlyinictl 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 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 thecontrib/
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'spid:!foo
pidfile is another service's<pid/foo>
condition, issue Redesign condition subsystem #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 usingsysv
orservice
stanzakill:DELAY
, default 3 sec.halt:SIGNAL
, default SIGTERMpre:script
andpost:script
, allows for setup and teardown/cleanup before and after a service runs, issue Add support for exit callback/cleanup script #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 oninitctl reload
pid:!/path/to/foo.pid
, useful with newsysv
orservice
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 toinitctl
/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. Useinitctl reload
instead.initctl
without an argument or option now defaults to list servicessvc_t
and not PIDHOOK_SVC_START
andHOOK_SVC_LOST
, caused more problems than they were worth. Users are encouraged to use accounting insteadsvc_t
until anySIGKILL
timer has elapseduev_init1()
to reduce event cache so that the kernel can invalidate deleted events before enqueing to userspacehwclock.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 hwclock[TIME plugins] failed to execute #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, userw
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 theinitctl
toolSOCK_SEQPACKET
instead ofSOCK_STREAM
.Recommend using watchdogd v3.4, or later, which support this
/etc/network/interfaces
, which has include statements. No more nativeifup
of individual interfaces,Finit now calls
ifup -a
, orifdown -a
, delegating all details to the operating system. Also, this is now done in the background, by popular requestFixes
/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
likeSIGSUR2
, i.e., power off the systemtzset()
oninitctl reload
to activate system timezone changes (for logging)This discussion was created from the release Finit v4.0.
Beta Was this translation helpful? Give feedback.
All reactions