dracut-lib.sh provides a custom version of pidof, so there is no need to install
the pidof binary. Also, source dracut-lib.sh in hook scripts when needed.
Fixes issue #2027
inst_multiple \
pkill \
- pidof \
kpartx \
dmsetup \
multipath \
#!/bin/sh
+type need_shutdown > /dev/null 2>&1 || . /lib/dracut-lib.sh
+
for i in $(multipath -l -v1); do
if dmsetup table "$i" | sed -n '/.*queue_if_no_path.*/q1'; then
need_shutdown
#!/bin/sh
+type pidof > /dev/null 2>&1 || . /lib/dracut-lib.sh
+
if [ -e /etc/multipath.conf ]; then
pkill multipathd > /dev/null 2>&1
#!/bin/sh
+type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
+
if [ "$(getarg rd.multipath)" = "default" ] && [ ! -e /etc/multipath.conf ]; then
# mpathconf requires /etc/multipath to already exist
mkdir -p /etc/multipath