slackbuilds_ponce/system/ipheth-driver/doinst.sh
Marco Bonetti c7088581e9 system/ipheth-driver: Added (iPhone USB Ethernet Driver)
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
2010-08-14 15:52:15 -04:00

16 lines
421 B
Bash

config() {
NEW="$1"
OLD="$(dirname $NEW)/$(basename $NEW .new)"
# If there's no config file by that name, mv it over:
if [ ! -r $OLD ]; then
mv $NEW $OLD
elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
# toss the redundant copy
rm $NEW
fi
# Otherwise, we leave the .new copy for the admin to consider...
}
config etc/modprobe.d/ipheth.conf.new
chroot . /sbin/depmod -a @KERNEL@