summaryrefslogtreecommitdiff
path: root/extra/nss-mdns/nss-mdns.install
diff options
context:
space:
mode:
Diffstat (limited to 'extra/nss-mdns/nss-mdns.install')
-rw-r--r--extra/nss-mdns/nss-mdns.install24
1 files changed, 24 insertions, 0 deletions
diff --git a/extra/nss-mdns/nss-mdns.install b/extra/nss-mdns/nss-mdns.install
new file mode 100644
index 000000000..ed0fd0c24
--- /dev/null
+++ b/extra/nss-mdns/nss-mdns.install
@@ -0,0 +1,24 @@
+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
+}
+
+op=$1
+shift
+$op $*