Do not request use of urandom and report failure
Original script did not report failure as exit status. Report error if rndc key generation failed also by exit status, not only by failed message. -r parameter is unsupported now, do not require it anymore.
This commit is contained in:
parent
775befed48
commit
8ad1379019
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
if [ ! -s /etc/rndc.key -a ! -s /etc/rndc.conf ]; then
|
if [ ! -s /etc/rndc.key -a ! -s /etc/rndc.conf ]; then
|
||||||
echo -n $"Generating /etc/rndc.key:"
|
echo -n $"Generating /etc/rndc.key:"
|
||||||
if /usr/sbin/rndc-confgen -a -A hmac-sha256 -r /dev/urandom > /dev/null 2>&1
|
if /usr/sbin/rndc-confgen -a -A hmac-sha256 > /dev/null 2>&1
|
||||||
then
|
then
|
||||||
chmod 640 /etc/rndc.key
|
chmod 640 /etc/rndc.key
|
||||||
chown root:named /etc/rndc.key
|
chown root:named /etc/rndc.key
|
||||||
@ -16,5 +16,6 @@ if [ ! -s /etc/rndc.key -a ! -s /etc/rndc.conf ]; then
|
|||||||
else
|
else
|
||||||
failure $"/etc/rndc.key generation"
|
failure $"/etc/rndc.key generation"
|
||||||
echo
|
echo
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user