#!/bin/sh set -e # Automatically added by dh_installnss/1.7 if [ "$1" = "configure" ] && [ -f "${DPKG_ROOT}/etc/nsswitch.conf.nss.${DPKG_MAINTSCRIPT_PACKAGE}-will-install" ] && [ -e "${DPKG_ROOT}/etc/nsswitch.conf" ] ; then if ! grep -q -E -e '^hosts:[^#]*\s(mymachines)(\s|#|$)' "${DPKG_ROOT}/etc/nsswitch.conf" ; then # Installing hosts/mymachines from libnss-mymachines in position before=resolve,dns sed -E -i "${DPKG_ROOT}/etc/nsswitch.conf" -e '/^hosts:\s[^#]*$/ s/(\s)(resolve(\s+\[[^]]+\])?|dns(\s+\[[^]]+\])?)(\s|$)/\1mymachines \2 /' -e '/^hosts:\s.*#/ s/(\s)(resolve(\s+\[[^]]+\])?|dns(\s+\[[^]]+\])?)(\s|#)/\1mymachines \2 /' -e 's/ $//' fi rm "${DPKG_ROOT}/etc/nsswitch.conf.nss.${DPKG_MAINTSCRIPT_PACKAGE}-will-install" fi # End automatically added section