mirror of
https://github.com/troglobit/finit.git
synced 2026-11-03 13:28:27 +00:00
Fix various typos found by codepsell
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
15 files changed
+23
-24
No files matched your search
+3
-3
@@ -89,7 +89,7 @@ All relevant changes are documented in this file.
|
|||||||
|
|
||||||
### Fixes
|
### Fixes
|
||||||
- Fix #397: system shutdown/reboot can block on console input if action
|
- Fix #397: system shutdown/reboot can block on console input if action
|
||||||
is started remotely (ssh). Caused by legact TTY screen size probing,
|
is started remotely (ssh). Caused by legacy TTY screen size probing,
|
||||||
removed from both bootstrap and shutdown/reboot
|
removed from both bootstrap and shutdown/reboot
|
||||||
- Fix #400: both `HOOK_MOUNT_ERROR` and `sulogin()` fail to trigger on
|
- Fix #400: both `HOOK_MOUNT_ERROR` and `sulogin()` fail to trigger on
|
||||||
either mount or `fsck` errors. Problem caused by unresolved status
|
either mount or `fsck` errors. Problem caused by unresolved status
|
||||||
@@ -347,7 +347,7 @@ All relevant changes are documented in this file.
|
|||||||
`/etc/finit.conf`.
|
`/etc/finit.conf`.
|
||||||
|
|
||||||
For the complete experience a new top-level configuration file directive
|
For the complete experience a new top-level configuration file directive
|
||||||
`rcsd PATH` has aslo been added. It in turn can be used by `factory.conf`
|
`rcsd PATH` has also been added. It in turn can be used by `factory.conf`
|
||||||
as follows to override `/etc/finit.d`:
|
as follows to override `/etc/finit.d`:
|
||||||
|
|
||||||
rcsd /etc/factory.d
|
rcsd /etc/factory.d
|
||||||
@@ -930,7 +930,7 @@ make sure to read the whole change log when upgrading.
|
|||||||
previously hard-coded in Finit, e.g., starting the bundled watchdogd,
|
previously hard-coded in Finit, e.g., starting the bundled watchdogd,
|
||||||
various distro packed udevd and other hotplugging tools
|
various distro packed udevd and other hotplugging tools
|
||||||
* A proper rescue mode has been added. It is started extremely early
|
* A proper rescue mode has been added. It is started extremely early
|
||||||
and is protected with a bundled `suslogin`. Exiting rescue mode now
|
and is protected with a bundled `sulogin`. Exiting rescue mode now
|
||||||
brings up the system as a normal boot, as one expects
|
brings up the system as a normal boot, as one expects
|
||||||
* Support for `sysv` start/stop scripts as well as monitoring forking
|
* Support for `sysv` start/stop scripts as well as monitoring forking
|
||||||
services, stared using `sysv` or `service` stanza
|
services, stared using `sysv` or `service` stanza
|
||||||
|
|||||||
+6
-7
@@ -708,7 +708,7 @@ non-trivial constructs are better placed in a separate shell script.
|
|||||||
|
|
||||||
Similar to `task` is the `sysv` stanza, which can be used to call SysV
|
Similar to `task` is the `sysv` stanza, which can be used to call SysV
|
||||||
style scripts. The primary intention for this command is to be able to
|
style scripts. The primary intention for this command is to be able to
|
||||||
re-use much of existing setup and init scripts in Linux distributions.
|
reuse much of existing setup and init scripts in Linux distributions.
|
||||||
|
|
||||||
When entering an allowed runlevel, Finit calls `init-script start`, when
|
When entering an allowed runlevel, Finit calls `init-script start`, when
|
||||||
entering a disallowed runlevel, Finit calls `init-script stop`, and if
|
entering a disallowed runlevel, Finit calls `init-script stop`, and if
|
||||||
@@ -731,11 +731,10 @@ option to run it in the foreground, more on this below in `service`.
|
|||||||
**Syntax:** `service [LVLS] <COND> /path/to/daemon ARGS -- Optional description`
|
**Syntax:** `service [LVLS] <COND> /path/to/daemon ARGS -- Optional description`
|
||||||
|
|
||||||
Service, or daemon, to be monitored and automatically restarted if it
|
Service, or daemon, to be monitored and automatically restarted if it
|
||||||
exits prematurely. Finit tries to restart services that die, by
|
exits prematurely. Finit tries to restart services that die, by default
|
||||||
default 10 times before giving up and marking them as *crashed*.
|
10 times before giving up and marking them as *crashed*. After which
|
||||||
After which they have to be manually restarted with `initctl restart
|
they have to be manually restarted with `initctl restart NAME`. The
|
||||||
NAME`. The limits controling this are configurable, see the options
|
limits controlling this are configurable, see the options below.
|
||||||
below.
|
|
||||||
|
|
||||||
> **Tip:** to allow endless restarts, see below option `respawn`
|
> **Tip:** to allow endless restarts, see below option `respawn`
|
||||||
|
|
||||||
@@ -1034,7 +1033,7 @@ before continuing. None of them can issue commands to start, stop, or
|
|||||||
restart other services. Also, ensure all your services and programs
|
restart other services. Also, ensure all your services and programs
|
||||||
either terminate or start in the background or you will block Finit.
|
either terminate or start in the background or you will block Finit.
|
||||||
|
|
||||||
> **Note:** `runparts` scrips are only read and executed in runlevel S.
|
> **Note:** `runparts` scripts are only read and executed in runlevel S.
|
||||||
> See [hook scripts](plugins.md#hooks) for other ways to run scripts at
|
> See [hook scripts](plugins.md#hooks) for other ways to run scripts at
|
||||||
> certain points during the complete lifetime of the system.
|
> certain points during the complete lifetime of the system.
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
*
|
*
|
||||||
* Please note, the :ID is there for your benefit, it ensures that tasks
|
* Please note, the :ID is there for your benefit, it ensures that tasks
|
||||||
* in Finit are unique. If you have two tasks with the same name and ID
|
* in Finit are unique. If you have two tasks with the same name and ID
|
||||||
* (or no ID), the last one read replaces any preceeding one!
|
* (or no ID), the last one read replaces any preceding one!
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|||||||
@@ -562,7 +562,7 @@ static void api_cb(uev_t *w, void *arg, int events)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (uev_io_init(ctx, &svc->notify_watcher, service_notify_cb, svc, sd, UEV_READ)) {
|
if (uev_io_init(ctx, &svc->notify_watcher, service_notify_cb, svc, sd, UEV_READ)) {
|
||||||
err(1, "Falied initializing %s readiness notifier", svc_ident(svc, NULL, 0));
|
err(1, "Failed initializing %s readiness notifier", svc_ident(svc, NULL, 0));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return; /* Don't close sd, used for notify */
|
return; /* Don't close sd, used for notify */
|
||||||
|
|||||||
+1
-1
@@ -476,7 +476,7 @@ void cgroup_init(uev_ctx_t *ctx)
|
|||||||
if (mount("none", FINIT_CGPATH, "cgroup2", opts, NULL)) {
|
if (mount("none", FINIT_CGPATH, "cgroup2", opts, NULL)) {
|
||||||
if (errno == ENOENT)
|
if (errno == ENOENT)
|
||||||
logit(LOG_INFO, "Kernel does not support cgroups v2, disabling.");
|
logit(LOG_INFO, "Kernel does not support cgroups v2, disabling.");
|
||||||
else if (errno == EPERM) /* Probably inside an unpriviliged container */
|
else if (errno == EPERM) /* Probably inside an unprivileged container */
|
||||||
logit(LOG_INFO, "Not allowed to mount cgroups v2, disabling.");
|
logit(LOG_INFO, "Not allowed to mount cgroups v2, disabling.");
|
||||||
else
|
else
|
||||||
err(1, "Failed mounting cgroup v2");
|
err(1, "Failed mounting cgroup v2");
|
||||||
|
|||||||
+1
-1
@@ -113,7 +113,7 @@ static void cond_boot_strap(void)
|
|||||||
*
|
*
|
||||||
* => 'pid/' + 'teamd' + '' = condition <pid/teamd>
|
* => 'pid/' + 'teamd' + '' = condition <pid/teamd>
|
||||||
*
|
*
|
||||||
* When you add a second aggrate you need to tell Finit it's a different
|
* When you add a second aggregate you need to tell Finit it's a different
|
||||||
* instance usugin the :ID syntax:
|
* instance usugin the :ID syntax:
|
||||||
*
|
*
|
||||||
* service :lag2 teamd -f /etc/teamd/lag2.conf -- Aggregate lag2
|
* service :lag2 teamd -f /etc/teamd/lag2.conf -- Aggregate lag2
|
||||||
|
|||||||
+1
-1
@@ -66,7 +66,7 @@ int prevlevel = -1;
|
|||||||
int debug = 0; /* debug mode from kernel cmdline */
|
int debug = 0; /* debug mode from kernel cmdline */
|
||||||
int rescue = 0; /* rescue mode from kernel cmdline */
|
int rescue = 0; /* rescue mode from kernel cmdline */
|
||||||
int single = 0; /* single user mode from kernel cmdline */
|
int single = 0; /* single user mode from kernel cmdline */
|
||||||
int bootstrap = 1; /* set while bootrapping (for TTYs) */
|
int bootstrap = 1; /* set while bootstrapping (for TTYs) */
|
||||||
int kerndebug = 0; /* set if /proc/sys/kernel/printk > 7 */
|
int kerndebug = 0; /* set if /proc/sys/kernel/printk > 7 */
|
||||||
int syncsec = 0; /* reboot delay */
|
int syncsec = 0; /* reboot delay */
|
||||||
int readiness = SVC_NOTIFY_PID;
|
int readiness = SVC_NOTIFY_PID;
|
||||||
|
|||||||
+1
-1
@@ -87,7 +87,7 @@ void console_init(void)
|
|||||||
/* Enable line wrap, if disabled previously, e.g., qemu */
|
/* Enable line wrap, if disabled previously, e.g., qemu */
|
||||||
dprint(STDOUT_FILENO, "\033[?7h", 5);
|
dprint(STDOUT_FILENO, "\033[?7h", 5);
|
||||||
|
|
||||||
/* Reset atttributes, background and foreground color */
|
/* Reset attributes, background and foreground color */
|
||||||
dprint(STDOUT_FILENO, "\033[49m\033[39m\e[2J", 14);
|
dprint(STDOUT_FILENO, "\033[49m\033[39m\e[2J", 14);
|
||||||
|
|
||||||
log_init();
|
log_init();
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ int pid_file_set(svc_t *svc, char *file, int not)
|
|||||||
* pid:foo.tla --> /run/foo.tla.pid
|
* pid:foo.tla --> /run/foo.tla.pid
|
||||||
* pid:/tmp/foo --> /tmp/foo.pid (Not handled by pidfile plugin!)
|
* pid:/tmp/foo --> /tmp/foo.pid (Not handled by pidfile plugin!)
|
||||||
*
|
*
|
||||||
* An exclamation mark, or logial NOT, in the first character position
|
* An exclamation mark, or logical NOT, in the first character position
|
||||||
* indicates that Finit should *not* manage the PID file, and that the
|
* indicates that Finit should *not* manage the PID file, and that the
|
||||||
* process uses a "non-standard" location. Eg. if service is 'bar'
|
* process uses a "non-standard" location. Eg. if service is 'bar'
|
||||||
* Finit would assume the PID file is /run/bar.pid and the below simply
|
* Finit would assume the PID file is /run/bar.pid and the below simply
|
||||||
|
|||||||
+2
-2
@@ -2214,7 +2214,7 @@ static void service_post_script(svc_t *svc)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Unlike the pre: and post: scripts, the ready: script cannot re-use
|
* Unlike the pre: and post: scripts, the ready: script cannot reuse
|
||||||
* svc->pid, so instead we use an assoc. list for matching any scripts
|
* svc->pid, so instead we use an assoc. list for matching any scripts
|
||||||
* related to the svc, handled by service_script_add() below. When a
|
* related to the svc, handled by service_script_add() below. When a
|
||||||
* ready: script is reaped the service_monitor() checks first for the
|
* ready: script is reaped the service_monitor() checks first for the
|
||||||
@@ -2940,7 +2940,7 @@ void service_notify_cb(uev_t *w, void *arg, int events)
|
|||||||
*
|
*
|
||||||
* This does not affect the restart_tot counter, which you can see in
|
* This does not affect the restart_tot counter, which you can see in
|
||||||
* the output from 'initctl status foo', along with this instability
|
* the output from 'initctl status foo', along with this instability
|
||||||
* "index" in parethesis: total (cnt/max)
|
* "index" in parenthesis: total (cnt/max)
|
||||||
*/
|
*/
|
||||||
static void service_interval_cb(uev_t *w, void *arg, int events)
|
static void service_interval_cb(uev_t *w, void *arg, int events)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -243,7 +243,7 @@ restart:
|
|||||||
/* Disable progress output at normal runtime */
|
/* Disable progress output at normal runtime */
|
||||||
enable_progress(0);
|
enable_progress(0);
|
||||||
|
|
||||||
/* System bootrapped, launch TTYs et al */
|
/* System bootstrapped, launch TTYs et al */
|
||||||
bootstrap = 0;
|
bootstrap = 0;
|
||||||
service_step_all(SVC_TYPE_RESPAWN);
|
service_step_all(SVC_TYPE_RESPAWN);
|
||||||
sm->state = SM_RUNNING_STATE;
|
sm->state = SM_RUNNING_STATE;
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ typedef struct svc {
|
|||||||
char cond[MAX_COND_LEN];
|
char cond[MAX_COND_LEN];
|
||||||
|
|
||||||
/* Instance specifics */
|
/* Instance specifics */
|
||||||
int job; /* For intenal use only, canonical ref is NAME:ID */
|
int job; /* For internal use only, canonical ref is NAME:ID */
|
||||||
char name[MAX_ARG_LEN];
|
char name[MAX_ARG_LEN];
|
||||||
char id[MAX_ID_LEN]; /* :ID */
|
char id[MAX_ID_LEN]; /* :ID */
|
||||||
char ifstmt[MAX_IDENT_LEN];
|
char ifstmt[MAX_IDENT_LEN];
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Verify handling of dependant services, bug #314
|
# Verify handling of dependent services, bug #314
|
||||||
# Two services: foo and bar, where bar depends on foo:
|
# Two services: foo and bar, where bar depends on foo:
|
||||||
#
|
#
|
||||||
# - bar must not start until foo is ready
|
# - bar must not start until foo is ready
|
||||||
|
|||||||
+1
-1
@@ -71,7 +71,7 @@ test_one()
|
|||||||
assert_status "serv" "running"
|
assert_status "serv" "running"
|
||||||
assert_cond "service/serv/ready"
|
assert_cond "service/serv/ready"
|
||||||
|
|
||||||
# Issue #343; pidfile.so inadvertedly marked systemd services as
|
# Issue #343; pidfile.so inadvertently marked systemd services as
|
||||||
# 'started' when they created their PID file. The serv test daemon
|
# 'started' when they created their PID file. The serv test daemon
|
||||||
# waits 3 sec between pidfile and notify to trigger this bug.
|
# waits 3 sec between pidfile and notify to trigger this bug.
|
||||||
if [ "$type" != "pid" ]; then
|
if [ "$type" != "pid" ]; then
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# Verifies that a run task can call initctl at bootstrap and runlevel 2,
|
# Verifies that a run task can call initctl at bootstrap and runlevel 2,
|
||||||
# without blocking, performing serveral tasks:
|
# without blocking, performing several tasks:
|
||||||
#
|
#
|
||||||
# 1. Query running services
|
# 1. Query running services
|
||||||
# 2. Stop/Start a running service
|
# 2. Stop/Start a running service
|
||||||
|
|||||||
Reference in new issue
Block a user