HEX
Server: Apache/2.4.67 (Debian)
System: Linux vps-b2547eb4 6.1.0-41-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.158-1 (2025-11-09) x86_64
User: root (0)
PHP: 8.2.31
Disabled: NONE
Upload Files
File: //var/lib/dpkg/info/libnss-myhostname:amd64.postinst
#!/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(myhostname)(\s|#|$)' "${DPKG_ROOT}/etc/nsswitch.conf" ; then
		# Installing hosts/myhostname from libnss-myhostname in position after=files
		sed -E -i "${DPKG_ROOT}/etc/nsswitch.conf" -e '/^hosts:\s[^#]*$/ s/(\s)(files(\s+\[[^]]+\])?)(\s|$)/\1\2 myhostname /' -e '/^hosts:\s.*#/ s/(\s)(files(\s+\[[^]]+\])?)(\s|#)/\1\2 myhostname \3/' -e 's/ $//'
	fi
	rm "${DPKG_ROOT}/etc/nsswitch.conf.nss.${DPKG_MAINTSCRIPT_PACKAGE}-will-install"
fi
# End automatically added section