summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2020-12-28 22:40:22 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-01-12 22:16:10 +0300
commit59b10c8a59a1593f0620f32437df97b4ddfe1d00 (patch)
tree96c1d1819a8cea5a82f9e0c991aae4407f4419f4 /scripts
parent663a0bcb3fa5dc9a5091394f6f54e9bf51974188 (diff)
downloadlinux-59b10c8a59a1593f0620f32437df97b4ddfe1d00.tar.xz
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>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/depmod.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/depmod.sh b/scripts/depmod.sh
index e083bcae343f..3643b4f896ed 100755
--- a/scripts/depmod.sh
+++ b/scripts/depmod.sh
@@ -15,6 +15,8 @@ if ! test -r System.map ; then
exit 0
fi
+# legacy behavior: "depmod" in /sbin, no /sbin in PATH
+PATH="$PATH:/sbin"
if [ -z $(command -v $DEPMOD) ]; then
echo "Warning: 'make modules_install' requires $DEPMOD. Please install it." >&2
echo "This is probably in the kmod package." >&2