Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/postinstall Make sure rc, rc.subr, and rc.shutdown ...



details:   https://anonhg.NetBSD.org/src/rev/fa2ca194fe84
branches:  trunk
changeset: 466653:fa2ca194fe84
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Sun Dec 29 22:19:13 2019 +0000

description:
Make sure rc, rc.subr, and rc.shutdown are properly updated.

Currently there is no info which rc* files should be updated
or not on upgrade (at least rc.conf and rc.local shouldn't),
so put back an explicit list in the postinstall script.
"Go for it" by christos@ in PR/54741.

Should be pulled up to netbsd-9.

diffstat:

 usr.sbin/postinstall/postinstall.in |  15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diffs (38 lines):

diff -r a4c7c8fd7691 -r fa2ca194fe84 usr.sbin/postinstall/postinstall.in
--- a/usr.sbin/postinstall/postinstall.in       Sun Dec 29 21:09:27 2019 +0000
+++ b/usr.sbin/postinstall/postinstall.in       Sun Dec 29 22:19:13 2019 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: postinstall.in,v 1.11 2019/12/22 18:41:36 christos Exp $
+# $NetBSD: postinstall.in,v 1.12 2019/12/29 22:19:13 tsutsui Exp $
 #
 # Copyright (c) 2002-2015 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -1415,6 +1415,14 @@
 #      rc
 #
 
+# There is no info in src/distrib or /etc/mtree which rc* files
+# can be overwritten unconditionally on upgrade. See PR/54741.
+rc_644_files="
+rc
+rc.subr
+rc.shutdown
+"
+
 rc_obsolete_vars="
 amd amd_master
 btcontrol btcontrol_devices
@@ -1510,8 +1518,9 @@
        local rc_external_files="blacklist nsd unbound"
 
        # rc* files in /etc/
-       local rc_444_files="$(select_set_files /etc/rc \
-           "/etc/\(rc[^[:space:]/]*\)" ${etcsets})"
+       # XXX: at least rc.conf and rc.local shouldn't be updated. PR/54741
+       #local rc_644_files="$(select_set_files /etc/rc \
+       #    "/etc/\(rc[^[:space:]/]*\)" ${etcsets})"
 
        # no-obsolete rc files in /etc/rc.d
        local rc_555_files="$(select_set_files /etc/rc.d/ \



Home | Main Index | Thread Index | Old Index