summaryrefslogtreecommitdiffstats
path: root/poky/meta/recipes-connectivity/bind/bind/generate-rndc-key.sh
diff options
context:
space:
mode:
Diffstat (limited to 'poky/meta/recipes-connectivity/bind/bind/generate-rndc-key.sh')
-rw-r--r--poky/meta/recipes-connectivity/bind/bind/generate-rndc-key.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/poky/meta/recipes-connectivity/bind/bind/generate-rndc-key.sh b/poky/meta/recipes-connectivity/bind/bind/generate-rndc-key.sh
new file mode 100644
index 000000000..ef915c0ae
--- /dev/null
+++ b/poky/meta/recipes-connectivity/bind/bind/generate-rndc-key.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+if [ ! -s /etc/bind/rndc.key ]; then
+ echo -n "Generating /etc/bind/rndc.key:"
+ /usr/sbin/rndc-confgen -a -b 512 -r /dev/urandom
+ chown root:bind /etc/bind/rndc.key
+ chmod 0640 /etc/bind/rndc.key
+fi
OpenPOWER on IntegriCloud