diff options
author | John Stultz <john.stultz@linaro.org> | 2011-07-25 09:58:06 -0700 |
---|---|---|
committer | John Stultz <john.stultz@linaro.org> | 2011-07-25 09:58:06 -0700 |
commit | 21a602b5cdc203cbcf8bbeeb26edeb3de7c65955 (patch) | |
tree | 8618b4a8882f78076a779ebb416b54332cc213db /scripts/depmod.sh | |
parent | 1a3807e5a6bea7e4b195fbb399bbc09e73230d4c (diff) | |
parent | 81f6236c4811b2b2b3ea64a306c071f76788ac4b (diff) |
Merge branch 'upstream/linaro-3.0' into linaro-android-3.0linux-linaro-3.0-2011.07-1-android-0
Diffstat (limited to 'scripts/depmod.sh')
-rwxr-xr-x | scripts/depmod.sh | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/scripts/depmod.sh b/scripts/depmod.sh index 3b029cba2ba..a2723568594 100755 --- a/scripts/depmod.sh +++ b/scripts/depmod.sh @@ -21,13 +21,15 @@ 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 -mkdir -p .tmp_depmod/lib/modules/$KERNELRELEASE -if "$DEPMOD" -b .tmp_depmod $KERNELRELEASE 2>/dev/null; then - if test -e .tmp_depmod/lib/modules/$KERNELRELEASE/modules.dep -o \ - -e .tmp_depmod/lib/modules/$KERNELRELEASE/modules.dep.bin; then +tmp_dir=$(mktemp -d ${TMPDIR:-/tmp}/depmod.XXXXXX) +mkdir -p "$tmp_dir/lib/modules/$KERNELRELEASE" +if "$DEPMOD" -b "$tmp_dir" $KERNELRELEASE 2>/dev/null; then + if test -e "$tmp_dir/lib/modules/$KERNELRELEASE/modules.dep" -o \ + -e "$tmp_dir/lib/modules/$KERNELRELEASE/modules.dep.bin"; then depmod_hack_needed=false fi fi +rm -rf "$tmp_dir" if $depmod_hack_needed; then symlink="$INSTALL_MOD_PATH/lib/modules/99.98.$KERNELRELEASE" ln -s "$KERNELRELEASE" "$symlink" |