NetBSD-Bugs archive

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

Re: install/54990: After upgrade from 9.0-RC2 to 9.0, the release candidate is still present



>>> Martin Husemann <martin%duskware.de@localhost> wrote

> The following reply was made to PR install/54990; it has been noted by GNATS.
> 
> From: Martin Husemann <martin%duskware.de@localhost>
> To: gnats-bugs%netbsd.org@localhost
> Cc: 
> Subject: Re: install/54990: After upgrade from 9.0-RC2 to 9.0, the release
>  candidate is still present
> Date: Thu, 20 Feb 2020 13:09:56 +0100
> 
>  The problem is that
>  
>   (a) postinstall(8), which we run during an update, does not "fix" it.
>   (b) formally /etc/motd is considered a user-editable file and should not
>       be managed automatically.
>  
>  I guess we should change postinstall to recognize unmodified files (of all
>  three (?) variants) and just replace them.

postinstall(8) has this check and fix, but it doesn't seem to work
since it doesn't follow the changes (http->https) in the standard
/etc/motd message.

I think that it is necessary to change as follows.

Index: usr.sbin/postinstall/postinstall.in
===================================================================
RCS file: /cvsroot/src/usr.sbin/postinstall/postinstall.in,v
retrieving revision 1.14
diff -u -d -r1.14 postinstall.in
--- usr.sbin/postinstall/postinstall.in	30 Jan 2020 13:54:05 -0000	1.14
+++ usr.sbin/postinstall/postinstall.in	21 Feb 2020 06:32:53 -0000
@@ -1269,9 +1269,9 @@
 {
 	[ -n "$1" ] || err 3 "USAGE: do_motd  fix|check"
 
-	if ${GREP} -i 'http://www.NetBSD.org/Misc/send-pr.html' \
+	if ${GREP} -i 'https*://www.NetBSD.org/Misc/send-pr.html' \
 		"${DEST_DIR}/etc/motd" >/dev/null 2>&1 \
-	    || ${GREP} -i 'http://www.NetBSD.org/support/send-pr.html' \
+	    || ${GREP} -i 'https*://www.NetBSD.org/support/send-pr.html' \
 		"${DEST_DIR}/etc/motd" >/dev/null 2>&1
 	then
 		tmp1="$(mktemp /tmp/postinstall.motd.XXXXXXXX)"

-- Takeshi Nakayama


Home | Main Index | Thread Index | Old Index