summaryrefslogtreecommitdiff
path: root/system/nss-mysql/doinst.sh
diff options
context:
space:
mode:
authorMenno Duursma <druiloor@zonnet.nl>2010-05-13 01:00:59 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-13 01:00:59 +0200
commitf5806afd94f14e537102127aeafd6803a8df581e (patch)
treeaf07523e87efecc71e7cf4bf93177f8dc64500e8 /system/nss-mysql/doinst.sh
parent06e454263971e01ebcc743291c31a90f0092eb0f (diff)
downloadslackbuilds-f5806afd94f14e537102127aeafd6803a8df581e.tar.gz
system/nss-mysql: Added to 13.0 repository
Diffstat (limited to 'system/nss-mysql/doinst.sh')
-rw-r--r--system/nss-mysql/doinst.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/system/nss-mysql/doinst.sh b/system/nss-mysql/doinst.sh
new file mode 100644
index 0000000000..52667d67ec
--- /dev/null
+++ b/system/nss-mysql/doinst.sh
@@ -0,0 +1,19 @@
+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...
+}
+
+# Try not to mess over any costum settings
+config etc/nss-mysql-root.conf.new
+config etc/nss-mysql.conf.new
+config etc/nsswitch.conf-mysql.new
+