Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > a7f6c42eb2e86315959e83f0a63f7924 > files > 26

postfix-2.9.6-4.mga3.src.rpm

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

for confdir in ${default_config_directory} ${multi_instance_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