conf/85449: mergemaster default for deleting "stale" rc.d scripts is bad

Kevin Oberman oberman at
Mon Aug 29 19:00:48 GMT 2005

>Number:         85449
>Category:       conf
>Synopsis:       mergemaster default for deleting "stale" rc.d scripts is bad
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Aug 29 19:00:40 GMT 2005
>Originator:     Kevin Oberman
>Release:        FreeBSD 7.0-CURRENT i386
ESnet--The Energy Sciences Network
System: FreeBSD 7.0-CURRENT FreeBSD 7.0-CURRENT #1: Sat Aug 27 08:41:06 PDT 2005 oberman at i386


When files not in the source tree are found in /etc/rc.d, they are
assumed to be stale and the script asks of they should be removed. The
default is to remove them. To make it worse, any response other then
'n' or 'N' (including 'no') will delete the files.

I use which must be in /etc/rc.d to function properly and I
am getting tired of inadvertantly deleting it on my current system.

If is better to default to NOT taking destructive actions.
Run mergemaster(8) with any non-standard file in /etc/rc.d
This is sub-optimal as 'yes' will be read as 'n', but at least it is
"safe". If I had a bit more time, I would have taken care of this, as
--- usr.sbin/mergemaster/	Mon Aug 29 11:46:21 2005
+++ usr.sbin/mergemaster/	Mon Aug 29 11:46:35 2005
@@ -809,16 +809,16 @@
     case "${AUTO_RUN}" in
       echo ''
-      echo -n '   *** Delete them now? [y] '
+      echo -n '   *** Delete them now? [n] '
       case "${DELETE_STALE_RC_FILES}" in
-      [nN])
-        echo '      *** Files will not be deleted'
-        ;;
-      *)
+      [yY])
         echo '      *** Deleting ... '
         rm ${STALE_RC_FILES}
         echo '                       done.'
+        ;;
+      *)
+        echo '      *** Files will not be deleted'
       sleep 2



More information about the freebsd-bugs mailing list