integ/base/systemd/centos/meta_patches/Protect-sections-of-systemd-post-from-running-on-pat.patch
Shuicheng Lin 46ce43a77d refactor systemd
Story: 2003768
Task: 27594

Package systemd-config is added to config customized config file
of systemd.
Several patches are converted to config files. These config files
are based on systemd-219-57.el7.src.rpm.
BuildRequires in system-config is set to equal "219-57.el7", to
avoid system-config is missed check when do upgrade. So when do
systemd upgrade, system-config need be upgraded also.

"0003-spec-expand-_udevrulesdir-macro.patch" is removed which
seems not needed.

Test:
Pass build and multi node deploy test. Confirmed related config
file is the same as before.

Change-Id: I879dc276f3280911d844cfa605c56ba03caabdad
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
2018-11-21 22:29:21 +08:00

50 lines
1.6 KiB
Diff

From e54be64fa16349c94826b17a4dc206a7513f0d9c Mon Sep 17 00:00:00 2001
From: Scott Little <scott.little@windriver.com>
Date: Mon, 2 Oct 2017 17:53:00 -0400
Subject: [PATCH] [PATCH 03/10] WRS:
0004-Protect-sections-of-systemd-post-from-running-on-pat.patch
---
SPECS/systemd.spec | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/SPECS/systemd.spec b/SPECS/systemd.spec
index 6e1d7e1..6a04c16 100644
--- a/SPECS/systemd.spec
+++ b/SPECS/systemd.spec
@@ -1159,6 +1159,7 @@ fi
rm -f /etc/sysconfig/i18n >/dev/null 2>&1 || :
rm -f /etc/sysconfig/keyboard >/dev/null 2>&1 || :
+if [ $1 -eq 1 ]; then
# Migrate HOSTNAME= from /etc/sysconfig/network
if [ -e /etc/sysconfig/network -a ! -e /etc/hostname ]; then
unset HOSTNAME
@@ -1166,6 +1167,7 @@ if [ -e /etc/sysconfig/network -a ! -e /etc/hostname ]; then
[ -n "$HOSTNAME" ] && echo $HOSTNAME > /etc/hostname 2>&1 || :
fi
sed -i '/^HOSTNAME=/d' /etc/sysconfig/network >/dev/null 2>&1 || :
+fi
# Migrate the old systemd-setup-keyboard X11 configuration fragment
if [ ! -e /etc/X11/xorg.conf.d/00-keyboard.conf ] ; then
@@ -1174,6 +1176,7 @@ else
rm -f /etc/X11/xorg.conf.d/00-system-setup-keyboard.conf >/dev/null 2>&1 || :
fi
+if [ 1 -eq 0 ] ; then # TIS: Skip this. We don't want myhostname in nsswitch.conf
# sed-fu to add myhostname to the hosts line of /etc/nsswitch.conf
# Only do that when installing, not when updating.
if [ $1 -eq 1 -a -f /etc/nsswitch.conf ] ; then
@@ -1183,6 +1186,7 @@ if [ $1 -eq 1 -a -f /etc/nsswitch.conf ] ; then
s/[[:blank:]]*$/ myhostname/
' /etc/nsswitch.conf >/dev/null 2>&1 || :
fi
+fi
%posttrans
# Convert old /etc/sysconfig/desktop settings
--
2.7.4