diff options
author | gshapiro <gshapiro@FreeBSD.org> | 2001-07-23 02:19:02 +0000 |
---|---|---|
committer | gshapiro <gshapiro@FreeBSD.org> | 2001-07-23 02:19:02 +0000 |
commit | 054d1f29d9c361a2402fcc835954cd9230708910 (patch) | |
tree | 5e275b6954fb8b35b18e99e0d577d54900b8e73a /etc/sendmail | |
parent | cef3dba0893fdee1777990d6d8095fb0dce67752 (diff) | |
download | FreeBSD-src-054d1f29d9c361a2402fcc835954cd9230708910.zip FreeBSD-src-054d1f29d9c361a2402fcc835954cd9230708910.tar.gz |
If the user sets SENDMAIL_MC to /etc/mail/sendmail.mc, install is told to
install /etc/mail/sendmail.cf to /etc/mail/sendmail.cf and exits with an
error:
===> etc/sendmail
install -c -o root -g wheel -m 644 /etc/mail/sendmail.cf /etc/mail/sendmail.cf
install: /etc/mail/sendmail.cf and /etc/mail/sendmail.cf are the same file
*** Error code 64
Catch this in the Makefile and don't call install if the source and target
are the same file.
Reported by: Alexandr Listopad <laa@reis.zp.ua>
MFC after: 1 week
Diffstat (limited to 'etc/sendmail')
-rw-r--r-- | etc/sendmail/Makefile | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/etc/sendmail/Makefile b/etc/sendmail/Makefile index 28b5244..228b4da 100644 --- a/etc/sendmail/Makefile +++ b/etc/sendmail/Makefile @@ -38,6 +38,8 @@ INSTALL_CF= ${SENDMAIL_CF} .endif .endif +DEST_CF= ${DESTDIR}/etc/mail/sendmail.cf + ALL+= ${INSTALL_CF} # Additional .cf files to build @@ -57,8 +59,10 @@ install: ${INSTALL_CF} @false .endif .if defined(INSTALL_CF) +.if ${INSTALL_CF} != ${DEST_CF} ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 ${INSTALL_CF} \ - ${DESTDIR}/etc/mail/sendmail.cf + ${DEST_CF} +.endif .endif # Helper for src/etc/Makefile @@ -72,11 +76,13 @@ distribution: freebsd.cf freebsd.mc ${INSTALL_CF} ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 freebsd.cf \ ${DESTDIR}/etc/mail/freebsd.cf .if defined(INSTALL_CF) +.if ${INSTALL_CF} != ${DEST_CF} ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 ${INSTALL_CF} \ - ${DESTDIR}/etc/mail/sendmail.cf + ${DEST_CF} +.endif .else ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 freebsd.cf \ - ${DESTDIR}/etc/mail/sendmail.cf + ${DEST_CF} .endif ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 ${SMDIR}/helpfile \ ${DESTDIR}/etc/mail/helpfile |