Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Dec 2005 20:50:03 GMT
From:      soc-andrew <soc-andrew@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 88142 for review
Message-ID:  <200512132050.jBDKo3Lu086050@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=88142

Change 88142 by soc-andrew@soc-andrew_serv on 2005/12/13 20:49:03

	Allow boot1 to be used rather than boot0

Affected files ...

.. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/install/270_install_bootblocks.lua#2 edit
.. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/lib/storage.lua#5 edit

Differences ...

==== //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/install/270_install_bootblocks.lua#2 (text+ko) ====

@@ -21,6 +21,7 @@
 		local dataset = {
 			disk = raw_name,
 			boot0cfg = "Y",
+			boot0 = "Y",
 			packet = "N"
 		}
 
@@ -72,6 +73,12 @@
 		    control = "checkbox"
 		},
 		{
+		    id = "boot0",
+		    name = _("Use boot menu?"),
+		    short_desc = _("Install the boot0 menu bootblock"),
+		    control = "checkbox"
+		},
+		{
 		    id = "packet",
 		    name = _("Packet mode?"),
 		    short_desc = _("Select this to use 'packet mode' to boot the disk"),
@@ -109,6 +116,7 @@
 			if dataset.boot0cfg == "Y" then
 				dd = disk_ref[dataset.disk]
 				dd:cmds_install_bootblock(cmds,
+				    (dataset.boot0 == "Y"),
 				    (dataset.packet == "Y"))
 			end
 		end

==== //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/lib/storage.lua#5 (text+ko) ====

@@ -1111,7 +1111,18 @@
 	--
 	-- Create commands to install a bootblock on this disk.
 	--
-	method.cmds_install_bootblock = function(self, cmds, packet_mode)
+	method.cmds_install_bootblock = function(self, cmds, use_boot0, packet_mode)
+		if not use_boot0 then
+			cmds:add(
+			    {
+				cmdline = "${root}${YES} | ${root}${FDISK} -B " ..
+				self:get_raw_device_name(),
+				failure = CmdChain.FAILURE_WARN,
+				tag = self
+			    })
+			return
+		end
+
 		local o = " "
 		local s = " "
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200512132050.jBDKo3Lu086050>