Date: Tue, 5 Jun 2007 20:06:01 +0100 From: Ceri Davies <ceri@submonkey.net> To: Xin LI <delphij@FreeBSD.org> Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.sbin/sysinstall installUpgrade.c Message-ID: <20070605190601.GC1834@submonkey.net> In-Reply-To: <200706050544.l555ifKp014690@repoman.freebsd.org> References: <200706050544.l555ifKp014690@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--NMuMz9nt05w80d4+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. > | @@ -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 /etc\n" > | "directory!"); Well it doesn't fix anything actually; what if my root partition is ad12s2a= ? (which is not contrived; it is). We actually need something more like: 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/fsta= b`"); 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. Ceri --=20 That must be wonderful! I don't understand it at all. -- Moliere --NMuMz9nt05w80d4+ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFGZbQZocfcwTS3JF8RApPRAJ0dqAE+de6wB0paWL3bt6ujoRuzKwCgg5Xn f+s3KOi97Z2eeEx/5wcQvTE= =YNDo -----END PGP SIGNATURE----- --NMuMz9nt05w80d4+--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070605190601.GC1834>