blob: 5678413f93a7ac68cafb3c2462f81356ee921777 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#!/bin/bash
. /etc/rc.d/init.d/functions
# This script generates /etc/rndc.key if doesn't exist
if [ ! -s /etc/rndc.key ]; then
echo -n $"Generating /etc/rndc.key:"
if /usr/sbin/rndc-confgen -a > /dev/null 2>&1; then
chmod 640 /etc/rndc.key
chown root.named /etc/rndc.key
[ -x /sbin/restorecon ] && /sbin/restorecon /etc/rndc.key
success $"/etc/rndc.key generation"
echo
else
failure $"/etc/rndc.key generation"
echo
fi
fi
|