bin/64476: [PATCH] mergemaster: support for keeping customized rc.d
scripts
Oliver Eikemeier
eikemeier at fillmore-labs.com
Fri Mar 19 09:30:12 PST 2004
>Number: 64476
>Category: bin
>Synopsis: [PATCH] mergemaster: support for keeping customized rc.d scripts
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Fri Mar 19 09:30:11 PST 2004
>Closed-Date:
>Last-Modified:
>Originator: Oliver Eikemeier
>Release: FreeBSD 5.2.1-RELEASE-p1 i386
>Organization:
Fillmore Labs - http://www.fillmore-labs.com
>Environment:
System: FreeBSD nuuk.fillmore-labs.com 5.2.1-RELEASE-p1
>Description:
Recently mergemaster acquired the habit to flag all unknown rc.d scripts
as `stale' and offers to delete them. While it is nice, that scripts removed
from cvs doesn't interrupt the boot process, this also affects any
customized scripts a user might have put there. Currently the only option
is to answer `no' to the offer of deleting `stale' rc.d scripts, since
not every script is treated individually.
This patch adds an variable CUSTOM_RC_FILES to mergemasterrc which
can contain glob(1)-style patterns of scripts which should be kept.
>How-To-Repeat:
>Fix:
Index: mergemaster.8
===================================================================
RCS file: /home/ncvs/src/usr.sbin/mergemaster/mergemaster.8,v
retrieving revision 1.28
diff -u -r1.28 mergemaster.8
--- mergemaster.8 2 May 2003 06:28:30 -0000 1.28
+++ mergemaster.8 19 Mar 2004 17:02:07 -0000
@@ -351,6 +351,9 @@
# Don't compare the old and new motd files
#IGNORE_MOTD=yes
#
+# Customized scripts in /etc/rc.d that should be preserved
+#CUSTOM_RC_FILES=
+#
# Specify the path to scripts to run before the comparison starts,
# and/or after the script has finished its work
#MM_PRE_COMPARE_SCRIPT=
Index: mergemaster.sh
===================================================================
RCS file: /home/ncvs/src/usr.sbin/mergemaster/mergemaster.sh,v
retrieving revision 1.51
diff -u -r1.51 mergemaster.sh
--- mergemaster.sh 7 Mar 2004 10:10:19 -0000 1.51
+++ mergemaster.sh 19 Mar 2004 17:14:50 -0000
@@ -790,7 +790,9 @@
cd "${DESTDIR}/etc/rc.d" &&
for file in *; do
if [ ! -e "${TEMPROOT}/etc/rc.d/${file}" ]; then
- STALE_RC_FILES="${STALE_RC_FILES} ${file}"
+ if echo ${CUSTOM_RC_FILES} | grep -Fwvq "${file}"; then
+ STALE_RC_FILES="${STALE_RC_FILES} ${file}"
+ fi
fi
done
case "${STALE_RC_FILES}" in
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list