50 lines · 1.3 KB · Shell
RawDownload
#!/bin/sh## A depmod wrapper used by the toplevel Makefile if test $# -ne 2; then	echo "Usage: $0 /sbin/depmod <kernelrelease>" >&2	exit 1fiDEPMOD=$1KERNELRELEASE=$2 if ! "$DEPMOD" -V 2>/dev/null | grep -q module-init-tools; then	echo "Warning: you may need to install module-init-tools" >&2	echo "See http://www.codemonkey.org.uk/docs/post-halloween-2.6.txt" >&2	sleep 1fi if ! test -r System.map -a -x "$DEPMOD"; then	exit 0fi# older versions of depmod require the version string to start with three# numbers, so we cheat with a symlink heredepmod_hack_needed=truetmp_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	fifirm -rf "$tmp_dir"if $depmod_hack_needed; then	symlink="$INSTALL_MOD_PATH/lib/modules/99.98.$KERNELRELEASE"	ln -s "$KERNELRELEASE" "$symlink"	KERNELRELEASE=99.98.$KERNELRELEASEfi set -- -ae -F System.mapif test -n "$INSTALL_MOD_PATH"; then	set -- "$@" -b "$INSTALL_MOD_PATH"fi"$DEPMOD" "$@" "$KERNELRELEASE"ret=$? if $depmod_hack_needed; then	rm -f "$symlink"fi exit $ret

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t