Skip to content

Commit f236d69

Browse files
torvaldsgregkh
authored andcommitted
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 <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 708f3ba commit f236d69

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: scripts/depmod.sh

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ if ! test -r System.map ; then
1515
exit 0
1616
fi
1717

18+
# legacy behavior: "depmod" in /sbin, no /sbin in PATH
19+
PATH="$PATH:/sbin"
1820
if [ -z $(command -v $DEPMOD) ]; then
1921
echo "Warning: 'make modules_install' requires $DEPMOD. Please install it." >&2
2022
echo "This is probably in the kmod package." >&2

0 commit comments

Comments
 (0)