From owner-freebsd-bugs Sat Jan 18 18:10: 8 2003 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 44B6137B406 for ; Sat, 18 Jan 2003 18:10:06 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id DB74143F1E for ; Sat, 18 Jan 2003 18:10:05 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id h0J2A5NS037039 for ; Sat, 18 Jan 2003 18:10:05 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id h0J2A565037037; Sat, 18 Jan 2003 18:10:05 -0800 (PST) Date: Sat, 18 Jan 2003 18:10:05 -0800 (PST) Message-Id: <200301190210.h0J2A565037037@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Giorgos Keramidas Subject: Re: conf/47147: [PATCH] First look at /usr/local/share/sendmail/cf for sendmail.cf generation. Reply-To: Giorgos Keramidas Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR conf/47147; it has been noted by GNATS. From: Giorgos Keramidas To: Vadim Ostranitsyn Cc: bug-followup@freebsd.org Subject: Re: conf/47147: [PATCH] First look at /usr/local/share/sendmail/cf for sendmail.cf generation. Date: Sun, 19 Jan 2003 00:51:36 +0200 (EET) On 2003-01-16 23:24, Vadim Ostranitsyn wrote: > --- Makefile.diff begins here --- > --- Makefile.orig Thu Sep 26 17:39:38 2002 > +++ Makefile Thu Jan 16 22:02:18 2003 > @@ -83,7 +83,9 @@ > # This is the directory where the sendmail configuration files are > # located. > # > -.if exists(/usr/share/sendmail/cf) > +.if exists(/usr/local/share/sendmail/cf) > +SENDMAIL_CF_DIR?= /usr/local/share/sendmail/cf > +.elif exists(/usr/share/sendmail/cf) > SENDMAIL_CF_DIR?= /usr/share/sendmail/cf > .elif exists(/usr/src/contrib/sendmail/cf) > SENDMAIL_CF_DIR?= /usr/src/contrib/sendmail/cf > --- Makefile.diff ends here --- A better check would probably be to look for a file that really *has* to be there, or to avoid the conditional setting of SENDMAIL_CF_DIR with /usr/local subdirs. It is possible that ports are not installed in subdirectories of /usr/local but under /foo. Since it's not possible to know everything about the local setup, the only safe way of using SENDMAIL_CF_DIR in /etc/mail with the Makefile is to use: # cd /etc/mail # make SENDMAIL_CF_DIR=/real/path/to/sendmail/cf The conditional assignments of SENDMAIL_CF_DIR in Makefile will work as expected, and you can use any path you wish for your CF_DIR. To depend on the existence of the /usr/local/share/sendmail/cf directory might even prove to be unsafe and/or break things, on a system that just happens to have an old, empty directory with that name. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message