DragonFly BSD
DragonFly submit List (threaded) for 2005-03
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

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


From: Joerg Anslik <joerg@xxxxxxxxx>
Date: Sun, 27 Mar 2005 00:07:41 +0100

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



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]