cvs commit: src/usr.sbin/sysinstall installUpgrade.c

Ceri Davies ceri at submonkey.net
Wed Jun 6 07:38:02 UTC 2007


On Tue, Jun 05, 2007 at 04:14:42PM -0600, M. Warner Losh wrote:
> In message: <20070605190601.GC1834 at submonkey.net>
>             Ceri Davies <ceri at submonkey.net> writes:
> : On Tue, Jun 05, 2007 at 05:44:41AM +0000, Xin LI wrote:
> : > delphij     2007-06-05 05:44:41 UTC
> : > 
> : >   FreeBSD src repository
> : > 
> : >   Modified files:
> : >     usr.sbin/sysinstall  installUpgrade.c 
> : >   Log:
> : >   Write to slice name instead of directly to the disk device.
> : >   This fixes writing boot code upon upgrade.
> : 
> : > | @@ -363,7 +363,7 @@ media:
> : > |      }
> : > |  
> : > |      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/fstab`");
> : 
> : 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.
> 
> "mmcsd" is also a disk.

It should be added to the device_names array in sysinstall/devices.c.

Ceri
-- 
That must be wonderful!  I don't understand it at all.
                                                  -- Moliere
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/cvs-src/attachments/20070606/a7a6da15/attachment.pgp


More information about the cvs-src mailing list