NetBSD Problem Report #22070

Received: (qmail 14674 invoked by uid 605); 6 Jul 2003 08:25:26 -0000
Message-Id: <20030706082519.A0E3211153@narn.netbsd.org>
Date: Sun,  6 Jul 2003 08:25:19 +0000 (UTC)
From: jthyttin@lce.hut.fi
Sender: gnats-bugs-owner@netbsd.org
Reply-To: jthyttin@lce.hut.fi
To: gnats-bugs@gnats.netbsd.org
Subject: postinstall doesn't check for /etc/services
X-Send-Pr-Version: www-1.0

>Number:         22070
>Category:       install
>Synopsis:       postinstall doesn't check for /etc/services
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    install-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sun Jul 06 08:26:02 +0000 2003
>Closed-Date:    
>Last-Modified:  
>Originator:     Juha Hyttinen
>Release:        -current (several computers & dates)
>Organization:
HUT/LCE
>Environment:
NetBSD tarantula.private.hyttinen.org 1.6U NetBSD 1.6U (TARANTULA) #1: Sat Jun 28 17:29:08 EEST 2003  jthyttin@tarantula.private.hyttinen.org:/cvs/obj/sys/arch/i386/compile/TARANTULA i386
>Description:
While running postinstall after system upgrade, it doesn't check for
file /etc/services being up-to-date. I'm using freshly updated
src/etc/postinstall:

# $NetBSD: postinstall,v 1.61 2003/05/15 05:25:24 lukem Exp $

I do realize, that etcupdate is the documented method:

http://www.netbsd.org/Documentation/current/#etcupdate

but it would still be kinda cool if postinstall did it for me. After
all, there's couple of lines in the beginning of the script:

# postinstall
#       check for or fix configuration changes that occur
#       over time as NetBSD evolves.

The current checks in postinstall seemed to be concerning more or less
critical resources, so it would suggest /etc/services doesn't need to
be checked. However, /etc/services is quite static data (no local mods)
on most systems (or is it?), so IMHO it would be reasonable to keep it
up-to-date when changes at CVS tree occur.

On the other hand, I understand that postinstall would get bloated if
each and every check would be included. So feel free to discard this ;)
>How-To-Repeat:
- install NetBSD system
- get the latest sources
- build kernel & world
- run /usr/src/etc/postinstall
- compare /etc/services against /usr/src/etc/services
>Fix:
I have a simple patch, which just checks for any changes and copies the
file over, if needed. I copy/pasted it from the do_postinstall() check
at the same script:

--- /usr/src/etc/postinstall    2003-07-06 11:11:13.000000000 +0300
+++ postinstall 2003-07-06 11:10:59.000000000 +0300
@@ -850,6 +850,23 @@
        return ${failed}
 }

+#
+#      services
+#
+additem services "/etc/services being up to date"
+do_services()
+{
+       [ -n "$1" ] || err 2 "USAGE: do_services  fix|check"
+       op=$1
+       failed=0
+
+       compare_dir ${op} ${SRC_DIR}/etc ${DEST_DIR}/etc 644 \
+               services
+       failed=$(( ${failed} + $? ))
+
+       return ${failed}
+}
+

 #
 #      end of items

>Release-Note:
>Audit-Trail:
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.