a6c42807cc
- Update to release 202: + 'systemctl list-jobs' got some polishing. '--type=' argument may now be passed more than once. 'systemctl list-sockets' has been added. + systemd gained a new unit 'systemd-static-nodes.service' that generates static device nodes earlier during boot, and can run in conjunction with udev. + systemd-nspawn now places all containers in the new /machine top-level cgroup directory in the name=systemd hierarchy. + bootchart can now store its data in the journal. + journactl can now take multiple --unit= and --user-unit= switches. + The cryptsetup logic now understands the "luks.key=" kernel command line switch. If a configured key file is missing, it will fallback to prompting the user. - Rebase some patches - Update handle-SYSTEMCTL_OPTIONS-environment-variable.patch to properly handle SYSTEMCTL_OPTIONS - Fix regression in the default for tmp auto-deletion (systemd-tmp-safe-defaults.patch, FATE#314974). - Add chromebook lid switch as a power switch to logind rule to enable suspend on lid close - Update to release 202: + 'systemctl list-jobs' got some polishing. '--type=' argument may now be passed more than once. 'systemctl list-sockets' has been added. + systemd gained a new unit 'systemd-static-nodes.service' OBS-URL: https://build.opensuse.org/request/show/172582 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=365
47 lines
1.3 KiB
Diff
47 lines
1.3 KiB
Diff
From: Frederic Crozat <fcrozat@suse.com>
|
|
Date: Fri, 15 Feb 2013 16:04:39 +0000
|
|
Subject: handle /etc/HOSTNAME
|
|
|
|
(bnc#803653)
|
|
---
|
|
src/hostname/hostnamed.c | 12 +++++++++++-
|
|
1 file changed, 11 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c
|
|
index c7f454c..cfbd706 100644
|
|
--- a/src/hostname/hostnamed.c
|
|
+++ b/src/hostname/hostnamed.c
|
|
@@ -129,6 +129,10 @@ static int read_data(void) {
|
|
if (r < 0 && r != -ENOENT)
|
|
return r;
|
|
|
|
+ r = read_one_line_file("/etc/HOSTNAME", &data[PROP_STATIC_HOSTNAME]);
|
|
+ if (r < 0 && r != -ENOENT)
|
|
+ return r;
|
|
+
|
|
return 0;
|
|
}
|
|
|
|
@@ -283,6 +287,7 @@ static int write_data_hostname(void) {
|
|
|
|
static int write_data_static_hostname(void) {
|
|
|
|
+ int r;
|
|
if (isempty(data[PROP_STATIC_HOSTNAME])) {
|
|
|
|
if (unlink("/etc/hostname") < 0)
|
|
@@ -290,7 +295,12 @@ static int write_data_static_hostname(void) {
|
|
|
|
return 0;
|
|
}
|
|
- return write_string_file_atomic_label("/etc/hostname", data[PROP_STATIC_HOSTNAME]);
|
|
+
|
|
+ r = write_string_file_atomic_label("/etc/hostname", data[PROP_STATIC_HOSTNAME]);
|
|
+ if (!r) {
|
|
+ r = symlink_atomic("/etc/hostname", "/etc/HOSTNAME");
|
|
+ }
|
|
+ return r;
|
|
}
|
|
|
|
static int write_data_other(void) {
|