From owner-freebsd-bugs@FreeBSD.ORG Tue Dec 5 14:30:11 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6743416A407 for ; Tue, 5 Dec 2006 14:30:11 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7A01143CAA for ; Tue, 5 Dec 2006 14:29:31 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id kB5EUA89043503 for ; Tue, 5 Dec 2006 14:30:10 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id kB5EUANs043496; Tue, 5 Dec 2006 14:30:10 GMT (envelope-from gnats) Resent-Date: Tue, 5 Dec 2006 14:30:10 GMT Resent-Message-Id: <200612051430.kB5EUANs043496@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, n-kogane@syd.odn.ne.jp Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B25AD16A416 for ; Tue, 5 Dec 2006 14:28:15 +0000 (UTC) (envelope-from n-kogane@syd.odn.ne.jp) Received: from cmta101.odn.ne.jp (mta101.odn.ne.jp [143.90.14.133]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9280B43CA2 for ; Tue, 5 Dec 2006 14:27:35 +0000 (GMT) (envelope-from n-kogane@syd.odn.ne.jp) Received: from vmta101.odn.ne.jp by cmta101.odn.ne.jp with ESMTP id <20061205142812673.IJAV.10260.cmta101.odn.ne.jp@mta101.odn.ne.jp> for ; Tue, 5 Dec 2006 23:28:12 +0900 Received: from emta101.odn.ne.jp by vmta101.odn.ne.jp with ESMTP id <20061205142812627.BXXA.12721.vmta101.odn.ne.jp@mta101.odn.ne.jp> for ; Tue, 5 Dec 2006 23:28:12 +0900 Received: from kcesx30.koganemaru.co.jp ([210.252.255.63] [210.252.255.63]) by emta101.odn.ne.jp with ESMTP id <20061205142812534.VGGV.2510.emta101.odn.ne.jp@mta101.odn.ne.jp> for ; Tue, 5 Dec 2006 23:28:12 +0900 Received: by kcesx30.koganemaru.co.jp (Postfix, from userid 100) id DD55E2843D; Tue, 5 Dec 2006 23:27:53 +0900 (JST) Message-Id: <20061205142753.DD55E2843D@kcesx30.koganemaru.co.jp> Date: Tue, 5 Dec 2006 23:27:53 +0900 (JST) From: n-kogane@syd.odn.ne.jp To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: misc/106376: can't upgrade install if /boot/kernel.prev exit X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: n-kogane@syd.odn.ne.jp List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2006 14:30:11 -0000 >Number: 106376 >Category: misc >Synopsis: can't upgrade install if /boot/kernel.prev exit >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Dec 05 14:30:09 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Nobuyuki Koganemaru >Release: FreeBSD 6.2-RC1 i386 >Organization: KOGANEMARU Computer Engineering Service Corporation. >Environment: System: FreeBSD kcesx34.koganemaru.co.jp 6.2-RC1 FreeBSD 6.2-RC1 #0: Thu Nov 16 05:12:08 UTC 2006 root@opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 >Description: The kernel of old FreeBSD was /kernel, and it was possible to move with "mv /kernel /kernel.prev". It was overwrited if /kernel.prev existed. Currently, /boot/kernel.prev is a directory, and when already /boot/kernel.prev exists, it becomes an error in "mv /boot/kernel /boot/kernel.prev". It is necessary to remove "/boot/kernel.prev" before it moves. >How-To-Repeat: When /boot/kernel.prev exit, do upgrade install. >Fix: I not tested, but perhaps ok. --- usr.sbin/sysinstall/installUpgrade.c.orig Tue Jul 18 07:25:29 2006 +++ usr.sbin/sysinstall/installUpgrade.c Tue Dec 5 23:07:31 2006 @@ -301,6 +301,11 @@ if (directory_exists("/boot/kernel")) { msgNotify("Moving old kernel to /boot/kernel.prev"); + if (directory_exists("/boot/kernel.prev")) { + if (system("rm -rf /boot/kernel.prev")) { + msgConfirm("Can't remove /boot/kernel.prev!"); + } + } if (system("mv /boot/kernel /boot/kernel.prev")) { if (!msgYesNo("Hmmm! I couldn't move the old kernel over! Do you want to\n" "treat this as a big problem and abort the upgrade? Due to the\n" >Release-Note: >Audit-Trail: >Unformatted: