mirror of
https://github.com/troglobit/finit.git
synced 2026-11-02 13:20:32 +00:00
conf: Add hostname alias to host
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
c605874b26
commit
bc149d95fc
2 files changed
+5
-1
No files matched your search
@@ -84,6 +84,10 @@ restart/reload.*
|
|||||||
Syntax
|
Syntax
|
||||||
------
|
------
|
||||||
|
|
||||||
|
* `host <NAME>`, or `hostname <NAME>`
|
||||||
|
Set system hostname to NAME, unless `/etc/hostname` exists in which
|
||||||
|
case the contents of that file is used.
|
||||||
|
|
||||||
* `module <MODULE> [ARGS]`
|
* `module <MODULE> [ARGS]`
|
||||||
Load a kernel module, with optional arguments
|
Load a kernel module, with optional arguments
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -333,7 +333,7 @@ static void parse_static(char *line)
|
|||||||
char *x;
|
char *x;
|
||||||
char cmd[CMD_SIZE];
|
char cmd[CMD_SIZE];
|
||||||
|
|
||||||
if (BOOTSTRAP && MATCH_CMD(line, "host ", x)) {
|
if (BOOTSTRAP && (MATCH_CMD(line, "host ", x) || MATCH_CMD(line, "hostname ", x))) {
|
||||||
if (hostname) free(hostname);
|
if (hostname) free(hostname);
|
||||||
hostname = strdup(strip_line(x));
|
hostname = strdup(strip_line(x));
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in new issue
Block a user