summaryrefslogtreecommitdiff
path: root/ruby/facter/doinst.sh
diff options
context:
space:
mode:
authorThibaut Notteboom <tib@tibux.org>2013-02-17 16:01:16 -0600
committerRobby Workman <rworkman@slackbuilds.org>2013-02-22 22:27:44 -0600
commitb9ecc66854eeca83b1a725cfbff6f59d5d121c92 (patch)
treee704c78bd69cf1d97756338bbdc46e2de3ebb70c /ruby/facter/doinst.sh
parentc491acda6640e48f66b49d564a30b1093000a182 (diff)
downloadslackbuilds-b9ecc66854eeca83b1a725cfbff6f59d5d121c92.tar.gz
ruby/facter: Updated for version 1.6.17.
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'ruby/facter/doinst.sh')
-rw-r--r--ruby/facter/doinst.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/ruby/facter/doinst.sh b/ruby/facter/doinst.sh
new file mode 100644
index 0000000000..65ce6d65a5
--- /dev/null
+++ b/ruby/facter/doinst.sh
@@ -0,0 +1,14 @@
+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/facter.conf.new