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