diff options
author | Tomas Hozza <thozza@redhat.com> | 2013-08-16 13:08:20 +0200 |
---|---|---|
committer | Tomas Hozza <thozza@redhat.com> | 2013-08-16 13:08:20 +0200 |
commit | 5154ca335233d74fcaf0ab7fcf6a6d62a2513ba7 (patch) | |
tree | 6d9d8210321f3ff96d7d98f023abeebae919a543 /generate-rndc-key.sh | |
parent | ba646ed5d4b618524a6712b347bb34fffab387d4 (diff) | |
download | bind-5154ca335233d74fcaf0ab7fcf6a6d62a2513ba7.tar.gz bind-5154ca335233d74fcaf0ab7fcf6a6d62a2513ba7.tar.xz bind-5154ca335233d74fcaf0ab7fcf6a6d62a2513ba7.zip |
Don't generate rndc.key if there exists rndc.conf
Signed-off-by: Tomas Hozza <thozza@redhat.com>
Diffstat (limited to 'generate-rndc-key.sh')
-rwxr-xr-x | generate-rndc-key.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/generate-rndc-key.sh b/generate-rndc-key.sh index 5678413..454e7fe 100755 --- a/generate-rndc-key.sh +++ b/generate-rndc-key.sh @@ -2,9 +2,9 @@ . /etc/rc.d/init.d/functions -# This script generates /etc/rndc.key if doesn't exist +# This script generates /etc/rndc.key if doesn't exist AND if there is no rndc.conf -if [ ! -s /etc/rndc.key ]; then +if [ ! -s /etc/rndc.key -a ! -s /etc/rndc.conf ]; then echo -n $"Generating /etc/rndc.key:" if /usr/sbin/rndc-confgen -a > /dev/null 2>&1; then chmod 640 /etc/rndc.key |