Appending /etc/services.local to /etc/services, Take #4711

看板DFBSD_submit作者時間21年前 (2005/03/27 07:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
Hi, since I still can't accept "make upgrade" overwriting my valuable /etc/services file, I added a simple check to /usr/src/etc/Makefile; it now checks for an /etc/services.local file and, if it exists, appends it to /etc/services after installing. Until this allmighty "servicesd" shows up, I really can live with this mechanism. :) Enjoy the show --j --- etc/Makefile 22 Mar 2005 00:40:51 -0000 1.48 +++ etc/Makefile 26 Mar 2005 22:55:38 -0000 @@ -6,6 +6,10 @@ SUBDIR= sendmail .endif +# If it exists, append $SERVICES_LOCAL to /etc/services after installing +# +SERVICES_LOCAL=/etc/services.local + # Files that should be installed read-only (444) # BINUPDATE= apmd.conf fbtab gettytab network.subr \ @@ -93,6 +97,7 @@ cd ${.CURDIR}; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ ${BINUPDATE} ${DESTDIR}/etc; \ + [ ! -s "${SERVICES_LOCAL}" ] || cat "${SERVICES_LOCAL}" >> /etc/services; \ cap_mkdb ${DESTDIR}/etc/login.conf; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 555 \ ${BIN2} ${DESTDIR}/etc; @@ -219,6 +224,7 @@ cd ${.CURDIR}; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ ${BINUPDATE} ${DESTDIR}/etc; \ + [ ! -s "${SERVICES_LOCAL}" ] || cat "${SERVICES_LOCAL}" >> /etc/services; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ ${BIN1} ${DESTDIR}/etc; \ cap_mkdb ${DESTDIR}/etc/login.conf; \ ----------------------------------------------------- who | grep -i blonde | talk; cd ~; wine; talk; touch; unzip; touch; strip; gasp; finger; gasp; mount; fsck; more; yes; gasp; umount; make clean; sleep
文章代碼(AID): #12HV3q00 (DFBSD_submit)