depmod: use real regex matching on depmod "overrides" entries
[mit.git] / install-with-care
blobeb699cf28c44440210abb274e8d350754685b20b
1 #! /bin/sh
3 echo install-with-care "$@"
5 # Final arg is dest.
6 eval DEST=\$$#
8 case $(echo $DEST | tr -s / /) in
9 /sbin/insmod.static) ;;# This didn't exist before, OK.
10 /sbin/insmod|/sbin/lsmod|/sbin/modprobe|/sbin/rmmod|/sbin/depmod)
11 if [ -f $DEST ] && [ -f $DEST.old ]; then
12 echo Refusing to install $DEST, remove $DEST.old first. >&2
13 echo Note: $DEST requires kernel version 2.5.48 or above.
14 if [ $DEST = /sbin/modprobe ]; then
15 cat << EOF >&2
17 Note: generate-modprobe.conf requires /sbin/modprobe.old.
18 (i.e. if you need to run it, do so before removing modprobe.old).
20 EOF
22 exit 1
25 /bin/lsmod) # If we're installing into /bin, make /sbin/lsmod link.
26 ln -sf ../bin/lsmod /sbin/lsmod
28 esac
30 exec install "$@"