]>
Commit | Line | Data |
---|---|---|
289c5516 MT |
1 | --- |
2 | multipath/mpathconf | 21 +++++++++++++++------ | |
3 | 1 file changed, 15 insertions(+), 6 deletions(-) | |
4 | ||
5 | Index: multipath-tools-130222/multipath/mpathconf | |
6 | =================================================================== | |
7 | --- multipath-tools-130222.orig/multipath/mpathconf | |
8 | +++ multipath-tools-130222/multipath/mpathconf | |
9 | @@ -159,7 +159,7 @@ if [ -z "$MODULE" -o "$MODULE" = "y" ]; | |
10 | fi | |
11 | ||
12 | if [ "$MULTIPATHD" = "y" ]; then | |
13 | - if service multipathd status > /dev/null ; then | |
14 | + if /bin/systemctl status multipathd.service > /dev/null 2>&1 ; then | |
15 | HAVE_MULTIPATHD=1 | |
16 | else | |
17 | HAVE_MULTIPATHD=0 | |
18 | @@ -210,8 +210,17 @@ if [ -n "$SHOW_STATUS" ]; then | |
19 | echo "dm_multipath module is not loaded" | |
20 | fi | |
21 | fi | |
22 | - if [ -n "$HAVE_MULTIPATHD" ]; then | |
23 | - service multipathd status | |
24 | + if [ -z "$HAVE_MULTIPATHD" ]; then | |
25 | + if /bin/systemctl status multipathd.service > /dev/null 2>&1 ; then | |
26 | + HAVE_MULTIPATHD=1 | |
27 | + else | |
28 | + HAVE_MULTIPATHD=0 | |
29 | + fi | |
30 | + fi | |
31 | + if [ "$HAVE_MULTIPATHD" = 1 ]; then | |
32 | + echo "multipathd is running" | |
33 | + else | |
34 | + echo "multipathd is not running" | |
35 | fi | |
36 | exit 0 | |
37 | fi | |
38 | @@ -301,12 +310,12 @@ if [ "$ENABLE" = 1 ]; then | |
39 | modprobe dm_multipath | |
40 | fi | |
41 | if [ "$HAVE_MULTIPATHD" = 0 ]; then | |
42 | - service multipathd start | |
43 | + systemctl start multipathd.service | |
44 | fi | |
45 | elif [ "$ENABLE" = 0 ]; then | |
46 | if [ "$HAVE_MULTIPATHD" = 1 ]; then | |
47 | - service multipathd stop | |
48 | + systemctl stop multipathd.service | |
49 | fi | |
50 | elif [ -n "$CHANGED_CONFIG" -a "$HAVE_MULTIPATHD" = 1 ]; then | |
51 | - service multipathd reload | |
52 | + systemctl reload multipathd.service | |
53 | fi |