OSDN Git Service

Merge tag 'fsnotify_for_v4.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
[uclinux-h8/linux.git] / scripts / depmod.sh
index 1a6f85e..999d585 100755 (executable)
@@ -10,10 +10,16 @@ fi
 DEPMOD=$1
 KERNELRELEASE=$2
 
-if ! test -r System.map -a -x "$DEPMOD"; then
+if ! test -r System.map ; then
        exit 0
 fi
 
+if [ -z $(command -v $DEPMOD) ]; then
+       echo "'make modules_install' requires $DEPMOD. Please install it." >&2
+       echo "This is probably in the kmod package." >&2
+       exit 1
+fi
+
 # older versions of depmod require the version string to start with three
 # numbers, so we cheat with a symlink here
 depmod_hack_needed=true