Browse Source

make sure both /etc/rndc.key and /var/named/etc/rndc.key exist, and are

the same.
ok jakob@, deraadt@
OPENBSD_3_3
danh 22 years ago
parent
commit
09785eadac
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      src/etc/rc

+ 4
- 4
src/etc/rc View File

@ -1,4 +1,4 @@
# $OpenBSD: rc,v 1.218 2003/02/14 16:00:58 cedric Exp $
# $OpenBSD: rc,v 1.219 2003/03/04 18:42:52 danh Exp $
# System startup script run by init on autoboot # System startup script run by init on autoboot
# or after single-user. # or after single-user.
@ -204,10 +204,10 @@ if [ X"${pf}" != X"NO" -a X"${pflogd_flags}" != X"NO" ]; then
pflogd ${pflogd_flags} pflogd ${pflogd_flags}
fi fi
if [ -x /usr/sbin/rndc-confgen -a ! -f /etc/rndc.key ]; then
if ! cmp -s /etc/rndc.key /var/named/etc/rndc.key ; then
echo -n "rndc-confgen: generating new shared secret... " echo -n "rndc-confgen: generating new shared secret... "
if /usr/sbin/rndc-confgen -a; then
install -c -o root -g named -m 640 /etc/rndc.key /var/named/etc
if /usr/sbin/rndc-confgen -a -t /var/named >/dev/null 2>&1; then
chmod 0640 /var/named/etc/rndc.key >/dev/null 2>&1
echo done. echo done.
else else
echo failed. echo failed.


Loading…
Cancel
Save