%PDF- %PDF-
| Direktori : /var/lib/dpkg/info/ |
| Current File : //var/lib/dpkg/info/libnss-sss:amd64.postrm |
#!/bin/sh
set -e
# Automatically added by dh_installnss/1.7
: "${DPKG_MAINTSCRIPT_PACKAGE_INSTCOUNT:=$(dpkg-query -f '${db:Status-Abbrev}\n' -W "$DPKG_MAINTSCRIPT_PACKAGE" | grep -c '^i')}"
if { [ "$1" = "remove" ] || [ "$1" = "purge" ] ; } && [ -e "${DPKG_ROOT}/etc/nsswitch.conf" ] && [ "$DPKG_MAINTSCRIPT_PACKAGE_INSTCOUNT" -eq 0 ] ; then
sed -E -i "${DPKG_ROOT}/etc/nsswitch.conf" \
-e ':a /^shadow:\s.*#/ s/(^[^#]+)\s(sss)\s+\[!?[A-Za-z]+=[A-Za-z]+\](\s|#)/\1\3/g ; t a' \
-e ':b /^shadow:\s.*#/ s/(^[^#]+)\s(sss)(\s|#)/\1\3/g ; t b' \
-e ':c /^shadow:\s[^#]*$/ s/\s(sss)\s+\[!?[A-Za-z]+=[A-Za-z]+\](\s|$)/\2/g ; t c' \
-e ':d /^shadow:\s[^#]*$/ s/\s(sss)(\s|$)/\2/g ; t d'
fi
# End automatically added section
# Automatically added by dh_installnss/1.7
: "${DPKG_MAINTSCRIPT_PACKAGE_INSTCOUNT:=$(dpkg-query -f '${db:Status-Abbrev}\n' -W "$DPKG_MAINTSCRIPT_PACKAGE" | grep -c '^i')}"
if { [ "$1" = "remove" ] || [ "$1" = "purge" ] ; } && [ -e "${DPKG_ROOT}/etc/nsswitch.conf" ] && [ "$DPKG_MAINTSCRIPT_PACKAGE_INSTCOUNT" -eq 0 ] ; then
sed -E -i "${DPKG_ROOT}/etc/nsswitch.conf" \
-e ':a /^services:\s.*#/ s/(^[^#]+)\s(sss)\s+\[!?[A-Za-z]+=[A-Za-z]+\](\s|#)/\1\3/g ; t a' \
-e ':b /^services:\s.*#/ s/(^[^#]+)\s(sss)(\s|#)/\1\3/g ; t b' \
-e ':c /^services:\s[^#]*$/ s/\s(sss)\s+\[!?[A-Za-z]+=[A-Za-z]+\](\s|$)/\2/g ; t c' \
-e ':d /^services:\s[^#]*$/ s/\s(sss)(\s|$)/\2/g ; t d'
fi
# End automatically added section
# Automatically added by dh_installnss/1.7
: "${DPKG_MAINTSCRIPT_PACKAGE_INSTCOUNT:=$(dpkg-query -f '${db:Status-Abbrev}\n' -W "$DPKG_MAINTSCRIPT_PACKAGE" | grep -c '^i')}"
if { [ "$1" = "remove" ] || [ "$1" = "purge" ] ; } && [ -e "${DPKG_ROOT}/etc/nsswitch.conf" ] && [ "$DPKG_MAINTSCRIPT_PACKAGE_INSTCOUNT" -eq 0 ] ; then
sed -E -i "${DPKG_ROOT}/etc/nsswitch.conf" \
-e ':a /^passwd:\s.*#/ s/(^[^#]+)\s(sss)\s+\[!?[A-Za-z]+=[A-Za-z]+\](\s|#)/\1\3/g ; t a' \
-e ':b /^passwd:\s.*#/ s/(^[^#]+)\s(sss)(\s|#)/\1\3/g ; t b' \
-e ':c /^passwd:\s[^#]*$/ s/\s(sss)\s+\[!?[A-Za-z]+=[A-Za-z]+\](\s|$)/\2/g ; t c' \
-e ':d /^passwd:\s[^#]*$/ s/\s(sss)(\s|$)/\2/g ; t d'
fi
# End automatically added section
# Automatically added by dh_installnss/1.7
: "${DPKG_MAINTSCRIPT_PACKAGE_INSTCOUNT:=$(dpkg-query -f '${db:Status-Abbrev}\n' -W "$DPKG_MAINTSCRIPT_PACKAGE" | grep -c '^i')}"
if { [ "$1" = "remove" ] || [ "$1" = "purge" ] ; } && [ -e "${DPKG_ROOT}/etc/nsswitch.conf" ] && [ "$DPKG_MAINTSCRIPT_PACKAGE_INSTCOUNT" -eq 0 ] ; then
sed -E -i "${DPKG_ROOT}/etc/nsswitch.conf" \
-e ':a /^netgroup:\s.*#/ s/(^[^#]+)\s(sss)\s+\[!?[A-Za-z]+=[A-Za-z]+\](\s|#)/\1\3/g ; t a' \
-e ':b /^netgroup:\s.*#/ s/(^[^#]+)\s(sss)(\s|#)/\1\3/g ; t b' \
-e ':c /^netgroup:\s[^#]*$/ s/\s(sss)\s+\[!?[A-Za-z]+=[A-Za-z]+\](\s|$)/\2/g ; t c' \
-e ':d /^netgroup:\s[^#]*$/ s/\s(sss)(\s|$)/\2/g ; t d'
fi
# End automatically added section
# Automatically added by dh_installnss/1.7
: "${DPKG_MAINTSCRIPT_PACKAGE_INSTCOUNT:=$(dpkg-query -f '${db:Status-Abbrev}\n' -W "$DPKG_MAINTSCRIPT_PACKAGE" | grep -c '^i')}"
if { [ "$1" = "remove" ] || [ "$1" = "purge" ] ; } && [ -e "${DPKG_ROOT}/etc/nsswitch.conf" ] && [ "$DPKG_MAINTSCRIPT_PACKAGE_INSTCOUNT" -eq 0 ] ; then
sed -E -i "${DPKG_ROOT}/etc/nsswitch.conf" \
-e ':a /^group:\s.*#/ s/(^[^#]+)\s(sss)\s+\[!?[A-Za-z]+=[A-Za-z]+\](\s|#)/\1\3/g ; t a' \
-e ':b /^group:\s.*#/ s/(^[^#]+)\s(sss)(\s|#)/\1\3/g ; t b' \
-e ':c /^group:\s[^#]*$/ s/\s(sss)\s+\[!?[A-Za-z]+=[A-Za-z]+\](\s|$)/\2/g ; t c' \
-e ':d /^group:\s[^#]*$/ s/\s(sss)(\s|$)/\2/g ; t d'
fi
# End automatically added section
# Automatically added by dh_installnss/1.7
: "${DPKG_MAINTSCRIPT_PACKAGE_INSTCOUNT:=$(dpkg-query -f '${db:Status-Abbrev}\n' -W "$DPKG_MAINTSCRIPT_PACKAGE" | grep -c '^i')}"
if { [ "$1" = "remove" ] || [ "$1" = "purge" ] ; } && [ -e "${DPKG_ROOT}/etc/nsswitch.conf" ] && [ "$DPKG_MAINTSCRIPT_PACKAGE_INSTCOUNT" -eq 0 ] ; then
sed -E -i "${DPKG_ROOT}/etc/nsswitch.conf" \
-e ':a /^automount:\s.*#/ s/(^[^#]+)\s(sss)\s+\[!?[A-Za-z]+=[A-Za-z]+\](\s|#)/\1\3/g ; t a' \
-e ':b /^automount:\s.*#/ s/(^[^#]+)\s(sss)(\s|#)/\1\3/g ; t b' \
-e ':c /^automount:\s[^#]*$/ s/\s(sss)\s+\[!?[A-Za-z]+=[A-Za-z]+\](\s|$)/\2/g ; t c' \
-e ':d /^automount:\s[^#]*$/ s/\s(sss)(\s|$)/\2/g ; t d'
fi
# End automatically added section
# Automatically added by dh_installnss/1.7
: "${DPKG_MAINTSCRIPT_PACKAGE_INSTCOUNT:=$(dpkg-query -f '${db:Status-Abbrev}\n' -W "$DPKG_MAINTSCRIPT_PACKAGE" | grep -c '^i')}"
if { [ "$1" = "remove" ] || [ "$1" = "purge" ] ; } && [ -e "${DPKG_ROOT}/etc/nsswitch.conf" ] && [ "$DPKG_MAINTSCRIPT_PACKAGE_INSTCOUNT" -eq 0 ] ; then
if grep -q -E '^automount:\s*$' "${DPKG_ROOT}/etc/nsswitch.conf" ; then
sed -E -i "${DPKG_ROOT}/etc/nsswitch.conf" -e '/^automount:/d'
fi
fi
# End automatically added section
log() {
echo "$*"
}
remove_nss_automount_db () {
log "Checking NSS setup..."
# abort if /etc/nsswitch.conf does not exist
if ! [ -e "${DPKG_ROOT}/etc/nsswitch.conf" ]; then
log "Could not find ${DPKG_ROOT}/etc/nsswitch.conf."
return
fi
# Remove NSS databases: `automount` and `automounter` (legacy).
sed -i '/^automount/d' "${DPKG_ROOT}/etc/nsswitch.conf"
}
case "$1" in
remove|purge)
if [ "${DPKG_MAINTSCRIPT_PACKAGE_REFCOUNT:-1}" = 1 ]; then
remove_nss_automount_db
fi
;;
upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
;;
*)
echo "postrm called with unknown argument \`$1'" >&2
exit 1
;;
esac