summaryrefslogtreecommitdiff
path: root/system/microcode_ctl/doinst.sh
diff options
context:
space:
mode:
authorAndrzej Telszewski <atelszewski@gmail.com>2010-05-13 00:40:57 +0200
committerDavid Somero <xgizzmo@slackbuilds.org>2010-05-13 00:40:57 +0200
commit7bb8593a3d7375fe70d26c62f9c4f19d5bd154b6 (patch)
tree755667c994eecda85e6c48276b8eb0e65ae777b7 /system/microcode_ctl/doinst.sh
parent24f196982d21ed2684b240a830567ecd19954d3c (diff)
downloadslackbuilds-7bb8593a3d7375fe70d26c62f9c4f19d5bd154b6.tar.gz
system/microcode_ctl: Updated for version 1.17
Diffstat (limited to 'system/microcode_ctl/doinst.sh')
-rw-r--r--system/microcode_ctl/doinst.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/system/microcode_ctl/doinst.sh b/system/microcode_ctl/doinst.sh
new file mode 100644
index 0000000000..c78bd94e8b
--- /dev/null
+++ b/system/microcode_ctl/doinst.sh
@@ -0,0 +1,22 @@
+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...
+}
+
+# Keep same perms on rc.microcode_ctl.new:
+if [ -e etc/rc.d/rc.microcode_ctl ]; then
+ cp -a etc/rc.d/rc.microcode_ctl etc/rc.d/rc.microcode_ctl.new.incoming
+ cat etc/rc.d/rc.microcode_ctl.new > etc/rc.d/rc.microcode_ctl.new.incoming
+ mv etc/rc.d/rc.microcode_ctl.new.incoming etc/rc.d/rc.microcode_ctl.new
+fi
+
+config etc/rc.d/rc.microcode_ctl.new
+