]> git.pld-linux.org Git - packages/djbdns.git/commitdiff
- when any of dnscache, pickdns, rbldns, tinydns, walldns have same IP djbdns-1_05-9
authorsaq <saq@pld-linux.org>
Sat, 5 Jan 2002 21:45:29 +0000 (21:45 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
address configured, warn about it in %post
- kill the services in %preun
- release 9, STBR

Changed files:
    djbdns.spec -> 1.29

djbdns.spec

index cb9671046bbabc7ba29839f0232374115c354e4a..abddeec2dfb103b6e81a89563e9289ff1941acf9 100644 (file)
@@ -2,7 +2,7 @@ Summary:        DJB DNS
 Summary(pl):   DJB DNS
 Name:          djbdns
 Version:       1.05
-Release:       8
+Release:       9
 License:       http://cr.yp.to/distributors.html (free to use)
 Group:         Networking/Daemons
 Group(de):     Netzwerkwesen/Server
@@ -534,6 +534,33 @@ else
 fi
 dd if=/dev/urandom of=seed bs=128c count=1
 
+%post -n dnscache
+if diff -u /etc/{dnscache,pickdns}/env/IP >/dev/zero 2>&1;then
+       echo "Warning: dnscache and pickdns can't work on the same"
+       echo "IP address. You have to edit either /etc/dnscache/env/IP"
+       echo "or /etc/pickdns/env/IP."
+fi
+if diff -u /etc/{dnscache,rbldns}/env/IP >/dev/zero 2>&1;then
+       echo "Warning: dnscache and rbldns can't work on the same"
+       echo "IP address. You have to edit either /etc/dnscache/env/IP"
+       echo "or /etc/rbldns/env/IP."
+fi
+if diff -u /etc/{dnscache,tinydns}/env/IP >/dev/zero 2>&1;then
+       echo "Warning: dnscache and tinydns can't work on the same"
+       echo "IP address. You have to edit either /etc/dnscache/env/IP"
+       echo "or /etc/tinydns/env/IP."
+fi
+if diff -u /etc/{dnscache,walldns}/env/IP >/dev/zero 2>&1;then
+       echo "Warning: dnscache and walldns can't work on the same"
+       echo "IP address. You have to edit either /etc/dnscache/env/IP"
+       echo "or /etc/walldns/env/IP."
+fi
+
+%preun -n dnscache
+if [ "$1" = "0" ]; then
+       svc -d /service/dnscache
+fi
+
 %postun -n dnscache
 if [ "$1" = "0" ]; then
        /usr/sbin/userdel dnscache
@@ -549,6 +576,33 @@ else
        %{_sbindir}/useradd -u 34 -r -d /etc/tinydns -s /bin/false -c "djbdns User" -g djbdns tinydns 1>&2
 fi
 
+%post -n tinydns
+if diff -u /etc/{dnscache,tinydns}/env/IP >/dev/zero 2>&1;then
+       echo "Warning: dnscache and tinydns can't work on the same"
+       echo "IP address. You have to edit either /etc/dnscache/env/IP"
+       echo "or /etc/tinydns/env/IP."
+fi
+if diff -u /etc/{pick,tiny}dns/env/IP >/dev/zero 2>&1;then
+       echo "Warning: pickdns and tinydns can't work on the same"
+       echo "IP address. You have to edit either /etc/pickdns/env/IP"
+       echo "or /etc/tinydns/env/IP."
+fi
+if diff -u /etc/{rbl,tiny}dns/env/IP >/dev/zero 2>&1;then
+       echo "Warning: rbldns and tinydns can't work on the same"
+       echo "IP address. You have to edit either /etc/rbldns/env/IP"
+       echo "or /etc/tinydns/env/IP."
+fi
+if diff -u /etc/{tiny,wall}dns/env/IP >/dev/zero 2>&1;then
+       echo "Warning: tinydns and walldns can't work on the same"
+       echo "IP address. You have to edit either /etc/tinydns/env/IP"
+       echo "or /etc/walldns/env/IP."
+fi
+
+%preun -n tinydns
+if [ "$1" = "0" ]; then
+       svc -d /service/tinydns
+fi
+
 %postun -n tinydns
 if [ "$1" = "0" ]; then
        /usr/sbin/userdel tinydns
@@ -564,6 +618,33 @@ else
        %{_sbindir}/useradd -u 35 -r -d /etc/pickdns -s /bin/false -c "djbdns User" -g djbdns pickdns 1>&2
 fi
 
+%post -n pickdns
+if diff -u /etc/{dnscache,pickdns}/env/IP >/dev/zero 2>&1;then
+       echo "Warning: dnscache and pickdns can't work on the same"
+       echo "IP address. You have to edit either /etc/dnscache/env/IP"
+       echo "or /etc/pickdns/env/IP."
+fi
+if diff -u /etc/{pick,rbl}dns/env/IP >/dev/zero 2>&1;then
+       echo "Warning: pickdns and rbldns can't work on the same"
+       echo "IP address. You have to edit either /etc/pickdns/env/IP"
+       echo "or /etc/rbldns/env/IP."
+fi
+if diff -u /etc/{pick,tiny}dns/env/IP >/dev/zero 2>&1;then
+       echo "Warning: pickdns and tinydns can't work on the same"
+       echo "IP address. You have to edit either /etc/pickdns/env/IP"
+       echo "or /etc/tinydns/env/IP."
+fi
+if diff -u /etc/{pick,wall}dns/env/IP >/dev/zero 2>&1;then
+       echo "Warning: pickdns and walldns can't work on the same"
+       echo "IP address. You have to edit either /etc/pickdns/env/IP"
+       echo "or /etc/walldns/env/IP."
+fi
+
+%preun -n pickdns
+if [ "$1" = "0" ]; then
+       svc -d /service/pickdns
+fi
+
 %postun -n pickdns
 if [ "$1" = "0" ]; then
        /usr/sbin/userdel pickdns
@@ -579,6 +660,33 @@ else
        %{_sbindir}/useradd -u 36 -r -d /etc/walldns -s /bin/false -c "djbdns User" -g djbdns walldns 1>&2
 fi
 
+%post -n walldns
+if diff -u /etc/{dnscache,walldns}/env/IP >/dev/zero 2>&1;then
+       echo "Warning: dnscache and walldns can't work on the same"
+       echo "IP address. You have to edit either /etc/dnscache/env/IP"
+       echo "or /etc/walldns/env/IP."
+fi
+if diff -u /etc/{pick,wall}dns/env/IP >/dev/zero 2>&1;then
+       echo "Warning: pickdns and walldns can't work on the same"
+       echo "IP address. You have to edit either /etc/pickdns/env/IP"
+       echo "or /etc/walldns/env/IP."
+fi
+if diff -u /etc/{rbl,wall}dns/env/IP >/dev/zero 2>&1;then
+       echo "Warning: rbldns and walldns can't work on the same"
+       echo "IP address. You have to edit either /etc/rbldns/env/IP"
+       echo "or /etc/walldns/env/IP."
+fi
+if diff -u /etc/{tiny,wall}dns/env/IP >/dev/zero 2>&1;then
+       echo "Warning: tinydns and walldns can't work on the same"
+       echo "IP address. You have to edit either /etc/tinydns/env/IP"
+       echo "or /etc/walldns/env/IP."
+fi
+
+%preun -n walldns
+if [ "$1" = "0" ]; then
+       svc -d /service/walldns
+fi
+
 %postun -n walldns
 if [ "$1" = "0" ]; then
        /usr/sbin/userdel walldns
@@ -594,6 +702,33 @@ else
        %{_sbindir}/useradd -u 37 -r -d /etc/rbldns -s /bin/false -c "djbdns User" -g djbdns rbldns 1>&2
 fi
 
+%post -n rbldns
+if diff -u /etc/{dnscache,rbldns}/env/IP >/dev/zero 2>&1;then
+       echo "Warning: dnscache and rbldns can't work on the same"
+       echo "IP address. You have to edit either /etc/dnscache/env/IP"
+       echo "or /etc/rbldns/env/IP."
+fi
+if diff -u /etc/{pick,rbl}dns/env/IP >/dev/zero 2>&1;then
+       echo "Warning: pickdns and rbldns can't work on the same"
+       echo "IP address. You have to edit either /etc/pickdns/env/IP"
+       echo "or /etc/rbldns/env/IP."
+fi
+if diff -u /etc/{rbl,tiny}dns/env/IP >/dev/zero 2>&1;then
+       echo "Warning: rbldns and tinydns can't work on the same"
+       echo "IP address. You have to edit either /etc/rbldns/env/IP"
+       echo "or /etc/tinydns/env/IP."
+fi
+if diff -u /etc/{rbl,wall}dns/env/IP >/dev/zero 2>&1;then
+       echo "Warning: rbldns and walldns can't work on the same"
+       echo "IP address. You have to edit either /etc/rbldns/env/IP"
+       echo "or /etc/walldns/env/IP."
+fi
+
+%preun -n rbldns
+if [ "$1" = "0" ]; then
+       svc -d /service/rbldns
+fi
+
 %postun -n rbldns
 if [ "$1" = "0" ]; then
        /usr/sbin/userdel rbldns
@@ -609,6 +744,11 @@ else
        %{_sbindir}/useradd -u 38 -r -d /etc/axfrdns -s /bin/false -c "djbdns User" -g djbdns axfrdns 1>&2
 fi
 
+%preun -n axfrdns
+if [ "$1" = "0" ]; then
+       svc -d /service/axfrdns
+fi
+
 %postun -n axfrdns
 if [ "$1" = "0" ]; then
        /usr/sbin/userdel axfrdns
This page took 0.080228 seconds and 4 git commands to generate.