Todd Lyons <[EMAIL PROTECTED]> writes:

> > If you configure those, /etc does not match the chroot jail and you must put 
> > them back in sync to get postfix to run. Same goes for DNS - resolv.conf.
> 
> Agreed.  How about this:
> 
> --- postfix.orig        2003-03-12 10:46:24.000000000 -0800
> +++ postfix     2003-03-12 10:50:22.000000000 -0800
> @@ -34,9 +34,12 @@
>  start() {
>         # Start daemons.
>         gprintf "Starting postfix: "
>       if [ ! -e /var/spool/postfix/etc/resolv.conf ]; then
>               cp -f /etc/resolv.conf /var/spool/postfix/etc
>       fi
> +       for CONFIGFILE in /etc/resolve.conf /etc/hosts /etc/host.conf \
> +                         /etc/localtime /etc/services; do
> +               if [ $CONFIGFILE -nt /var/spool/postfix/$CONFIGFILE ];
> then
> +                       cp -f $CONFIGFILE /var/spool/postfix/$CONFIGFILE
> +               fi
> +       done

Well in that case, the test is useless. Copying -f is the same.

But I'm wondering if it's really good. If the guy wants to have a
different config file in the chroot, his stuff will get
overwritten :(.

-- 
Guillaume Cottenceau - http://people.mandrakesoft.com/~gc/

Reply via email to