Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > media > main-release > by-pkgid > e2add652705aadaba355990a4766b379 > scriptlet

nss_mdns-0.10-3mdv2008.1.x86_64.rpm

POSTIN

/bin/sh
/sbin/ldconfig

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

POSTUN

/bin/sh
/sbin/ldconfig
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