Reduce valgrind memory leak warnings in depmod and modprobe
[mit.git] / install-with-care
blob499e410f653319d05f5f0d3faccba23001eb959d
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, move old utils first. >&2
13 exit 1
16 /bin/lsmod) # If we're installing into /bin, make /sbin/lsmod link.
17 ln -sf ../bin/lsmod /sbin/lsmod
19 esac
21 exec install "$@"