summaryrefslogtreecommitdiffstats
path: root/source/n/bind/doinst.sh
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2009-08-26 10:00:38 -0500
committer Eric Hameleers <alien@slackware.com>2018-05-31 22:41:17 +0200
commit5a12e7c134274dba706667107d10d231517d3e05 (patch)
tree55718d5acb710fde798d9f38d0bbaf594ed4b296 /source/n/bind/doinst.sh
downloadcurrent-5a12e7c134274dba706667107d10d231517d3e05.tar.gz
current-5a12e7c134274dba706667107d10d231517d3e05.tar.xz
Slackware 13.0slackware-13.0
Wed Aug 26 10:00:38 CDT 2009 Slackware 13.0 x86_64 is released as stable! Thanks to everyone who helped make this release possible -- see the RELEASE_NOTES for the credits. The ISOs are off to the replicator. This time it will be a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. We're taking pre-orders now at store.slackware.com. Please consider picking up a copy to help support the project. Once again, thanks to the entire Slackware community for all the help testing and fixing things and offering suggestions during this development cycle. As always, have fun and enjoy! -P.
Diffstat (limited to 'source/n/bind/doinst.sh')
-rw-r--r--source/n/bind/doinst.sh36
1 files changed, 36 insertions, 0 deletions
diff --git a/source/n/bind/doinst.sh b/source/n/bind/doinst.sh
new file mode 100644
index 000000000..afeff946f
--- /dev/null
+++ b/source/n/bind/doinst.sh
@@ -0,0 +1,36 @@
+#!/bin/sh
+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.bind.new:
+if [ -e etc/rc.d/rc.bind ]; then
+ cp -a etc/rc.d/rc.bind etc/rc.d/rc.bind.new.incoming
+ cat etc/rc.d/rc.bind.new > etc/rc.d/rc.bind.new.incoming
+ mv etc/rc.d/rc.bind.new.incoming etc/rc.d/rc.bind.new
+fi
+
+config etc/named.conf.new
+config etc/rc.d/rc.bind.new
+
+# Add a /var/named if it doesn't exist:
+if [ ! -d var/named ]; then
+ mkdir -p var/named
+ chmod 755 var/named
+fi
+
+# Generate /etc/rndc.key if there's none there,
+# and there also no /etc/rndc.conf (the other
+# way to set this up).
+if [ ! -r etc/rndc.key -a ! -r /etc/rndc.conf ]; then
+ chroot . /sbin/ldconfig
+ chroot . /usr/sbin/rndc-confgen -r /dev/urandom -a 2> /dev/null
+fi