Merge pull request #181 from yangfl/typo

Fix typo
This commit is contained in:
Joachim Wiberg authored and GitHub committed 2021-06-25 07:43:08 +02:00
commit 522a06f864
26 files changed
+38 -38

No files matched your search

+6 -6
View File
@@ -184,7 +184,7 @@ make sure to read the whole change log when upgrading.
- As long as a stepped service changes state we queue another step all - As long as a stepped service changes state we queue another step all
event, because services may depend on each other event, because services may depend on each other
* Require new libuEv API: `uev_init1()` to reduce event cache so that * Require new libuEv API: `uev_init1()` to reduce event cache so that
the kernel can invalidate deleted events before enqueing to userspace the kernel can invalidate deleted events before enqueuing to userspace
* Rename `hwclock.so` plugin to `rtc.so` since it now is stand-alone * Rename `hwclock.so` plugin to `rtc.so` since it now is stand-alone
from the `hwclock` tool. Note: the kernel can also be set to load 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 and store RTC to/from system clock at boot/halt as well, issue #110
@@ -506,7 +506,7 @@ Bug fix release.
* Add support for status/show service by `name:id` * Add support for status/show service by `name:id`
* Enforce terse mode after boot, if verbose mode is disabled * Enforce terse mode after boot, if verbose mode is disabled
* Reenable verbose mode at reboot, if disabled at boot * Re-enable verbose mode at reboot, if disabled at boot
* Update section mentioning BusyBox getty * Update section mentioning BusyBox getty
* Update debugging documentation * Update debugging documentation
* Allow debug to override terse mode * Allow debug to override terse mode
@@ -561,7 +561,7 @@ handling and reconfiguration at runtime.
* Clarify how to select different plugins with the configure script * Clarify how to select different plugins with the configure script
* Improve urandom plugin for embedded systems w/o random seed * Improve urandom plugin for embedded systems w/o random seed
* Add `--debug` flag to `initctl` * Add `--debug` flag to `initctl`
* The runlevels listed for services in `initctl show` now hightlight the * The runlevels listed for services in `initctl show` now highlight the
active runlevel. active runlevel.
* Clarify in the README and in `initctl help` that the GW event to * Clarify in the README and in `initctl help` that the GW event to
listen for in service declarations is `GW:UP` listen for in service declarations is `GW:UP`
@@ -593,7 +593,7 @@ handling and reconfiguration at runtime.
* Do not use `-Os` use `-O2` as default optimization level. Many cross * Do not use `-Os` use `-O2` as default optimization level. Many cross
compiler toolchains are known to have problems with `-Os` compiler toolchains are known to have problems with `-Os`
* Do not allow build VERSION to be overloaded by an environment variable * Do not allow build VERSION to be overloaded by an environment variable
* Fix too small MAX arguments and too few argments in `svc_t` for * Fix too small MAX arguments and too few arguments in `svc_t` for
reading currently running services with `initctl show` reading currently running services with `initctl show`
* Unblock blocked signals after forking off a child * Unblock blocked signals after forking off a child
@@ -711,7 +711,7 @@ The inetd release.
turned out to not work so well after all. For instance, launching turned out to not work so well after all. For instance, launching
TTYs in a background process completely blocked inetd services from TTYs in a background process completely blocked inetd services from
even starting up listening sockets ... proper fork seems to work fine even starting up listening sockets ... proper fork seems to work fine
though. This is the casue for *yanking* the [1.11] release, below. though. This is the cause for *yanking* the [1.11] release, below.
* Trap segfaults caused by external plugins/callbacks in a sub-process. * Trap segfaults caused by external plugins/callbacks in a sub-process.
This prevents a single programming mistake in by a 3rd party developer This prevents a single programming mistake in by a 3rd party developer
from taking down the entire system. from taking down the entire system.
@@ -807,7 +807,7 @@ Major bug fix release.
### Changes ### Changes
* Show `__FILE__` in `_d()` debug messages, useful for plugins with * Show `__FILE__` in `_d()` debug messages, useful for plugins with
similarily named callbacks. Also, only in debug mode anyway similarly named callbacks. Also, only in debug mode anyway
* Make sure to cleanup recorded PID when a service is lost. Required by * Make sure to cleanup recorded PID when a service is lost. Required by
service plugins for their callbacks to work. service plugins for their callbacks to work.
* Only clear screen when in verbose mode. Maybe this should be removed * Only clear screen when in verbose mode. Maybe this should be removed
+1 -1
View File
@@ -140,7 +140,7 @@ Dependencies are handled using [conditions](doc/conditions.md). One of
the most common conditions is to wait for basic networking to become the most common conditions is to wait for basic networking to become
available: available:
service <net/route/default> nginx -- High performace HTTP server service <net/route/default> nginx -- High performance HTTP server
Here is another example where we instruct Finit to not start BusyBox Here is another example where we instruct Finit to not start BusyBox
`ntpd` until `syslogd` has started properly. Finit waits for `syslogd` `ntpd` until `syslogd` has started properly. Finit waits for `syslogd`
+1 -1
View File
@@ -4,5 +4,5 @@
# #
# Each line is run in sequence. # Each line is run in sequence.
# #
# NOTE: Remeber to set the executable bit! # NOTE: Remember to set the executable bit!
# #
+1 -1
View File
@@ -4,4 +4,4 @@
# #
# Each line is run in sequence. # Each line is run in sequence.
# #
# NOTE: Remeber to set the executable bit! # NOTE: Remember to set the executable bit!
+1 -1
View File
@@ -27,7 +27,7 @@ optional plugins to enable. It depends on two external libraries:
PKG_CONFIG_LIBDIR=/usr/local/lib/pkgconfig ./configure PKG_CONFIG_LIBDIR=/usr/local/lib/pkgconfig ./configure
The configure script checks for all dependencies, including the correct The configure script checks for all dependencies, including the correct
version of the above mentioned libraries. Currently requried versions: version of the above mentioned libraries. Currently required versions:
- libite v2.2.0 - libite v2.2.0
- libuEv v2.2.0 - libuEv v2.2.0
+1 -1
View File
@@ -44,7 +44,7 @@ The `bool` setting is one of `on, off, true false, 1, 0`.
`[1]` will be started, so a `tty [1] @console nologin` configuration `[1]` will be started, so a `tty [1] @console nologin` configuration
presents you with a root console without login. presents you with a root console without login.
For more on kernel boot paramaters, see the man page [bootparam(7)][]. For more on kernel boot parameters, see the man page [bootparam(7)][].
[config.md][]: config.md#rescue-mode [config.md][]: config.md#rescue-mode
[bootparam(7)]: https://www.man7.org/linux/man-pages/man7/bootparam.7.html [bootparam(7)]: https://www.man7.org/linux/man-pages/man7/bootparam.7.html
+1 -1
View File
@@ -90,7 +90,7 @@ Built-in Conditions
Finit comes with a set of plugins for conditions: `pidfile`, `netlink`, Finit comes with a set of plugins for conditions: `pidfile`, `netlink`,
`sys`, and `usr`. The `pidfile` plugin (recursively) watches `/run/` `sys`, and `usr`. The `pidfile` plugin (recursively) watches `/run/`
(recursively) for PID files created by the monitored services, and sets (recursively) for PID files created by the monitored services, and sets
a corresponding condition in the `pid/` namespace. Similarily, the a corresponding condition in the `pid/` namespace. Similarly, the
`netlink` plugin provides basic conditions for when an interface is `netlink` plugin provides basic conditions for when an interface is
brought up/down and when a default route (gateway) is set, in the `net/` brought up/down and when a default route (gateway) is set, in the `net/`
namespace. The `sys` and `usr` plugins monitor are passive condition namespace. The `sys` and `usr` plugins monitor are passive condition
+1 -1
View File
@@ -59,7 +59,7 @@ files for a package and let the user decide when to enable a service.
On `initctl reload` the following is checked for all services: On `initctl reload` the following is checked for all services:
- If a service's `.conf` file has been removed, or its conditions are no - If a service's `.conf` file has been removed, or its conditions are no
longer satisifed, the service is stopped. longer satisfied, the service is stopped.
- If the file is modified, or a service it depends on has been reloaded, - If the file is modified, or a service it depends on has been reloaded,
the service is reloaded (stopped and started). the service is reloaded (stopped and started).
- If a new service is added it is automatically started — respecting - If a new service is added it is automatically started — respecting
+1 -1
View File
@@ -107,7 +107,7 @@ Finit waits for the PID file of service A to be created/updated before
it starts service B. Conversely, if service A is stopped and its PID it starts service B. Conversely, if service A is stopped and its PID
file removed, service B is also stopped. file removed, service B is also stopped.
.Pp .Pp
The following condition families are availble today: The following condition families are available today:
.Pp .Pp
.Bl -tag -width pid -offset indent .Bl -tag -width pid -offset indent
.It Cm net .It Cm net
+1 -1
View File
@@ -301,7 +301,7 @@ services named
may be may be
.Cm foo:1 , .Cm foo:1 ,
or any unique identifier specified in the .conf file. The or any unique identifier specified in the .conf file. The
.cm post:script .Cm post:script
is called with an additional set of environment variables: is called with an additional set of environment variables:
.Bl -tag -offset indent -width 1n .Bl -tag -offset indent -width 1n
.It Cm EXIT_CODE=[exited,signal] .It Cm EXIT_CODE=[exited,signal]
+1 -1
View File
@@ -355,7 +355,7 @@ static void nl_resync(int all)
if (all) { if (all) {
_d("============================ RESYNC ================================="); _d("============================ RESYNC =================================");
/* this doesn't update condtions, and thus does not stop services */ /* this doesn't update conditions, and thus does not stop services */
cond_deassert("net/"); cond_deassert("net/");
nl_resync_ifaces(sd, seq++); nl_resync_ifaces(sd, seq++);
+1 -1
View File
@@ -1,4 +1,4 @@
/* System condtion event monitor for the Finit condition engine /* System condition event monitor for the Finit condition engine
* *
* Copyright (c) 2021 Joachim Wiberg <troglobit@gmail.com> * Copyright (c) 2021 Joachim Wiberg <troglobit@gmail.com>
* *
+1 -1
View File
@@ -1,4 +1,4 @@
/* User-defined condtion event monitor for the Finit condition engine /* User-defined condition event monitor for the Finit condition engine
* *
* Copyright (c) 2021 Joachim Wiberg <troglobit@gmail.com> * Copyright (c) 2021 Joachim Wiberg <troglobit@gmail.com>
* *
+2 -2
View File
@@ -413,7 +413,7 @@ static void api_cb(uev_t *w, void *arg, int events)
case INIT_CMD_SVC_ITER: case INIT_CMD_SVC_ITER:
// _d("svc iter, first: %d", rq.runlevel); // _d("svc iter, first: %d", rq.runlevel);
/* /*
* XXX: This severly limits the number of * XXX: This severely limits the number of
* simultaneous client connections, but will * simultaneous client connections, but will
* have to do for now. * have to do for now.
*/ */
@@ -493,7 +493,7 @@ int api_init(uev_ctx_t *ctx)
return 0; return 0;
error: error:
_pe("Failed intializing API socket"); _pe("Failed initializing API socket");
umask(oldmask); umask(oldmask);
close(sd); close(sd);
return 1; return 1;
+1 -1
View File
@@ -273,7 +273,7 @@ static int do_assert(const char *fpath, const struct stat *sb, int tflg, struct
nm = strstr((char *)fpath, COND_BASE); nm = strstr((char *)fpath, COND_BASE);
if (!nm) { if (!nm) {
_e("Incorrect condtion path %s, cannot %sassert", fpath, set ? "re" : "de"); _e("Incorrect condition path %s, cannot %sassert", fpath, set ? "re" : "de");
return 1; return 1;
} }
+1 -1
View File
@@ -580,7 +580,7 @@ static void parse_dynamic(char *line, struct rlimit rlimit[], char *file)
return; return;
} }
/* Read contrl group limits */ /* Read control group limits */
if (MATCH_CMD(line, "cgroup ", x)) { if (MATCH_CMD(line, "cgroup ", x)) {
conf_parse_cgroup(x); conf_parse_cgroup(x);
return; return;
+3 -3
View File
@@ -312,7 +312,7 @@ static void fs_mount_all(void)
* occurrence of these file systems in /etc/fstab will replace these * occurrence of these file systems in /etc/fstab will replace these
* mounts later in fs_mount_all() * mounts later in fs_mount_all()
* *
* Ignore any mount errors with EBUSY, kernel likely alread mounted * Ignore any mount errors with EBUSY, kernel likely already mounted
* the filesystem for us automatically, e.g., CONFIG_DEVTMPFS_MOUNT. * the filesystem for us automatically, e.g., CONFIG_DEVTMPFS_MOUNT.
*/ */
static void fs_init(void) static void fs_init(void)
@@ -389,7 +389,7 @@ static void finalize(void *unused)
static void crank_worker(void *unused) static void crank_worker(void *unused)
{ {
/* /*
* Initalize state machine and start all bootstrap tasks * Initialize state machine and start all bootstrap tasks
* NOTE: no network available! * NOTE: no network available!
*/ */
sm_init(&sm); sm_init(&sm);
@@ -557,7 +557,7 @@ int main(int argc, char *argv[])
console_init(); console_init();
/* /*
* Initalize event context. * Initialize event context.
*/ */
uev_init1(&loop, 1); uev_init1(&loop, 1);
ctx = &loop; ctx = &loop;
+1 -1
View File
@@ -166,7 +166,7 @@ int pid_file_set(svc_t *svc, char *file, int not)
* The logic is explained below. Please note that using the first form * The logic is explained below. Please note that using the first form
* of the syntax not only creates and removes the PID file, but it also * of the syntax not only creates and removes the PID file, but it also
* calls touch to update the mtime on service_restart(), only applicable * calls touch to update the mtime on service_restart(), only applicable
* to processes that accept SIGHUP. This to ensure dependant services * to processes that accept SIGHUP. This to ensure dependent services
* are sent SIGCONT properly on reload, otherwise their condition would * are sent SIGCONT properly on reload, otherwise their condition would
* never be asserted again after `initctl reload`. * never be asserted again after `initctl reload`.
* *
+1 -1
View File
@@ -274,7 +274,7 @@ static int init_plugins(uev_ctx_t *ctx)
* Loads a plugin from @path/@name[.so]. Note, if ".so" is missing from * Loads a plugin from @path/@name[.so]. Note, if ".so" is missing from
* the plugin @name it is added before attempting to load. * the plugin @name it is added before attempting to load.
* *
* It is up to the plugin itself ot register itself as a "ctor" with the * It is up to the plugin itself or register itself as a "ctor" with the
* %PLUGIN_INIT macro so that plugin_register() is called automatically. * %PLUGIN_INIT macro so that plugin_register() is called automatically.
* *
* Returns: * Returns:
+1 -1
View File
@@ -12,7 +12,7 @@
# runlevel. Finit does not restart them when they exit. # runlevel. Finit does not restart them when they exit.
# #
# - run : wait for completion before continuing with next stanza # - run : wait for completion before continuing with next stanza
# - task : like run but started in background, parallell with other stanzas # - task : like run but started in background, parallel with other stanzas
# - service : supervised daemon, run in foreground, restarted if it crashes # - service : supervised daemon, run in foreground, restarted if it crashes
# #
# The env: is an optional path to a file with environment variables to # The env: is an optional path to a file with environment variables to
+4 -4
View File
@@ -843,7 +843,7 @@ static int service_restart(svc_t *svc)
/** /**
* service_reload_dynamic - Called on SIGHUP, 'init q' or 'initctl reload' * service_reload_dynamic - Called on SIGHUP, 'init q' or 'initctl reload'
* *
* This function is called when Finit has recieved SIGHUP to reload * This function is called when Finit has received SIGHUP to reload
* .conf files in /etc/finit.d. It is responsible for starting, * .conf files in /etc/finit.d. It is responsible for starting,
* stopping and reloading (forwarding SIGHUP) to processes affected. * stopping and reloading (forwarding SIGHUP) to processes affected.
*/ */
@@ -1079,7 +1079,7 @@ static void parse_cmdline_args(svc_t *svc, char *cmd)
* This function is used to register commands to be run on different * This function is used to register commands to be run on different
* system runlevels with optional username. The @type argument details * system runlevels with optional username. The @type argument details
* if it's service to bo monitored/respawned (daemon), a one-shot task * if it's service to bo monitored/respawned (daemon), a one-shot task
* or a command that must run in sequence and not in parallell, like * or a command that must run in sequence and not in parallel, like
* service and task commands do. * service and task commands do.
* *
* The @line can optionally start with a username, denoted by an @ * The @line can optionally start with a username, denoted by an @
@@ -1119,7 +1119,7 @@ static void parse_cmdline_args(svc_t *svc, char *cmd)
* *
* Without the :ID syntax, Finit replaces the first service line with * Without the :ID syntax, Finit replaces the first service line with
* the contents of the second. The :ID can be any string value and * the contents of the second. The :ID can be any string value and
* defaults to "" (emtpy string). * defaults to "" (empty string).
* *
* Returns: * Returns:
* POSIX OK(0) on success, or non-zero errno exit status on failure. * POSIX OK(0) on success, or non-zero errno exit status on failure.
@@ -1328,7 +1328,7 @@ int service_register(int type, char *cfg, struct rlimit rlimit[], char *file)
/* TTYs cannot be redirected */ /* TTYs cannot be redirected */
log = NULL; log = NULL;
/* Create name:id tuple for identiy, e.g., tty:S0 */ /* Create name:id tuple for identity, e.g., tty:S0 */
ptr = strrchr(svc->dev, '/'); ptr = strrchr(svc->dev, '/');
if (ptr) if (ptr)
ptr++; ptr++;
+1 -1
View File
@@ -445,7 +445,7 @@ const char *sig_name(int signo)
} }
/* /*
* Inital signal setup - ignore everything but SIGCHLD until we're capable of responding * Initial signal setup - ignore everything but SIGCHLD until we're capable of responding
*/ */
static void chld_handler(int sig, siginfo_t *info, void *ctx) static void chld_handler(int sig, siginfo_t *info, void *ctx)
{ {
+1 -1
View File
@@ -187,7 +187,7 @@ restart:
} }
/* Prev runlevel services stopped, call hooks before starting new runlevel ... */ /* Prev runlevel services stopped, call hooks before starting new runlevel ... */
_d("All services have been stoppped, calling runlevel change hooks ..."); _d("All services have been stopped, calling runlevel change hooks ...");
plugin_run_hooks(HOOK_RUNLEVEL_CHANGE); /* Reconfigure HW/VLANs/etc here */ plugin_run_hooks(HOOK_RUNLEVEL_CHANGE); /* Reconfigure HW/VLANs/etc here */
_d("Starting services new to this runlevel ..."); _d("Starting services new to this runlevel ...");
+2 -2
View File
@@ -27,9 +27,9 @@
typedef enum { typedef enum {
SM_BOOTSTRAP_STATE = 0, /* Init state, bootstrap services */ SM_BOOTSTRAP_STATE = 0, /* Init state, bootstrap services */
SM_RUNNING_STATE, /* Normal state, services running */ SM_RUNNING_STATE, /* Normal state, services running */
SM_RUNLEVEL_CHANGE_STATE, /* A runlevel change has occured */ SM_RUNLEVEL_CHANGE_STATE, /* A runlevel change has occurred */
SM_RUNLEVEL_WAIT_STATE, /* Waiting for all stopped runlevel processes to be halted */ SM_RUNLEVEL_WAIT_STATE, /* Waiting for all stopped runlevel processes to be halted */
SM_RELOAD_CHANGE_STATE, /* A reload event has occured */ SM_RELOAD_CHANGE_STATE, /* A reload event has occurred */
SM_RELOAD_WAIT_STATE, /* Waiting for all stopped reload processes to be halted */ SM_RELOAD_WAIT_STATE, /* Waiting for all stopped reload processes to be halted */
} sm_state_t; } sm_state_t;
+1 -1
View File
@@ -40,7 +40,7 @@ typedef int svc_cmd_t;
typedef enum { typedef enum {
SVC_TYPE_FREE = 0, /* Free to allocate */ SVC_TYPE_FREE = 0, /* Free to allocate */
SVC_TYPE_SERVICE = 1, /* Monitored, will be respawned */ SVC_TYPE_SERVICE = 1, /* Monitored, will be respawned */
SVC_TYPE_TASK = 2, /* One-shot, runs in parallell */ SVC_TYPE_TASK = 2, /* One-shot, runs in parallel */
SVC_TYPE_RUN = 4, /* Like task, but wait for completion */ SVC_TYPE_RUN = 4, /* Like task, but wait for completion */
SVC_TYPE_TTY = 8, /* Like service, but dedicated to TTYs */ SVC_TYPE_TTY = 8, /* Like service, but dedicated to TTYs */
SVC_TYPE_SYSV = 32, /* SysV style init.d script w/ start/stop */ SVC_TYPE_SYSV = 32, /* SysV style init.d script w/ start/stop */
+1 -1
View File
@@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
# Execute a given command from withing the test environment. # Execute a given command from within the test environment.
# #
# Copyright (c) 2021 Jacques de Laval <jacques@de-laval.se> # Copyright (c) 2021 Jacques de Laval <jacques@de-laval.se>
# #