+%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
+