mirror of
https://github.com/troglobit/finit.git
synced 2026-10-19 11:09:35 +00:00
Fix #186: allow continuation character in .conf files
This change makes it possible to use the standard continuation character
in .conf files. For example:
service [23456] \
log:stderr \
<!pid/foo> \
bar \
-- This is the bar service, it depends on foo # comment that's dropped
Notice the additional support for comments on .conf lines. If you use
the comment character today you must change to escape it. Like this:
service :2 foo -- Foo \#2
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
f217794773
commit
9046b6fe2b
7 files changed
+85
-30
No files matched your search
+21
-2
@@ -1,5 +1,5 @@
|
||||
Configuration
|
||||
=============
|
||||
Finit Configuration
|
||||
===================
|
||||
|
||||
* [Introduction](#introduction)
|
||||
* [Environment Variables](#environment-variables)
|
||||
@@ -297,6 +297,25 @@ Linux kernel, or the name is misspelled.
|
||||
Configuration File Syntax
|
||||
-------------------------
|
||||
|
||||
The file format is line based, empty lines and comments, lines starting
|
||||
with `#`, are ignored. A configuration directive starts with a keyword
|
||||
followed by a space and the rest of the line is treated as the value.
|
||||
|
||||
As of Finit v4.4, configuration directives can be broken up in multiple
|
||||
lines using the continuation character `\`, and trailing comments are
|
||||
also allowed. Example:
|
||||
|
||||
```aconf
|
||||
# Escape \# chars if you want them literal in, e.g., descriptions
|
||||
service name:sysklogd [S123456789] \
|
||||
env:-/etc/default/sysklogd \
|
||||
syslogd -F $SYSLOGD_ARGS \
|
||||
-- System log daemon \# 1 # Comments allowed now
|
||||
```
|
||||
|
||||
The .conf files `/etc/finit.conf` and `/etc/finit.d/*` support the
|
||||
following directives:
|
||||
|
||||
### Hostname
|
||||
|
||||
**Syntax:** `host <NAME>`, or `hostname <NAME>`
|
||||
|
||||
Reference in new issue
Block a user