diff options
author | Hunter Sezen <ovariegata@yahoo.com> | 2016-12-09 00:29:24 +0000 |
---|---|---|
committer | David Spencer <idlemoor@slackbuilds.org> | 2016-12-10 00:57:38 +0000 |
commit | cdbd2caec49ca242dff013b3555de73a39ca64bb (patch) | |
tree | 25f44ee757507e6f661b0721ffc54e425c8fd486 /network/r8168/doinst.sh | |
parent | 4b85fb97a66a5b8a91dbdd7f7ff3b488aa67a9d8 (diff) |
network/r8168: Fixed doinst.sh.
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'network/r8168/doinst.sh')
-rw-r--r-- | network/r8168/doinst.sh | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/network/r8168/doinst.sh b/network/r8168/doinst.sh index 6a688ee74cf14..a020fc58d274b 100644 --- a/network/r8168/doinst.sh +++ b/network/r8168/doinst.sh @@ -1,3 +1,19 @@ -if [ -x /sbin/depmod ]; then - /sbin/depmod -a 1> /dev/null 2> /dev/null +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/r8169_blacklist.conf.new + +# A good idea whenever kernel modules are added or changed: +if [ -x sbin/depmod ]; then + chroot . /sbin/depmod -a @KERNEL@ 1> /dev/null 2> /dev/null fi |