%PDF- %PDF-
Direktori : /var/lib/dpkg/info/ |
Current File : /var/lib/dpkg/info/libnss-sss:amd64.postinst |
#!/bin/sh set -e case "$1" in configure) if [ -n "$2" ]; then # upgrade version="$2" # fix automount typo if dpkg --compare-versions $version lt "2.2.3-3"; then sed -i 's/automounter/automount/' "${DPKG_ROOT}/etc/nsswitch.conf" fi fi ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac # Automatically added by dh_installnss/1.7 if [ "$1" = "configure" ] && [ -e "${DPKG_ROOT}/etc/nsswitch.conf" ] ; then if ! grep -q -E '^automount:' "${DPKG_ROOT}/etc/nsswitch.conf" ; then echo "automount: " >> "${DPKG_ROOT}/etc/nsswitch.conf" fi fi # End automatically added section # 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 '^automount:[^#]*\s(sss)(\s|#|$)' -e '^group:[^#]*\s(sss)(\s|#|$)' -e '^netgroup:[^#]*\s(sss)(\s|#|$)' -e '^passwd:[^#]*\s(sss)(\s|#|$)' -e '^services:[^#]*\s(sss)(\s|#|$)' -e '^shadow:[^#]*\s(sss)(\s|#|$)' "${DPKG_ROOT}/etc/nsswitch.conf" ; then # Installing passwd/sss from libnss-sss in position last sed -E -i "${DPKG_ROOT}/etc/nsswitch.conf" -e '/^passwd:\s[^#]*$/ s/$/ sss/' -e '/^passwd:\s.*#/ s/#/ sss #/' # Installing group/sss from libnss-sss in position last sed -E -i "${DPKG_ROOT}/etc/nsswitch.conf" -e '/^group:\s[^#]*$/ s/$/ sss/' -e '/^group:\s.*#/ s/#/ sss #/' # Installing shadow/sss from libnss-sss in position last sed -E -i "${DPKG_ROOT}/etc/nsswitch.conf" -e '/^shadow:\s[^#]*$/ s/$/ sss/' -e '/^shadow:\s.*#/ s/#/ sss #/' # Installing netgroup/sss from libnss-sss in position last sed -E -i "${DPKG_ROOT}/etc/nsswitch.conf" -e '/^netgroup:\s[^#]*$/ s/$/ sss/' -e '/^netgroup:\s.*#/ s/#/ sss #/' # Installing services/sss from libnss-sss in position last sed -E -i "${DPKG_ROOT}/etc/nsswitch.conf" -e '/^services:\s[^#]*$/ s/$/ sss/' -e '/^services:\s.*#/ s/#/ sss #/' # Installing automount/sss from libnss-sss in position last sed -E -i "${DPKG_ROOT}/etc/nsswitch.conf" -e '/^automount:\s[^#]*$/ s/$/ sss/' -e '/^automount:\s.*#/ s/#/ sss #/' fi rm "${DPKG_ROOT}/etc/nsswitch.conf.nss.${DPKG_MAINTSCRIPT_PACKAGE}-will-install" fi # End automatically added section