-
Notifications
You must be signed in to change notification settings - Fork 399
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(multipath): revise multipathd-stop
A shellcheck regression quoted `HARD` in ```shell kill "$HARD" "$pid" > /dev/null 2>&1 ``` which would error on an empty "HARD". Instead of fixing this, use `pkill` instead and also add it to the non-optional list of binaries to install, which was revised also. Fixes: #1275
- Loading branch information
Showing
2 changed files
with
17 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |