]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
base/dracut-lib.sh: use "command -v" in pidof()
authorAlexander Tsoy <alexander@tsoy.me>
Sun, 9 Sep 2018 10:57:33 +0000 (13:57 +0300)
committerHarald Hoyer <harald@hoyer.xyz>
Mon, 10 Sep 2018 07:45:50 +0000 (09:45 +0200)
"type -P" doesn't work in dash

modules.d/99base/dracut-lib.sh

index b78272a31af75c37e917e1b1036f130bc26dabfa..f71e757cfc025c4adf23565970c3fa99514e6ea7 100755 (executable)
@@ -1060,7 +1060,7 @@ if ! command -v pidof >/dev/null 2>/dev/null; then
             debug_on
             return 1
         fi
-        _exe=$(type -P "$1")
+        _exe=$(command -v "$1")
         for i in /proc/*/exe; do
             [ -e "$i" ] || continue
             if [ -n "$_exe" ]; then