forked from pool/systemd
Frederic Crozat
37527bb454
- version 206 , highlights: * Unit files now understand the new %v specifier which resolves to the kernel version string as returned by "uname-r". * "journalctl -b" may now be used to look for boot output of a specific boot. Try "journalctl -b -1" * Creation of "dead" device nodes has been moved from udev into kmod and tmpfiles. * The udev "keymap" data files and tools to apply keyboard specific mappings of scan to key codes, and force-release scan code lists have been entirely replaced by a udev "keyboard" builtin and a hwdb data file. - remove patches now in upstream - systemd now requires libkmod >=14 and cryptsetup >= 1.6.0 - systemd now require the kmod tool in addition to the library. - version 206 , highlights: * Unit files now understand the new %v specifier which resolves to the kernel version string as returned by "uname-r". * "journalctl -b" may now be used to look for boot output of a specific boot. Try "journalctl -b -1" * Creation of "dead" device nodes has been moved from udev into kmod and tmpfiles. * The udev "keymap" data files and tools to apply keyboard specific mappings of scan to key codes, and force-release scan code lists have been entirely replaced by a udev "keyboard" builtin and a hwdb data file. - remove patches now in upstream - systemd now requires libkmod >=14 and cryptsetup >= 1.6.0 - systemd now require the kmod tool in addition to the library. (forwarded request 184035 from elvigia) OBS-URL: https://build.opensuse.org/request/show/184036 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=416
33 lines
864 B
Diff
33 lines
864 B
Diff
From: Frederic Crozat <fcrozat@suse.com>
|
|
Date: Tue, 28 May 2013 15:17:35 +0200
|
|
Subject: ensure shortname is set as hostname (bnc#820213)
|
|
|
|
strip hostname so the domain part isn't set as part of the hostname
|
|
---
|
|
src/core/hostname-setup.c | 7 ++++++-
|
|
1 file changed, 6 insertions(+), 1 deletion(-)
|
|
|
|
--- systemd-206.orig/src/core/hostname-setup.c
|
|
+++ systemd-206/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;
|
|
}
|