From owner-cvs-src@FreeBSD.ORG Wed Jun 6 07:38:02 2007 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A6AB316A46B; Wed, 6 Jun 2007 07:38:02 +0000 (UTC) (envelope-from ceri@submonkey.net) Received: from shrike.submonkey.net (cpc3-cdif2-0-0-cust64.cdif.cable.ntl.com [81.106.128.65]) by mx1.freebsd.org (Postfix) with ESMTP id 5189E13C4C6; Wed, 6 Jun 2007 07:38:02 +0000 (UTC) (envelope-from ceri@submonkey.net) Received: from ceri by shrike.submonkey.net with local (Exim 4.67 (FreeBSD)) (envelope-from ) id 1Hvq5g-000CJm-Gf; Wed, 06 Jun 2007 08:38:00 +0100 Date: Wed, 6 Jun 2007 08:38:00 +0100 From: Ceri Davies To: "M. Warner Losh" Message-ID: <20070606073800.GD1834@submonkey.net> References: <200706050544.l555ifKp014690@repoman.freebsd.org> <20070605190601.GC1834@submonkey.net> <20070605.161442.1723940823.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="lMM8JwqTlfDpEaS6" Content-Disposition: inline In-Reply-To: <20070605.161442.1723940823.imp@bsdimp.com> X-PGP: finger ceri@FreeBSD.org User-Agent: Mutt/1.5.15 (2007-04-06) Sender: Ceri Davies Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, delphij@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.sbin/sysinstall installUpgrade.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jun 2007 07:38:02 -0000 --lMM8JwqTlfDpEaS6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jun 05, 2007 at 04:14:42PM -0600, M. Warner Losh wrote: > In message: <20070605190601.GC1834@submonkey.net> > Ceri Davies writes: > : On Tue, Jun 05, 2007 at 05:44:41AM +0000, Xin LI wrote: > : > delphij 2007-06-05 05:44:41 UTC > : >=20 > : > FreeBSD src repository > : >=20 > : > Modified files: > : > usr.sbin/sysinstall installUpgrade.c=20 > : > Log: > : > Write to slice name instead of directly to the disk device. > : > This fixes writing boot code upon upgrade. > :=20 > : > | @@ -363,7 +363,7 @@ media: > : > | } > : > | =20 > : > | if (extractingBin) > : > | - vsystem("disklabel -B `awk '$2~/\\/$/ {print substr($1, 6, 3)}' /= etc/fstab`"); > : > | + vsystem("disklabel -B `awk '$2~/\\/$/ {print substr($1, 6, 5)}' /= etc/fstab`"); > : > | msgNotify("First stage of upgrade completed successfully!\n\n" > : > | "Next comes stage 2, where we attempt to resurrect your /e= tc\n" > : > | "directory!"); > :=20 > : Well it doesn't fix anything actually; what if my root partition is ad1= 2s2a ? > : (which is not contrived; it is). > :=20 > : We actually need something more like: > :=20 > : vsystem("disklabel -B `awk \ > : '$1~/\\dev\\/(aacd|ad|afd|amrd|ar|da|idad|ipsd|mfid|mlxd|twed= )/ && \ > : $2~/\\/$/ {print substr($1, 1, index($1, \"s\") - 1)}' /etc/= fstab`"); > :=20 > : where the regex is built from every device name in device_names (which > : even then doesn't cater for GEOM where devices might be called > : anything). This is something that would require a build tool, which is > : why I haven't done it yet. >=20 > "mmcsd" is also a disk. It should be added to the device_names array in sysinstall/devices.c. Ceri --=20 That must be wonderful! I don't understand it at all. -- Moliere --lMM8JwqTlfDpEaS6 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFGZmRYocfcwTS3JF8RAlt6AJ0YMmSWIJELDB9UHWsQfEKpy9XqRwCgvFDj Hdk84vg7l15UPr1ehwn2m4E= =SHiM -----END PGP SIGNATURE----- --lMM8JwqTlfDpEaS6--