c5432960d9
Update to the head of the upstream staging branch * Previous patches 0001-0042 are included in the source tarball * Patches 0001-0032 are from the upstream staging branch Rename redhat patches * Previous patches 0043-0053 are now patches 0033-0043 Change back to using readline instead of libedit * The code the uses readline has been isolated from the code that is licensed gpl v2 only. Add libmpathutil libraries to spec file Add multipathc program to spec file Add multipath.conf systemd tempfile configuration to spec file Misc spec file cleanups
37 lines
1.3 KiB
Diff
37 lines
1.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Martin Wilck <mwilck@suse.com>
|
|
Date: Thu, 27 Oct 2022 16:34:34 +0200
|
|
Subject: [PATCH] multipath-tools: Makefile.inc: simplify expression for
|
|
SYSTEMD
|
|
|
|
Use a shell "or" function here. Note the use of "strip" to remove
|
|
the whitespace that are caused by the line break.
|
|
|
|
Signed-off-by: Martin Wilck <mwilck@suse.com>
|
|
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
---
|
|
Makefile.inc | 10 ++--------
|
|
1 file changed, 2 insertions(+), 8 deletions(-)
|
|
|
|
diff --git a/Makefile.inc b/Makefile.inc
|
|
index f3c84771..1a08b8fa 100644
|
|
--- a/Makefile.inc
|
|
+++ b/Makefile.inc
|
|
@@ -28,14 +28,8 @@ ifeq ($(TOPDIR),)
|
|
TOPDIR = ..
|
|
endif
|
|
|
|
-ifeq ($(shell $(PKGCONFIG) --modversion libsystemd >/dev/null 2>&1 && echo 1), 1)
|
|
- SYSTEMD = $(shell $(PKGCONFIG) --modversion libsystemd | awk '{print $$1}')
|
|
-else
|
|
- ifeq ($(shell systemctl --version >/dev/null 2>&1 && echo 1), 1)
|
|
- SYSTEMD = $(shell systemctl --version 2> /dev/null | \
|
|
- sed -n 's/systemd \([0-9]*\).*/\1/p')
|
|
- endif
|
|
-endif
|
|
+SYSTEMD := $(strip $(or $(shell $(PKGCONFIG) --modversion libsystemd 2>/dev/null | awk '{print $$1}'), \
|
|
+ $(shell systemctl --version 2>/dev/null | sed -n 's/systemd \([0-9]*\).*/\1/p')))
|
|
|
|
# Allow user to override default location.
|
|
|