summaryrefslogtreecommitdiffstats
path: root/abs/core/nss-mdns/nss-mdns.install
diff options
context:
space:
mode:
authorCecil <knoppmyth@gmail.com>2012-04-26 21:37:21 (GMT)
committerCecil <knoppmyth@gmail.com>2012-04-26 21:37:21 (GMT)
commitc7112b961322bf9c20282e3bbfb95b2ccf3fa97f (patch)
treeda4450d043b175a7aebb3a93c858b294995b765e /abs/core/nss-mdns/nss-mdns.install
parentf2394fa3f2984a3a4e74a19b2596f279ec3517ba (diff)
parentc8fc2fc2156fdeb0e9a54e7be48c8f02fdff848e (diff)
downloadlinhes_pkgbuild-c7112b961322bf9c20282e3bbfb95b2ccf3fa97f.zip
linhes_pkgbuild-c7112b961322bf9c20282e3bbfb95b2ccf3fa97f.tar.gz
linhes_pkgbuild-c7112b961322bf9c20282e3bbfb95b2ccf3fa97f.tar.bz2
Merge branch 'testing' of git@linhes.org:linhes_pkgbuild into testing
Diffstat (limited to 'abs/core/nss-mdns/nss-mdns.install')
-rw-r--r--abs/core/nss-mdns/nss-mdns.install20
1 files changed, 20 insertions, 0 deletions
diff --git a/abs/core/nss-mdns/nss-mdns.install b/abs/core/nss-mdns/nss-mdns.install
new file mode 100644
index 0000000..85e4d26
--- /dev/null
+++ b/abs/core/nss-mdns/nss-mdns.install
@@ -0,0 +1,20 @@
+post_install() {
+ cat << 'EOM'
+==> To enable IPv4 multicast DNS lookups, append 'mdns4' to the hosts line
+ in /etc/nsswitch.conf. Use 'mdns6' for IPv6 or 'mdns' for both.
+EOM
+}
+
+post_upgrade() {
+ if [ "$2" == "0.7-1" ]; then
+ echo -n "disabling mdns lookups in /etc/nsswitch.conf... "
+ sed -i -e '/^hosts: / s/ mdns\([46]\)\?\>//g' etc/nsswitch.conf && echo "done."
+ fi
+ cat << 'EOM'
+==> Please note that due to security reasons from version 0.9 on the
+ minimal mDNS stack included in nss-mdns (dubbed "legacy") is no
+ longer built - nss-mdns will not work unless Avahi is running.
+EOM
+
+ post_install
+}