NetBSD Problem Report #35538

From root@garbled.net  Thu Feb  1 20:34:34 2007
Return-Path: <root@garbled.net>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id 166B863B938
	for <gnats-bugs@gnats.NetBSD.org>; Thu,  1 Feb 2007 20:34:34 +0000 (UTC)
Message-Id: <20070201203443.E2ACB2AC95@polaris.garbled.net>
Date: Thu,  1 Feb 2007 13:34:43 -0700 (MST)
From: root@garbled.net
Reply-To: root@garbled.net
To: gnats-bugs@NetBSD.org
Subject: sysinst duplicates hostname on upgrade
X-Send-Pr-Version: 3.95

>Number:         35538
>Category:       install
>Synopsis:       sysinst duplicates hostname on upgrade
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    install-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Feb 01 20:35:00 +0000 2007
>Closed-Date:    Mon Sep 03 18:31:29 +0000 2012
>Last-Modified:  Mon Sep 03 18:31:29 +0000 2012
>Originator:     Tim Rightnour
>Release:        NetBSD 4.0_BETA2
>Organization:

>Environment:


System: NetBSD polaris.garbled.net 3.0 NetBSD 3.0 (GENERIC) #0: Mon Dec 19 01:04:02 UTC 2005 builds@works.netbsd.org:/home/builds/ab/netbsd-3-0-RELEASE/i386/200512182024Z-obj/home/builds/ab/netbsd-3-0-RELEASE/src/sys/arch/i386/compile/GENERIC i386
Architecture: powerpc
Machine: prep
>Description:
I upgrade my machines regularly via sysinst.  I usually do this with the files
located on NFS, which sysinst gathers by asking me about my network config.

If after the install, you say yes to "this network info is good and please 
install it in /etc", sysinst will do something rather silly to rc.conf:

# Add local overrides below
#
hostname=atik.garbled.net
defaultroute="192.168.10.11"
rpcbind=YES
timed=YES
sshd=YES
nfs_client=YES
inetd=YES
hostname=atik.garbled.net
defaultroute="192.168.10.11"
hostname=atik.garbled.net
defaultroute="192.168.10.11"


>How-To-Repeat:
Upgrade machine, say yes to save network information.  Repeat.

>Fix:
Sysinst should check rc.conf first?


>Release-Note:

>Audit-Trail:
From: Julian Djamil Fagir <gnrp@komkon2.de>
To: gnats-bugs@gnats.netbsd.org
Cc: 
Subject: Re: install/35538: sysinst duplicates hostname on upgrade
Date: Sat, 3 Mar 2012 02:44:44 +0100

 --MP_/wTV/S8aqsHTy7OlJGBl1cG4
 Content-Type: text/plain; charset=US-ASCII
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline

 Hi,

 imho, network configuration should not be stored when updating anyway. You
 want to only update the system, not change any of the configuration.
 The attached patch should do so (tbh, untested, but its effect is apparent).

 Regards, Julian
 --MP_/wTV/S8aqsHTy7OlJGBl1cG4
 Content-Type: text/x-patch
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment; filename=util.c.diff

 --- distrib/utils/sysinst/util.c
 +++ distrib/utils/sysinst/util.c
 @@ -1084,11 +1084,12 @@

  	/* Save keybard type */
  	save_kb_encoding();

  	/* Other configuration. */
 -	mnt_net_config();
 +	if (!update)
 +		mnt_net_config();

  	/* Mounted dist dir? */
  	umount_mnt2();

  	/* Install/Upgrade complete ... reboot or exit to script */


 --MP_/wTV/S8aqsHTy7OlJGBl1cG4--

From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: install/35538: sysinst duplicates hostname on upgrade
Date: Sat, 3 Mar 2012 09:07:38 +0100

 On Sat, Mar 03, 2012 at 01:45:03AM +0000, Julian Djamil Fagir wrote:
 > The following reply was made to PR install/35538; it has been noted by GNATS.
 >  imho, network configuration should not be stored when updating anyway. You
 >  want to only update the system, not change any of the configuration.

 The same reasoning applies to the keyboard layout as well?

 Martin

From: Julian Djamil Fagir <gnrp@komkon2.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: install/35538: sysinst duplicates hostname on upgrade
Date: Sat, 3 Mar 2012 19:50:01 +0100

 --MP_/2muj.kxQrz.99u2RUvPZ+Em
 Content-Type: text/plain; charset=US-ASCII
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline

 Hi,

 >  > The following reply was made to PR install/35538; it has been noted by
 >  > GNATS. imho, network configuration should not be stored when updating
 >  > anyway. You want to only update the system, not change any of the
 >  > configuration.
 >  
 >  The same reasoning applies to the keyboard layout as well?
 you're absolutely right, I didn't look at this.
 The attached patch fixes that.

 Regards, Julian
 --MP_/2muj.kxQrz.99u2RUvPZ+Em
 Content-Type: text/x-patch
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment; filename=util.c.diff

 --- distrib/utils/sysinst/util.c
 +++ distrib/utils/sysinst/util.c
 @@ -1080,15 +1080,17 @@

  	/* Configure the system */
  	if (set_status[SET_BASE] & SET_INSTALLED)
  		run_makedev();

 -	/* Save keybard type */
 -	save_kb_encoding();
 +	if (!update) {
 +		/* Save keybard type */
 +		save_kb_encoding();

 -	/* Other configuration. */
 -	mnt_net_config();
 +		/* Other configuration. */
 +		mnt_net_config();
 +	}

  	/* Mounted dist dir? */
  	umount_mnt2();

  	/* Install/Upgrade complete ... reboot or exit to script */


 --MP_/2muj.kxQrz.99u2RUvPZ+Em--

From: "Julian Fagir" <jdf@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/35538 CVS commit: src/distrib/utils/sysinst
Date: Mon, 9 Apr 2012 23:18:31 +0000

 Module Name:	src
 Committed By:	jdf
 Date:		Mon Apr  9 23:18:31 UTC 2012

 Modified Files:
 	src/distrib/utils/sysinst: util.c

 Log Message:
 Make sysinst not store the keyboard or network configuration used while
 upgrading, as issued by PR install/35538.


 To generate a diff of this commit:
 cvs rdiff -u -r1.176 -r1.177 src/distrib/utils/sysinst/util.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->feedback
State-Changed-By: jdf@NetBSD.org
State-Changed-When: Mon, 09 Apr 2012 23:23:05 +0000
State-Changed-Why:
Fix committed.


State-Changed-From-To: feedback->closed
State-Changed-By: jdf@NetBSD.org
State-Changed-When: Mon, 03 Sep 2012 18:31:29 +0000
State-Changed-Why:
No feedback


>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.