diff --git a/ChangeLog.md b/ChangeLog.md index cc7b2509..316aa9d0 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -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 event, because services may depend on each other * 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 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 @@ -506,7 +506,7 @@ Bug fix release. * Add support for status/show service by `name:id` * 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 debugging documentation * 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 * Improve urandom plugin for embedded systems w/o random seed * 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. * Clarify in the README and in `initctl help` that the GW event to 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 compiler toolchains are known to have problems with `-Os` * 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` * 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 TTYs in a background process completely blocked inetd services from 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. This prevents a single programming mistake in by a 3rd party developer from taking down the entire system. @@ -807,7 +807,7 @@ Major bug fix release. ### Changes * 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 service plugins for their callbacks to work. * Only clear screen when in verbose mode. Maybe this should be removed diff --git a/README.md b/README.md index bb8cfcd6..a376f256 100644 --- a/README.md +++ b/README.md @@ -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 available: - service nginx -- High performace HTTP server + service nginx -- High performance HTTP server Here is another example where we instruct Finit to not start BusyBox `ntpd` until `syslogd` has started properly. Finit waits for `syslogd` diff --git a/contrib/alpine/rc.local b/contrib/alpine/rc.local index fba6be05..24b587c8 100755 --- a/contrib/alpine/rc.local +++ b/contrib/alpine/rc.local @@ -4,5 +4,5 @@ # # Each line is run in sequence. # -# NOTE: Remeber to set the executable bit! +# NOTE: Remember to set the executable bit! # diff --git a/contrib/void/rc.local b/contrib/void/rc.local index 4921ff64..868f149f 100755 --- a/contrib/void/rc.local +++ b/contrib/void/rc.local @@ -4,4 +4,4 @@ # # Each line is run in sequence. # -# NOTE: Remeber to set the executable bit! +# NOTE: Remember to set the executable bit! diff --git a/doc/build.md b/doc/build.md index 72bb501c..901e5e64 100644 --- a/doc/build.md +++ b/doc/build.md @@ -27,7 +27,7 @@ optional plugins to enable. It depends on two external libraries: PKG_CONFIG_LIBDIR=/usr/local/lib/pkgconfig ./configure 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 - libuEv v2.2.0 diff --git a/doc/cmdline.md b/doc/cmdline.md index 3551a81a..69de37e5 100644 --- a/doc/cmdline.md +++ b/doc/cmdline.md @@ -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 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 [bootparam(7)]: https://www.man7.org/linux/man-pages/man7/bootparam.7.html diff --git a/doc/conditions.md b/doc/conditions.md index 892f6ebf..000be706 100644 --- a/doc/conditions.md +++ b/doc/conditions.md @@ -90,7 +90,7 @@ Built-in Conditions Finit comes with a set of plugins for conditions: `pidfile`, `netlink`, `sys`, and `usr`. The `pidfile` plugin (recursively) watches `/run/` (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 brought up/down and when a default route (gateway) is set, in the `net/` namespace. The `sys` and `usr` plugins monitor are passive condition diff --git a/doc/config.md b/doc/config.md index 7d9ae415..799a2a9c 100644 --- a/doc/config.md +++ b/doc/config.md @@ -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: - 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, the service is reloaded (stopped and started). - If a new service is added it is automatically started — respecting diff --git a/man/finit.8 b/man/finit.8 index 312c78d5..d6381dd7 100644 --- a/man/finit.8 +++ b/man/finit.8 @@ -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 file removed, service B is also stopped. .Pp -The following condition families are availble today: +The following condition families are available today: .Pp .Bl -tag -width pid -offset indent .It Cm net diff --git a/man/finit.conf.5 b/man/finit.conf.5 index c21ba147..e919178b 100644 --- a/man/finit.conf.5 +++ b/man/finit.conf.5 @@ -301,7 +301,7 @@ services named may be .Cm foo:1 , 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: .Bl -tag -offset indent -width 1n .It Cm EXIT_CODE=[exited,signal] diff --git a/plugins/netlink.c b/plugins/netlink.c index 3c1df2f5..d1d919a2 100644 --- a/plugins/netlink.c +++ b/plugins/netlink.c @@ -355,7 +355,7 @@ static void nl_resync(int all) if (all) { _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/"); nl_resync_ifaces(sd, seq++); diff --git a/plugins/sys.c b/plugins/sys.c index 619711bc..0d957457 100644 --- a/plugins/sys.c +++ b/plugins/sys.c @@ -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 * diff --git a/plugins/usr.c b/plugins/usr.c index bd6913ff..c7512349 100644 --- a/plugins/usr.c +++ b/plugins/usr.c @@ -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 * diff --git a/src/api.c b/src/api.c index b6c54a22..4365bb03 100644 --- a/src/api.c +++ b/src/api.c @@ -413,7 +413,7 @@ static void api_cb(uev_t *w, void *arg, int events) case INIT_CMD_SVC_ITER: // _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 * have to do for now. */ @@ -493,7 +493,7 @@ int api_init(uev_ctx_t *ctx) return 0; error: - _pe("Failed intializing API socket"); + _pe("Failed initializing API socket"); umask(oldmask); close(sd); return 1; diff --git a/src/cond-w.c b/src/cond-w.c index d7902c83..c482aabf 100644 --- a/src/cond-w.c +++ b/src/cond-w.c @@ -273,7 +273,7 @@ static int do_assert(const char *fpath, const struct stat *sb, int tflg, struct nm = strstr((char *)fpath, COND_BASE); 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; } diff --git a/src/conf.c b/src/conf.c index 76e5f495..961516f8 100644 --- a/src/conf.c +++ b/src/conf.c @@ -580,7 +580,7 @@ static void parse_dynamic(char *line, struct rlimit rlimit[], char *file) return; } - /* Read contrl group limits */ + /* Read control group limits */ if (MATCH_CMD(line, "cgroup ", x)) { conf_parse_cgroup(x); return; diff --git a/src/finit.c b/src/finit.c index 2e66c1a6..7c6e8c67 100644 --- a/src/finit.c +++ b/src/finit.c @@ -312,7 +312,7 @@ static void fs_mount_all(void) * occurrence of these file systems in /etc/fstab will replace these * 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. */ static void fs_init(void) @@ -389,7 +389,7 @@ static void finalize(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! */ sm_init(&sm); @@ -557,7 +557,7 @@ int main(int argc, char *argv[]) console_init(); /* - * Initalize event context. + * Initialize event context. */ uev_init1(&loop, 1); ctx = &loop; diff --git a/src/pid.c b/src/pid.c index 780e12a0..809cc42f 100644 --- a/src/pid.c +++ b/src/pid.c @@ -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 * 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 - * 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 * never be asserted again after `initctl reload`. * diff --git a/src/plugin.c b/src/plugin.c index d0008221..b005d093 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -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 * 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. * * Returns: diff --git a/src/sample.conf b/src/sample.conf index eb2b28cc..e6c6ceab 100644 --- a/src/sample.conf +++ b/src/sample.conf @@ -12,7 +12,7 @@ # runlevel. Finit does not restart them when they exit. # # - 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 # # The env: is an optional path to a file with environment variables to diff --git a/src/service.c b/src/service.c index 90c3be9f..86521dc7 100644 --- a/src/service.c +++ b/src/service.c @@ -843,7 +843,7 @@ static int service_restart(svc_t *svc) /** * 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, * 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 * system runlevels with optional username. The @type argument details * 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. * * 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 * the contents of the second. The :ID can be any string value and - * defaults to "" (emtpy string). + * defaults to "" (empty string). * * Returns: * 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 */ 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, '/'); if (ptr) ptr++; diff --git a/src/sig.c b/src/sig.c index a7a87939..b0e44aad 100644 --- a/src/sig.c +++ b/src/sig.c @@ -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) { diff --git a/src/sm.c b/src/sm.c index 8d708bc0..54d470d2 100644 --- a/src/sm.c +++ b/src/sm.c @@ -187,7 +187,7 @@ restart: } /* 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 */ _d("Starting services new to this runlevel ..."); diff --git a/src/sm.h b/src/sm.h index 281fb6a4..2e7a52e6 100644 --- a/src/sm.h +++ b/src/sm.h @@ -27,9 +27,9 @@ typedef enum { SM_BOOTSTRAP_STATE = 0, /* Init state, bootstrap services */ 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_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_state_t; diff --git a/src/svc.h b/src/svc.h index 5150c18e..82739558 100644 --- a/src/svc.h +++ b/src/svc.h @@ -40,7 +40,7 @@ typedef int svc_cmd_t; typedef enum { SVC_TYPE_FREE = 0, /* Free to allocate */ 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_TTY = 8, /* Like service, but dedicated to TTYs */ SVC_TYPE_SYSV = 32, /* SysV style init.d script w/ start/stop */ diff --git a/test/tenv/exec.sh b/test/tenv/exec.sh index 17eadadb..7796f235 100755 --- a/test/tenv/exec.sh +++ b/test/tenv/exec.sh @@ -1,5 +1,5 @@ #!/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 #