Sophie

Sophie

distrib > Mandriva > 2007.1 > x86_64 > media > main-updates-src > by-pkgid > 62ea43af7ec497e7a578db1ca6717d17 > files > 25

postfix-2.3.8-1.1mdv2007.1.src.rpm

#!/bin/sh
global_config_directory=/etc/postfix
postconf=/usr/sbin/postconf
[ -d ${global_config_directory} ] || exit 0
[ -x ${postconf} ] || exit 0
alternate_config_directories=`postconf -c ${global_config_directory} -h slave_config_directories 2>/dev/null`

for confdir in ${global_config_directory} ${alternate_config_directories}; do
	chroot=`${postconf} -c ${confdir} -h queue_directory 2>/dev/null`
	chroot_resolv=${chroot}/etc/resolv.conf

	if [ -n "${chroot}" -a -f $chroot_resolv ]; then
		grep -qs "# ppp temp entry" $chroot_resolv &&
			cp -pf /etc/resolv.conf $chroot_resolv
	fi
done

# i have no way to check if we are not chrooted and resolv.conf changed, i'll reload it anyway
[ -f /var/lock/subsys/postfix ] && /usr/sbin/postfix reload 2>/dev/null || true