conf: Add hostname alias to host

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2017-12-30 21:20:06 +01:00
1 parent c605874b26
commit bc149d95fc
2 files changed
+5 -1

No files matched your search

+4
View File
@@ -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
View File
@@ -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;