Ludwig Nussel
10c7016cb7
- Do no ship defaults for sysctl, they should be part of aaa_base (currently in procps). - Add hostname-setup-shortname.patch: ensure shortname is set as hostname (bnc#820213). OBS-URL: https://build.opensuse.org/request/show/176648 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=385
26 lines
679 B
Diff
26 lines
679 B
Diff
Index: systemd-202/src/core/hostname-setup.c
|
|
===================================================================
|
|
--- systemd-202.orig/src/core/hostname-setup.c
|
|
+++ systemd-202/src/core/hostname-setup.c
|
|
@@ -32,7 +32,7 @@
|
|
#include "fileio.h"
|
|
|
|
static int read_and_strip_hostname(const char *path, char **hn) {
|
|
- char *s;
|
|
+ char *s, *domain;
|
|
int r;
|
|
|
|
assert(path);
|
|
@@ -49,6 +49,11 @@ static int read_and_strip_hostname(const
|
|
return -ENOENT;
|
|
}
|
|
|
|
+ /* strip any leftover of a domain name */
|
|
+ if (domain = strchr(s, '.')) {
|
|
+ *domain = NULL;
|
|
+ }
|
|
+
|
|
*hn = s;
|
|
return 0;
|
|
}
|