diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh index 681006d80..b6002c6a3 100755 --- a/modules.d/90multipath/module-setup.sh +++ b/modules.d/90multipath/module-setup.sh @@ -74,14 +74,18 @@ install() { fi } - inst_multiple -o \ - dmsetup \ + inst_multiple \ + pkill \ + pidof \ kpartx \ + dmsetup \ + multipath \ + multipathd + + inst_multiple -o \ mpath_wait \ mpathconf \ mpathpersist \ - multipath \ - multipathd \ xdrgetprio \ xdrgetuid \ /etc/xdrdevices.conf \ diff --git a/modules.d/90multipath/multipathd-stop.sh b/modules.d/90multipath/multipathd-stop.sh index cf9b782e9..cc5aece57 100755 --- a/modules.d/90multipath/multipathd-stop.sh +++ b/modules.d/90multipath/multipathd-stop.sh @@ -1,11 +1,13 @@ #!/bin/sh if [ -e /etc/multipath.conf ]; then - HARD="" - while pidof multipathd > /dev/null 2>&1; do - for pid in $(pidof multipathd); do - kill "$HARD" "$pid" > /dev/null 2>&1 - done - HARD="-9" - done + pkill multipathd > /dev/null 2>&1 + + if pidof multipathd > /dev/null 2>&1; then + sleep 0.2 + fi + + if pidof multipathd > /dev/null 2>&1; then + pkill -9 multipathd > /dev/null 2>&1 + fi fi