SHA256
1
0
forked from pool/systemd
systemd/0003-strip-the-domain-part-from-etc-hostname-when-setting.patch

40 lines
1.5 KiB
Diff
Raw Normal View History

Accepting request 902866 from Base:System - Import commit e9a23d9e064c2e7ac21a1b984d116bcf15327e63 8dd19c6ee3 sd-device: allow to read sysattr which contains embedded NUL d52409e5fe pid1: only add a Wants= type dependency on /tmp when PrivateTmp=yes (bsc#1181970 - Import commit fcdb8dce591db2f5fc3c1e3eeb7abe9a2090b401 aa2d840a3b compat-rules: fix warning: "label ‘out’ defined but not used" in path_id_compat.c - Restore 61-persistent-storage-compat.rules that was mistakenly dropped during the merge of v248. - Create /run/lock/subsys again (bsc#1187292) The creation of this directory was mistakenly dropped when 'filesystem' package took the initialization of the generic paths over. Paths under /run/lock are still managed by systemd for lack of better place. - Drop systemd's dependency on udev (jsc#PM-2677) In some environments (i.e. containers) udev is usually not necessary but pulls in unnecessary packages. - Now that chkconfig/insserv are history, let's implement the strict minimum in systemd-sysv-install to enable/disable SysV init scripts (bsc#1186595 bsc#1186359) Indeed there's no much point in dropping SysV support completely until upstream will do especially since 3rd party applications such as vmware still rely on it, see bsc#1186359). - Allow the sysusers config files shipped by systemd rpms to be overriden during system installation (bsc#1171962) - While at it, add a comment to explain why we don't use OBS-URL: https://build.opensuse.org/request/show/902866 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=330
2021-07-01 07:05:27 +02:00
From 54366ae306ae19bdb2a5af7eb5158260cdc37e8f Mon Sep 17 00:00:00 2001
From: Frederic Crozat <fcrozat@suse.com>
Date: Tue, 28 May 2013 15:17:35 +0200
Accepting request 902866 from Base:System - Import commit e9a23d9e064c2e7ac21a1b984d116bcf15327e63 8dd19c6ee3 sd-device: allow to read sysattr which contains embedded NUL d52409e5fe pid1: only add a Wants= type dependency on /tmp when PrivateTmp=yes (bsc#1181970 - Import commit fcdb8dce591db2f5fc3c1e3eeb7abe9a2090b401 aa2d840a3b compat-rules: fix warning: "label ‘out’ defined but not used" in path_id_compat.c - Restore 61-persistent-storage-compat.rules that was mistakenly dropped during the merge of v248. - Create /run/lock/subsys again (bsc#1187292) The creation of this directory was mistakenly dropped when 'filesystem' package took the initialization of the generic paths over. Paths under /run/lock are still managed by systemd for lack of better place. - Drop systemd's dependency on udev (jsc#PM-2677) In some environments (i.e. containers) udev is usually not necessary but pulls in unnecessary packages. - Now that chkconfig/insserv are history, let's implement the strict minimum in systemd-sysv-install to enable/disable SysV init scripts (bsc#1186595 bsc#1186359) Indeed there's no much point in dropping SysV support completely until upstream will do especially since 3rd party applications such as vmware still rely on it, see bsc#1186359). - Allow the sysusers config files shipped by systemd rpms to be overriden during system installation (bsc#1171962) - While at it, add a comment to explain why we don't use OBS-URL: https://build.opensuse.org/request/show/902866 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=330
2021-07-01 07:05:27 +02:00
Subject: [PATCH 1/1] strip the domain part from /etc/hostname when setting
system host name
[fbui: fixes bnc#820213]
[fbui: forwardported from bfd2462b8ddec591d953841ab22bb30bdc6f9085]
[fbui: adjust context and make sure that strip of the domain name is
only done when setting the system host name. Therefore it's
still possible to pass an FQDN to hostnamectl]
[fbui: I'm still not sure that it was the right thing to do. Other
possibility was to fix the installer to create a correct
/etc/hostname file. Need to investigate...]
---
Accepting request 902866 from Base:System - Import commit e9a23d9e064c2e7ac21a1b984d116bcf15327e63 8dd19c6ee3 sd-device: allow to read sysattr which contains embedded NUL d52409e5fe pid1: only add a Wants= type dependency on /tmp when PrivateTmp=yes (bsc#1181970 - Import commit fcdb8dce591db2f5fc3c1e3eeb7abe9a2090b401 aa2d840a3b compat-rules: fix warning: "label ‘out’ defined but not used" in path_id_compat.c - Restore 61-persistent-storage-compat.rules that was mistakenly dropped during the merge of v248. - Create /run/lock/subsys again (bsc#1187292) The creation of this directory was mistakenly dropped when 'filesystem' package took the initialization of the generic paths over. Paths under /run/lock are still managed by systemd for lack of better place. - Drop systemd's dependency on udev (jsc#PM-2677) In some environments (i.e. containers) udev is usually not necessary but pulls in unnecessary packages. - Now that chkconfig/insserv are history, let's implement the strict minimum in systemd-sysv-install to enable/disable SysV init scripts (bsc#1186595 bsc#1186359) Indeed there's no much point in dropping SysV support completely until upstream will do especially since 3rd party applications such as vmware still rely on it, see bsc#1186359). - Allow the sysusers config files shipped by systemd rpms to be overriden during system installation (bsc#1171962) - While at it, add a comment to explain why we don't use OBS-URL: https://build.opensuse.org/request/show/902866 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=330
2021-07-01 07:05:27 +02:00
src/shared/hostname-setup.c | 7 +++++++
1 file changed, 7 insertions(+)
Accepting request 902866 from Base:System - Import commit e9a23d9e064c2e7ac21a1b984d116bcf15327e63 8dd19c6ee3 sd-device: allow to read sysattr which contains embedded NUL d52409e5fe pid1: only add a Wants= type dependency on /tmp when PrivateTmp=yes (bsc#1181970 - Import commit fcdb8dce591db2f5fc3c1e3eeb7abe9a2090b401 aa2d840a3b compat-rules: fix warning: "label ‘out’ defined but not used" in path_id_compat.c - Restore 61-persistent-storage-compat.rules that was mistakenly dropped during the merge of v248. - Create /run/lock/subsys again (bsc#1187292) The creation of this directory was mistakenly dropped when 'filesystem' package took the initialization of the generic paths over. Paths under /run/lock are still managed by systemd for lack of better place. - Drop systemd's dependency on udev (jsc#PM-2677) In some environments (i.e. containers) udev is usually not necessary but pulls in unnecessary packages. - Now that chkconfig/insserv are history, let's implement the strict minimum in systemd-sysv-install to enable/disable SysV init scripts (bsc#1186595 bsc#1186359) Indeed there's no much point in dropping SysV support completely until upstream will do especially since 3rd party applications such as vmware still rely on it, see bsc#1186359). - Allow the sysusers config files shipped by systemd rpms to be overriden during system installation (bsc#1171962) - While at it, add a comment to explain why we don't use OBS-URL: https://build.opensuse.org/request/show/902866 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=330
2021-07-01 07:05:27 +02:00
diff --git a/src/shared/hostname-setup.c b/src/shared/hostname-setup.c
index 511aa7d031..351d0e761d 100644
--- a/src/shared/hostname-setup.c
+++ b/src/shared/hostname-setup.c
@@ -189,6 +189,13 @@ int hostname_setup(bool really) {
else
log_warning_errno(r, "Failed to read configured hostname: %m");
Accepting request 902866 from Base:System - Import commit e9a23d9e064c2e7ac21a1b984d116bcf15327e63 8dd19c6ee3 sd-device: allow to read sysattr which contains embedded NUL d52409e5fe pid1: only add a Wants= type dependency on /tmp when PrivateTmp=yes (bsc#1181970 - Import commit fcdb8dce591db2f5fc3c1e3eeb7abe9a2090b401 aa2d840a3b compat-rules: fix warning: "label ‘out’ defined but not used" in path_id_compat.c - Restore 61-persistent-storage-compat.rules that was mistakenly dropped during the merge of v248. - Create /run/lock/subsys again (bsc#1187292) The creation of this directory was mistakenly dropped when 'filesystem' package took the initialization of the generic paths over. Paths under /run/lock are still managed by systemd for lack of better place. - Drop systemd's dependency on udev (jsc#PM-2677) In some environments (i.e. containers) udev is usually not necessary but pulls in unnecessary packages. - Now that chkconfig/insserv are history, let's implement the strict minimum in systemd-sysv-install to enable/disable SysV init scripts (bsc#1186595 bsc#1186359) Indeed there's no much point in dropping SysV support completely until upstream will do especially since 3rd party applications such as vmware still rely on it, see bsc#1186359). - Allow the sysusers config files shipped by systemd rpms to be overriden during system installation (bsc#1171962) - While at it, add a comment to explain why we don't use OBS-URL: https://build.opensuse.org/request/show/902866 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=330
2021-07-01 07:05:27 +02:00
} else {
+ char *domain;
+
+ /* SUSE: strip the domain name */
+ domain = strchr(b, '.');
+ if (domain)
+ *domain = '\0';
+
hn = b;
Accepting request 902866 from Base:System - Import commit e9a23d9e064c2e7ac21a1b984d116bcf15327e63 8dd19c6ee3 sd-device: allow to read sysattr which contains embedded NUL d52409e5fe pid1: only add a Wants= type dependency on /tmp when PrivateTmp=yes (bsc#1181970 - Import commit fcdb8dce591db2f5fc3c1e3eeb7abe9a2090b401 aa2d840a3b compat-rules: fix warning: "label ‘out’ defined but not used" in path_id_compat.c - Restore 61-persistent-storage-compat.rules that was mistakenly dropped during the merge of v248. - Create /run/lock/subsys again (bsc#1187292) The creation of this directory was mistakenly dropped when 'filesystem' package took the initialization of the generic paths over. Paths under /run/lock are still managed by systemd for lack of better place. - Drop systemd's dependency on udev (jsc#PM-2677) In some environments (i.e. containers) udev is usually not necessary but pulls in unnecessary packages. - Now that chkconfig/insserv are history, let's implement the strict minimum in systemd-sysv-install to enable/disable SysV init scripts (bsc#1186595 bsc#1186359) Indeed there's no much point in dropping SysV support completely until upstream will do especially since 3rd party applications such as vmware still rely on it, see bsc#1186359). - Allow the sysusers config files shipped by systemd rpms to be overriden during system installation (bsc#1171962) - While at it, add a comment to explain why we don't use OBS-URL: https://build.opensuse.org/request/show/902866 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=330
2021-07-01 07:05:27 +02:00
source = HOSTNAME_STATIC;
}
--
2.26.2