Blame SOURCES/0034-RHBZ-851416-mpathconf-display.patch

4ae388
---
4ae388
 multipath/mpathconf |   21 +++++++++++++++------
4ae388
 1 file changed, 15 insertions(+), 6 deletions(-)
4ae388
4ae388
Index: multipath-tools-130222/multipath/mpathconf
4ae388
===================================================================
4ae388
--- multipath-tools-130222.orig/multipath/mpathconf
4ae388
+++ multipath-tools-130222/multipath/mpathconf
4ae388
@@ -159,7 +159,7 @@ if [ -z "$MODULE" -o "$MODULE" = "y" ];
4ae388
 fi
4ae388
 
4ae388
 if [ "$MULTIPATHD" = "y" ]; then
4ae388
-	if service multipathd status > /dev/null ; then
4ae388
+	if /bin/systemctl status multipathd.service > /dev/null 2>&1 ; then
4ae388
 		HAVE_MULTIPATHD=1
4ae388
 	else
4ae388
 		HAVE_MULTIPATHD=0
4ae388
@@ -210,8 +210,17 @@ if [ -n "$SHOW_STATUS" ]; then
4ae388
 			echo "dm_multipath module is not loaded"
4ae388
 		fi
4ae388
 	fi
4ae388
-	if [ -n "$HAVE_MULTIPATHD" ]; then
4ae388
-		service multipathd status
4ae388
+	if [ -z "$HAVE_MULTIPATHD" ]; then
4ae388
+		if /bin/systemctl status multipathd.service > /dev/null 2>&1 ; then
4ae388
+			HAVE_MULTIPATHD=1
4ae388
+		else
4ae388
+			HAVE_MULTIPATHD=0
4ae388
+		fi
4ae388
+	fi
4ae388
+	if [ "$HAVE_MULTIPATHD" = 1 ]; then
4ae388
+		echo "multipathd is running"
4ae388
+	else
4ae388
+		echo "multipathd is not running"
4ae388
 	fi
4ae388
 	exit 0
4ae388
 fi
4ae388
@@ -301,12 +310,12 @@ if [ "$ENABLE" = 1 ]; then
4ae388
 		modprobe dm_multipath
4ae388
 	fi
4ae388
 	if [ "$HAVE_MULTIPATHD" = 0 ]; then
4ae388
-		service multipathd start
4ae388
+		systemctl start multipathd.service
4ae388
 	fi
4ae388
 elif [ "$ENABLE" = 0 ]; then
4ae388
 	if [ "$HAVE_MULTIPATHD" = 1 ]; then
4ae388
-		service multipathd stop
4ae388
+		systemctl stop multipathd.service
4ae388
 	fi
4ae388
 elif [ -n "$CHANGED_CONFIG" -a "$HAVE_MULTIPATHD" = 1 ]; then
4ae388
-	service multipathd reload
4ae388
+	systemctl reload multipathd.service
4ae388
 fi