Sophie

Sophie

distrib > Mageia > 3 > i586 > by-pkgid > 20755bfeb44bcfcb1cf66e021410db29 > scriptlet

nss_mdns-0.10-10.mga3.i586.rpm

POSTIN

/bin/sh

if [ $1 = 1 ]; then
   # ipv4 by default, as explained on the webpage
    [ -f /etc/sysconfig/network ] && source /etc/sysconfig/network
    if [ "${NETWORKING_IPV6}" = "yes" ]; then
        # for both ipv6 and ipv4
        perl -pi -e '!/mdns/ && s/^(hosts:\s*)([^#\n]*)(#?.*)$/$1 mdns_minimal $2 mdns $3/' /etc/nsswitch.conf
    else
        perl -pi -e '!/mdns/ && s/^(hosts:\s*)([^#\n]*)(#?.*)$/$1 mdns4_minimal $2 mdns4 $3/' /etc/nsswitch.conf
    fi
fi

POSTUN

/bin/sh
if [ $1 = 0 ]; then
    perl -pi -e 's/^(hosts:.*)\smdns_minimal\d?(\s.*)$/$1 $2/' /etc/nsswitch.conf
    perl -pi -e 's/^(hosts:.*)\smdns\d?(\s.*)$/$1 $2/' /etc/nsswitch.conf
fi