depmod: handle the case of /sbin/depmod without /sbin in PATH
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 28 Dec 2020 19:40:22 +0000 (11:40 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Jan 2021 18:49:01 +0000 (19:49 +0100)
commitf679fa0d018e40f3fd19168f8fd8d587ec5ef3d2
treef58af5eb5aa11c35094f3a3260f055739d2d8bdb
parent096d1ab748d810142af87d511397cd7da91a3457
depmod: handle the case of /sbin/depmod without /sbin in PATH

[ Upstream commit cedd1862be7e666be87ec824dabc6a2b05618f36 ]

Commit 436e980e2ed5 ("kbuild: don't hardcode depmod path") stopped
hard-coding the path of depmod, but in the process caused trouble for
distributions that had that /sbin location, but didn't have it in the
PATH (generally because /sbin is limited to the super-user path).

Work around it for now by just adding /sbin to the end of PATH in the
depmod.sh script.

Reported-and-tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
scripts/depmod.sh