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
This commit is contained in:
parent
f4843be999
commit
f88f925efc
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=80176
@ -153,7 +153,9 @@ maps: ${SENDMAIL_MAP_OBJ}
|
|||||||
aliases: ${SENDMAIL_ALIASES}.db
|
aliases: ${SENDMAIL_ALIASES}.db
|
||||||
|
|
||||||
install: ${INSTALL_CF}
|
install: ${INSTALL_CF}
|
||||||
|
.if ${INSTALL_CF} != /etc/mail/sendmail.cf
|
||||||
${INSTALL} -c -m ${SHAREMODE} ${INSTALL_CF} /etc/mail/sendmail.cf
|
${INSTALL} -c -m ${SHAREMODE} ${INSTALL_CF} /etc/mail/sendmail.cf
|
||||||
|
.endif
|
||||||
|
|
||||||
start:
|
start:
|
||||||
(. /etc/defaults/rc.conf; source_rc_confs; \
|
(. /etc/defaults/rc.conf; source_rc_confs; \
|
||||||
|
@ -38,6 +38,8 @@ INSTALL_CF= ${SENDMAIL_CF}
|
|||||||
.endif
|
.endif
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
|
DEST_CF= ${DESTDIR}/etc/mail/sendmail.cf
|
||||||
|
|
||||||
ALL+= ${INSTALL_CF}
|
ALL+= ${INSTALL_CF}
|
||||||
|
|
||||||
# Additional .cf files to build
|
# Additional .cf files to build
|
||||||
@ -57,8 +59,10 @@ install: ${INSTALL_CF}
|
|||||||
@false
|
@false
|
||||||
.endif
|
.endif
|
||||||
.if defined(INSTALL_CF)
|
.if defined(INSTALL_CF)
|
||||||
|
.if ${INSTALL_CF} != ${DEST_CF}
|
||||||
${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 ${INSTALL_CF} \
|
${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 ${INSTALL_CF} \
|
||||||
${DESTDIR}/etc/mail/sendmail.cf
|
${DEST_CF}
|
||||||
|
.endif
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
# Helper for src/etc/Makefile
|
# 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 \
|
${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 freebsd.cf \
|
||||||
${DESTDIR}/etc/mail/freebsd.cf
|
${DESTDIR}/etc/mail/freebsd.cf
|
||||||
.if defined(INSTALL_CF)
|
.if defined(INSTALL_CF)
|
||||||
|
.if ${INSTALL_CF} != ${DEST_CF}
|
||||||
${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 ${INSTALL_CF} \
|
${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 ${INSTALL_CF} \
|
||||||
${DESTDIR}/etc/mail/sendmail.cf
|
${DEST_CF}
|
||||||
|
.endif
|
||||||
.else
|
.else
|
||||||
${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 freebsd.cf \
|
${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 freebsd.cf \
|
||||||
${DESTDIR}/etc/mail/sendmail.cf
|
${DEST_CF}
|
||||||
.endif
|
.endif
|
||||||
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 ${SMDIR}/helpfile \
|
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 ${SMDIR}/helpfile \
|
||||||
${DESTDIR}/etc/mail/helpfile
|
${DESTDIR}/etc/mail/helpfile
|
||||||
|
Loading…
Reference in New Issue
Block a user