Git log: commit a9f39d42f88e2dfb9178098407a8acab42210233
Author: yangfl <yangfl@users.noreply.github.com>
Date: Sat Jan 22 21:30:39 2022 +0800
debian: update to 4.2
commit 670eac78f8607b25529439bfd136a3beddbf4605
Merge: 22da48a 0519626
Author: yangfl <yangfl@users.noreply.github.com>
Date: Sun Jan 23 01:42:17 2022 +0800
Merge tag 'upstream/4.2'
commit 0519626a931e5a555534b06c30838ef802f8dcf6
Author: yangfl <yangfl@users.noreply.github.com>
Date: Sun Jan 23 01:39:07 2022 +0800
New upstream version 4.2
commit f32e4d4b3013ec3bf7130e5a16a4c63a226a906b
Author: Joachim Wiberg <troglobit@gmail.com>
Date: Sun Jan 16 05:01:03 2022 +0100
Update changelog and bump version for v4.2 release
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
commit eff87b3dc57e624d00c695be0695f2473fe4cb3b
Author: Joachim Wiberg <troglobit@gmail.com>
Date: Sun Jan 16 05:00:31 2022 +0100
.github: add basic release general
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
commit ea4821fd187f39eb72c70a00b84938e5f17c8273
Author: Joachim Wiberg <troglobit@gmail.com>
Date: Sun Jan 16 04:56:34 2022 +0100
plugins/urandom: fix resource leak, found by Coverity Scan
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
commit 6285668dcd24703a645b790805759b901e23620e
Author: Joachim Wiberg <troglobit@gmail.com>
Date: Sun Jan 16 04:47:51 2022 +0100
.github: action for running coverity scan
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
commit 449bc7d12bee656811ceb5f7748445970569e311
Author: Joachim Wiberg <troglobit@gmail.com>
Date: Thu Jan 13 22:38:36 2022 +0100
Follow-up to 10b72f1: periodically age service crash counter
Traditionally we've reset the service restart counter on two occasions:
1) when a service reaches its max crash count (default 10), and
2) when a service somehow "stabilizes"
In the second case the service is restored to normal running state and
we "forget" its bad previous behavior. Meaning we cannot catch daemons
that act in an unstable manner outside the "rage quit" scenario.
This patch allows for slowing aging (decrementing) the restart counter
once every five minutes. Meaning we still catch rage quitters but now
are also able catch other types of misbehavior.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
commit ee867e7f3b422a5c6bae06baa6363faa4a88271a
Author: Joachim Wiberg <troglobit@gmail.com>
Date: Wed Jan 12 19:33:19 2022 +0100
Update ChangeLog
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
commit b4c7ae9c8cb445b21d7c064f321e92e81b7692ce
Author: Joachim Wiberg <troglobit@gmail.com>
Date: Tue Jan 11 17:20:22 2022 +0100
plugins/bootmisc: check return value from symlink() log on error
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
commit 95995a45cfe89c9d514306d1caa4bdbd7045785b
Author: Joachim Wiberg <troglobit@gmail.com>
Date: Tue Jan 11 17:18:59 2022 +0100
Add total restart counter for service & sysv daemons
This patch adds a recent feature request to keep track of the total
number of restarts (including crashes and initctl restart) of both
service and sysv daemons.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
commit 823bb82b8c6592a979e4781263235cd31da83a2b
Author: Joachim Wiberg <troglobit@gmail.com>
Date: Tue Jan 11 16:19:25 2022 +0100
initctl: display number of restarts and max restarts in job status
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
commit 9a5bb46f78bd036cda1093d7bf871338f0ef53f5
Author: Joachim Wiberg <troglobit@gmail.com>
Date: Tue Jan 11 15:50:26 2022 +0100
Fix #212: service PID file lost after initctl reload
Clearing of the svc->pidfile was introduced in e1b87d70 for a
restriction that has now been removed.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
commit 950ca953f5040d7cb6be013ca552acb8f3743226
Author: Joachim Wiberg <troglobit@gmail.com>
Date: Tue Jan 11 13:40:07 2022 +0100
Fix #211: drop hard-coded getty limit of 32 characters for usernames
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
commit 495c8c9eac60462841bad6a12c6d004372ce4156
Author: Joachim Wiberg <troglobit@gmail.com>
Date: Mon Jan 10 21:49:24 2022 +0100
Update changelog and bump version for v4.2-rc1
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
commit 28877955861e18a85b1c287297f73c71ec6e2fda
Author: Joachim Wiberg <troglobit@gmail.com>
Date: Mon Jan 10 21:49:01 2022 +0100
initctl: minor, coding style cleanup
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
commit 6a893f50aee62b149063a73878915429159ebfd9
Author: Joachim Wiberg <troglobit@gmail.com>
Date: Mon Jan 10 21:46:22 2022 +0100
initctl: refactor has_utmp() capability check to use new cmd conds
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
commit 5d08353284bf48a4dd68db4d55d92bd6250aa25a
Author: Joachim Wiberg <troglobit@gmail.com>
Date: Mon Jan 10 21:38:19 2022 +0100
initctl: minor, fix shadowing of global variable
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
commit a37037ded4b190578510f210709abce8e8fd8fa4
Author: Joachim Wiberg <troglobit@gmail.com>
Date: Mon Jan 10 21:21:35 2022 +0100
Fix #188: support without cgroups v2 support
This patch adds support for detecting if the Linux kernel Fint runs on
has support for cgroups v2. The probe is done very early, in runlevel
S, when attempting to mount /sys/fs/cgroup. Meaning, the log message
may be lost on systems that do not run sysklogd[1].
Here's the relevant logs from a system running myLinux on a kernel
that has cgroups v2 support disabled:
Jan 10 20:19:40 anarchy finit[1]: myLinux 2021.11-696-g8fddaf36ed, entering runlevel S
Jan 10 20:19:40 anarchy finit[1]: Kernel does not support cgroups v2, disabling.
Jan 10 20:19:41 anarchy finit[1]: myLinux 2021.11-696-g8fddaf36ed, entering runlevel 2
All code paths that attempt to set or query kernel cgroups config has
been short circuited when this happens. However, this does not apply
to any cgroup related config in the Finit .conf files -- which may of
course be omitted. Yet, if configuration directives exist, they will
be parsed and may cause error.
Also, the initctl tool checks if /sys/fs/cgroup is mounted at runtime
and disables all status output and commands that rely on the feature.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
commit d331b72dfda8f4323473f493bae343dbd45bbb3f
Author: Joachim Wiberg <troglobit@gmail.com>
Date: Mon Jan 10 20:26:37 2022 +0100
Relocate ismnt() and fismnt() to util.c, for sharing with initctl
initctl cannot link with helpers.c, so let's relocate these helper
functions to util.c instead. Need them to probe for cgroup support.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
commit 3b21d35f23c6853350cffb87867ec8bfe425749a
Author: Joachim Wiberg <troglobit@gmail.com>
Date: Mon Jan 10 13:48:46 2022 +0100
Fix arrow in service desciption ASCII
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
commit 62a694b8b726b5decdb6f7a1e9c346a55c59d546
Author: Joachim Wiberg <troglobit@gmail.com>
Date: Sun Jan 2 08:22:15 2022 +0100
Prepare ChangeLog for upcoming v4.2 release
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
commit eeba2960f96e7dc117e1c8895e01b38cd310ab80
Author: Joachim Wiberg <troglobit@gmail.com>
Date: Sun Jan 2 07:35:33 2022 +0100
Document new per-service options controlling automatic respawn
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
commit 91550c926ba5705d30c00911564363e72bcd992d
Author: Joachim Wiberg <troglobit@gmail.com>
Date: Sun Jan 2 07:13:06 2022 +0100
Follow-up to ec2900e: use restart_sec:SEC as canonical option name
A timeout is not the same as a restart delay, which this option really
controls, but the name restart_delay is a bit too long. Hence, this
obvious name so there's no ambiguity what unit we're dealing with.
Keeping restarttmo:SEC as a compatibility setting for the benefit of
the original authors, for now.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
commit 184525687c73d3d858d599822422d145fa66f7d2
Author: Joachim Wiberg <troglobit@gmail.com>
Date: Sun Jan 2 06:52:44 2022 +0100
Follow-up to ec2900e: minor cleanup + signed vs unsigned comparison
Minor coding style cleanup. Also, clang complained of a signed vs
unsigned comparison in service_retry(), max(timeout, svc->restart_tmo)
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
commit cdede817fd0dfe2aa45af5df7bcb01399dc525e7
Author: Joachim Wiberg <troglobit@gmail.com>
Date: Sun Jan 2 06:14:42 2022 +0100
initctl: new command 'ident [NAME]' shows ids of all/named services
As suggested in issue #197, this new command: 'initctl id [NAME]'
lists identities of all, or named, services. E.g,
# initctl id telnetd
telnetd:23
telnetd:2323
The NAME argument is optional, when omitted it lists all enabled
run/task/sysv/service in the system, with their full name, and any
optional identitty. E.g.
# initctl id
dropbear
tty:console
mdnsd
mini-snmpd
smcrouted
sntpd
ssdpd
sysklogd
watchdogd
httpd
telnetd:23
telnetd:2323
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
commit df42c2f6feb50883ae4a0a095574701bf1eaa3ea
Author: Joachim Wiberg <troglobit@gmail.com>
Date: Sun Jan 2 06:11:57 2022 +0100
Fix #197: initctl status foo should show overview of foo:1, foo:2 ..
When the system has multiple services 'foo' the initctl command
'status foo' should give a focused overview of all matching foo:*,
whereas a 'status foo:2' should show the detailed view of that
particular instance.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
commit b53f2f4a603b3b239339efb4b0bcdb03aaa79b5d
Author: Joachim Wiberg <troglobit@gmail.com>
Date: Sun Jan 2 05:34:10 2022 +0100
Cleanup, drop now unused internal function svc_is_unique()
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
commit 5ff27c4fe25b96d0bec18b54f188f85ca9b47627
Author: Joachim Wiberg <troglobit@gmail.com>
Date: Sun Jan 2 01:34:49 2022 +0100
Allow kernel log messages to console with loglevel=7
Since Finit v4.0 kernel console output has been silenced just prior to
the banner being printed, unless finit.debug mode was enabled. This
patch makes sure to check the kernel loglevel, if it's >= 7, finit no
longer disables kernel console ouput.
Consequently, you now need 'quiet' on your kernel command line, or a
loglevel < 7 for a quiet boot, at least until a syslogd takes over.
This means that you now can debug the kernel and finit independently,
which should be a great comfort to anyone doing bringup or any form of
kernel debugging.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
commit e5fff5117dd7210382f09816bb37d2a3f965394b
Author: Joachim Wiberg <troglobit@gmail.com>
Date: Sun Jan 2 01:34:19 2022 +0100
Minor, simplify internal API
Cleanup of old cruft.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
commit 615cd5aac32da96f3f87fa8d6cc700eb77cb8529
Author: Joachim Wiberg <troglobit@gmail.com>
Date: Sun Jan 2 01:04:07 2022 +0100
plugins/urandom: use RNDADDENTROPY ioctl to seed kernel rng
This patch switches from "cp /var/lib/misc/random-seed /dev/urandom"
to use the kernel RNDADDENTROPY ioctl, which actually increments the
entropy count.
Also, the amount of random data saved at reboot is increased from the
fairly low 512 to 32768 bytes.
All in all, this should greatly improve the stability of most systems
during, or close to, bootstrap. In particular embedded systems with
limited or no HWRNG.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
commit 621d95a89ea32b632420bf6454e12dba9071681b
Author: Joachim Wiberg <troglobit@gmail.com>
Date: Sat Jan 1 22:55:07 2022 +0100
Minor, fix clang warning 'bootstrap shadows local variable'
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
commit cd383167f9e9205d32f62a8483f413e2795cc8c7
Author: Joachim Wiberg <troglobit@gmail.com>
Date: Sat Jan 1 22:51:45 2022 +0100
plugins/rtc: instead of bailing, reset invalid RTC to kernel default
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
commit cb2969002c971d5119b1ab4aea37cd58857588c4
Author: Joachim Wiberg <troglobit@gmail.com>
Date: Sat Jan 1 18:20:47 2022 +0100
Fix #210: simplify escape code to clear line
Since we just want to clear the complete line, and are already a the
beginning of the line, we can use the simpler \e[K which also seems
to fix the display resize bug in #210.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
commit 1cf204e23d269de5fe455aa9a3367033a6830c09
Author: Joachim Wiberg <troglobit@gmail.com>
Date: Sat Jan 1 16:37:06 2022 +0100
Fix #187: fix typos, including slight clean up
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
commit 393834b253dc5bc9204aa6388c5e484778713fde
Author: Joachim Wiberg <troglobit@gmail.com>
Date: Tue Dec 7 00:13:54 2021 +0100
Follow-up to 4ca8256: ordering mishap
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
commit 4ca8256e18656bf547bb4825c0d248761018d121
Author: Joachim Wiberg <troglobit@gmail.com>
Date: Tue Dec 7 00:05:47 2021 +0100
Follow-up to 280d91b, fix conio.h namespace
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
commit 280d91b9bff27d96519daa2f14d21e5d402cda2d
Author: Joachim Wiberg <troglobit@gmail.com>
Date: Mon Dec 6 21:38:20 2021 +0100
Add support for new libite (-lite) header namespace
Due to an unfortunate name clash with the DirectFB project LiTE, the
libite (-lite) project had to change its header namespace from
lite/*.h -> libite/*.h
This patch adds support for the new namepace in Finit, triggered by the
define _LIBITE_LITE, from the .pc file read by pkg-config. This should
only be needed on systems that install libite without the compatibility
symlink lite -> libite/ in the staging include directory.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
commit 980152fd53fc3cf488c8987cdc21d9851c1957cd
Author: Joachim Wiberg <troglobit@gmail.com>
Date: Tue Nov 30 11:44:22 2021 +0100
Add support for non-root users to use initctl, e.g. group wheel
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
commit d994420d4dd87f153fcce2233f834f294e0491c6
Author: Joachim Wiberg <troglobit@gmail.com>
Date: Wed Nov 10 10:18:02 2021 +0100
plugins: minor coding style cleanup
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
commit 38f3ecf01f01a18a1868e4ad945af7769e510370
Author: Joachim Wiberg <troglobit@gmail.com>
Date: Thu Sep 23 12:44:31 2021 +0200
.github: run tests from distcheck
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
commit 5cd0d05b3132dafe8a0316a62a3395883bb67500
Author: Joachim Wiberg <troglobit@gmail.com>
Date: Thu Sep 23 12:27:33 2021 +0200
.github: install libite and libuev to /usr
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
commit 62519c3638382c88b55d53070e2717d429467b96
Author: Joachim Wiberg <troglobit@gmail.com>
Date: Thu Sep 23 10:01:45 2021 +0200
.github: avoid running tests in parallel
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
commit 27bb2deb1a98b08e7b42e7456b4ddcc7d548b33a
Author: Joachim Wiberg <troglobit@gmail.com>
Date: Thu Sep 23 09:56:19 2021 +0200
.github: sudo do what I mean
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
commit a2c8e71f143e979b8efa7156c5415009c8b06b01
Author: Joachim Wiberg <troglobit@gmail.com>
Date: Thu Sep 23 09:53:26 2021 +0200
.github: update dynamic linker cache after installing library deps
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
commit d1f56e7c2e2999e8b6bb600ce05e63fab08b9c1b
Author: Joachim Wiberg <troglobit@gmail.com>
Date: Thu Sep 23 09:46:19 2021 +0200
.github: adjust path for showing finit & intictl usage text
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
commit a9fd0cbf02b3cdf658a0036dcc3cacfeb17e1426
Author: Joachim Wiberg <troglobit@gmail.com>
Date: Thu Sep 23 09:32:38 2021 +0200
.github: simplify and fix install path
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
commit be8c89ec00dc4aa05a037f6413f1413bb74c79b8
Author: Joachim Wiberg <troglobit@gmail.com>
Date: Thu Sep 23 09:28:44 2021 +0200
Bump version for v4.2 release cycle
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
commit 4f5375269358108ef5cc1a5cc429b51b83e17f07
Author: Joachim Wiberg <troglobit@gmail.com>
Date: Thu Sep 23 09:26:54 2021 +0200
.github: install support libs to /usr/local
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
commit 393673222d21c0624c508d11b23ee8e5d4de0e23
Author: Joachim Wiberg <troglobit@gmail.com>
Date: Thu Sep 23 09:01:25 2021 +0200
Replace Travis-CI with GitHub Actions
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
commit a88f4524d512e0214643ecbe56068939836a830e
Merge: 3a02066 ec2900e
Author: Joachim Wiberg <troglobit@gmail.com>
Date: Thu Sep 23 08:46:42 2021 +0200
Merge pull request #208 from liuming50/support-more-specific-control-of-services
service.c: add more parameters when starting services
commit 3a02066a66cb841316e252c38c9afdd0f73705e3
Merge: 7e3981d d718a27
Author: Joachim Wiberg <troglobit@gmail.com>
Date: Thu Sep 23 08:31:19 2021 +0200
Merge pull request #206 from liuming50/dont-hard-code-dbus-user-pidfile
dbus: dont hard-code daemon user/pidfile
commit 7e3981d1a351636baa8d80fe81f5d69b233ca039
Author: Joachim Wiberg <troglobit@gmail.com>
Date: Thu Sep 23 08:30:20 2021 +0200
Merge pull request #205 from liuming50/fix-a-wrong-header-include
Fix a header including syntax
commit ec2900e4dd58c7d16722f44dfaf4b127e72dc2c1
Author: Robert Andersson <robert.m.andersson@atlascopco.com>
Date: Mon Sep 20 11:49:54 2021 +0200
service.c: add more parameters when starting services
It would be good if we can control the services more specifically with
the following parameters like:
restart:N - how many times shall the service to be restarted on
failures (<10), the default max is 10.
restart_tmo - the timeout of the restarting.
norestart - dont restart on failures.
oncrash - once all retrying also fail, how to deal with it,
rebooting or ignoring the failures.
Signed-off-by: Robert Andersson <robert.m.andersson@atlascopco.com>
Signed-off-by: Ming Liu <liu.ming50@gmail.com>
commit d718a27abf3049f7892a1ed5b0ee94fa610e7df3
Author: Ming Liu <liu.ming50@gmail.com>
Date: Mon Sep 20 10:35:54 2021 +0200
dbus: dont hard-code daemon user/pidfile
Both DBUS user and pidfile is configurable in DBUS compilation, by
passing "--with-dbus-user=" and "--with-system-pid-file=", let's avoid
hard-coding them here, use macros instead.
Signed-off-by: Ming Liu <liu.ming50@gmail.com>
commit aef3b4117d0945cb010cc446efa0b5f60b7216c2
Author: Joachim Wiberg <troglobit@gmail.com>
Date: Sat Sep 18 09:48:43 2021 +0200
Merge pull request #200 from liuming50/dont-hard-code-nologins-file
Dont hard-code nologin file