#!/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