Package: pyro4 / 4.23-1

initscript_default_support.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Description: add default support to easy disable possibility
 Don't just run it, but make it easy to enable/disable.
 .
Author: Laszlo Boszormenyi (GCS) <gcs@debian.hu>
Last-Update: <2012-12-31>

---

--- pyro4-4.17.orig/contrib/init.d/pyro4-nsd
+++ pyro4-4.17/contrib/init.d/pyro4-nsd
@@ -22,6 +22,18 @@ MESSAGEDIR=/var/log/Pyro4
 MESSAGELOG=/var/log/Pyro4/NameServer.log
 PID=/var/run/Pyro4-NameServer.pid
 
+# Defaults - don't touch, edit /etc/default/pyro-nsd
+ENABLED=0
+
+if [ -f /etc/default/pyro4-nsd ] ; then
+        . /etc/default/pyro4-nsd
+fi
+
+if [ "$ENABLED" = "0" ]; then
+    echo "pyro4-nsd: disabled, see /etc/default/pyro4-nsd"
+    exit 0
+fi
+
 # Add Pyro Config
 # here you can add others ...
 export PYRO_HMAC_KEY=12345