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.
-
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.
Uh oh!
There was an error while loading. Please reload this page.
-
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
reboottool has been replaced with a symlink toinitctl, like its siblings: halt, shutdown, poweroff, and suspend. Callingreboot& C:o now defaults to the correspondinginitctl cmdwith a fallback to sending signals as per traditional SysV init. The-f(force) flag remains, wherereboot(2)is called directlyinictl cond set|clear CONDhave changed completely. Constrained to a flat<usr/...>namespace and automatically activated by a newusr.soplugin that checks services for usr condition changesconfigurescript changes, i.e., no guessing--prefixand 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:!foopidfile 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 expectssysvstart/stop scripts as well as monitoring forking services, stared usingsysvorservicestanzakill:DELAY, default 3 sec.halt:SIGNAL, default SIGTERMpre:scriptandpost:script, allows for setup and teardown/cleanup before and after a service runs, issue Add support for exit callback/cleanup script #129env:filein/etc/default/fooor/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 reloadpid:!/path/to/foo.pid, useful with newsysvorservicewhich fork to background$PATH--disable-docand--disable-contribto speed up builds and work around issue with massively parallel builds@consolealso for external gettynottyoption to built-in getty, for board bring-uprescueoption 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*.conffiles after running/etc/rc.localor run-parts. Useinitctl reloadinstead.initctlwithout an argument or option now defaults to list servicessvc_tand not PIDHOOK_SVC_STARTandHOOK_SVC_LOST, caused more problems than they were worth. Users are encouraged to use accounting insteadsvc_tuntil anySIGKILLtimer has elapseduev_init1()to reduce event cache so that the kernel can invalidate deleted events before enqueing to userspacehwclock.soplugin tortc.sosince it now is stand-alone from thehwclocktool. 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:foosupport for services, by Robert Andersson, Atlas Copcomanual:yessupport for services, by Robert Andersson, Atlas Copcolog:consolesupport for services, by Robert Andersson, Atlas Copco:IDas a string, by Jonas Johansson, Westermoinitctl reload, when a service configuration has changed. Disabled by default, but can be enabled with./configure --enable-auto-reloadptxmode=0666consoleas alias for@consolein tty stanzas--enable-rw-rootsconfigure option, userwfor your/partition in/etc/fstabinstead to trigger remount at boot:IDoptional, use NULL/zero internally this allows ...name:foosyntax, creates conditions w/o a path, and ...:IDqualifier to conditions if set for a service/run/finit.sockto/run/finit/socketofficially only supported for use by theinitctltoolSOCK_SEQPACKETinstead ofSOCK_STREAM.Recommend using watchdogd v3.4, or later, which support this
/etc/network/interfaces, which has include statements. No more nativeifupof 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/rundoes not yet exist (symlink to/run). Added compat layer for access@consoleresolves to >1 TTY,/var/runstdinto/dev/nullfor services by defaultnanosleep()to achieve "signal safe" sleep. Fixed by Jacques de Laval, Westermologitprocesses when parent diesrc.local. Fixed by Jacques de Laval, Westermo/bin/sh -c foojust 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, WestermoSIGPWRlikeSIGSUR2, i.e., power off the systemtzset()oninitctl reloadto 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