mirror of
https://github.com/troglobit/finit.git
synced 2026-10-19 11:09:35 +00:00
Fix #235: support for overriding /etc/finit.conf and /etc/finit.d
This change adds support for a new command line option finit.config=PATH
which can be used to tell Finit to start with /etc/factory.conf instead
of /etc/finit.conf.
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
as follows to override /etc/finit.d:
rcsd /etc/factory.d
Manually verified in myLinux
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
f6b5b0260b
commit
2f91ab5eac
11 files changed
+212
-48
No files matched your search
@@ -23,6 +23,16 @@ The `bool` setting is one of `on, off, true false, 1, 0`.
|
||||
|
||||
> Note: `<boot/...>` conditions cannot be cleared with `initctl`!
|
||||
|
||||
* `finit.config=/path/to/alternative/finit.conf`: override the
|
||||
compile-time bootstrap config file, default:
|
||||
|
||||
./configure --with-config=/etc/finit.conf
|
||||
|
||||
Useful when starting up in various rescue mode, factory, or
|
||||
production test setups. Use the top-level configuration file
|
||||
directive `rcsd /path/to/finit.d` to override the default
|
||||
rcS.d directory.
|
||||
|
||||
* `finit.debug[=bool]`: Enable finit debug. This is operated
|
||||
independently of the kernel `debug` setting. New as of Finit v4.
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ Configuration
|
||||
* [Hostname](#hostname)
|
||||
* [Kernel Modules](#kernel-modules)
|
||||
* [Networking](#networking)
|
||||
* [Alternate rcS.d/](#alternate-rcs-d-)
|
||||
* [Resource Limits](#resource-limits)
|
||||
* [Runlevels](#runlevels)
|
||||
* [One-shot Commands (sequence)](#one-shot-commands--sequence-)
|
||||
@@ -40,6 +41,13 @@ Linux distributions -- each package can provide its own "script" file.
|
||||
- `/etc/finit.conf`: main configuration file
|
||||
- `/etc/finit.d/*.conf`: snippets, usually one service per file
|
||||
|
||||
> **Note:** the above .conf file name and rcS.d directory name are the
|
||||
> defaults. They can be changed at compile-time with two `configure`
|
||||
> options: `--with-config=FOO` and `--with-rcsd=BAR`.
|
||||
>
|
||||
> They can also be overridden from the command line `finit.config=BAZ`
|
||||
> and the top-level configuration directive `rcsd /path/to/finit.d`.
|
||||
|
||||
Not all configuration directives are available in `/etc/finit.d/*.conf`
|
||||
and some directives are only available at [bootstrap][], runlevel `S`,
|
||||
see the section [Limitations](#limitations) below for details.
|
||||
@@ -332,6 +340,27 @@ Debian, Ubuntu, Linux Mint, or an embedded BusyBox system.
|
||||
> **Note:** only read and executed in runlevel S ([bootstrap][]).
|
||||
|
||||
|
||||
### Alternate finit.d/
|
||||
|
||||
**Syntax:** `rcsd /path/to/finit.d`
|
||||
|
||||
The Finit rcS.d directory is set at compile time with:
|
||||
|
||||
./configure --with-rcsd=/etc/finit.d
|
||||
|
||||
A system with multiple use-cases may be bootstrapped with different
|
||||
configurations, starting with the kernel command line option:
|
||||
|
||||
-- finit.config=/etc/factory.conf
|
||||
|
||||
This file in turn can use the `rcsd` directive to tell Finit to use
|
||||
another set of .conf files, e.g.:
|
||||
|
||||
rcsd /etc/factory.d
|
||||
|
||||
> **Note:** this directive is only available from the top-level
|
||||
> bootstrap .conf file.
|
||||
|
||||
### Resource Limits
|
||||
|
||||
**Syntax:** `rlimit [hard|soft] RESOURCE <LIMIT|unlimited>`
|
||||
|
||||
Reference in new issue
Block a user