1fc4da9a3SMichal Marek#!/bin/sh 2fc4da9a3SMichal Marek# 3fc4da9a3SMichal Marek# A depmod wrapper used by the toplevel Makefile 4fc4da9a3SMichal Marek 5fc4da9a3SMichal Marekif test $# -ne 2; then 6fc4da9a3SMichal Marek echo "Usage: $0 /sbin/depmod <kernelrelease>" >&2 7fc4da9a3SMichal Marek exit 1 8fc4da9a3SMichal Marekfi 9fc4da9a3SMichal MarekDEPMOD=$1 10fc4da9a3SMichal MarekKERNELRELEASE=$2 11fc4da9a3SMichal Marek 12fc4da9a3SMichal Marekif ! "$DEPMOD" -V 2>/dev/null | grep -q module-init-tools; then 13fc4da9a3SMichal Marek echo "Warning: you may need to install module-init-tools" >&2 14fc4da9a3SMichal Marek echo "See http://www.codemonkey.org.uk/docs/post-halloween-2.6.txt" >&2 15fc4da9a3SMichal Marek sleep 1 16fc4da9a3SMichal Marekfi 17fc4da9a3SMichal Marek 18fc4da9a3SMichal Marekif ! test -r System.map -a -x "$DEPMOD"; then 19fc4da9a3SMichal Marek exit 0 20fc4da9a3SMichal Marekfi 21fc4da9a3SMichal Marekset -- -ae -F System.map 22fc4da9a3SMichal Marekif test -n "$INSTALL_MOD_PATH"; then 23fc4da9a3SMichal Marek set -- "$@" -b "$INSTALL_MOD_PATH" 24fc4da9a3SMichal Marekfi 25fc4da9a3SMichal Marekexec "$DEPMOD" "$@" "$KERNELRELEASE" 26