From owner-p4-projects@FreeBSD.ORG Mon Sep 25 12:36:16 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5AC7316A417; Mon, 25 Sep 2006 12:36:16 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2FA9416A403 for ; Mon, 25 Sep 2006 12:36:16 +0000 (UTC) (envelope-from soc-andrew@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C966C43D62 for ; Mon, 25 Sep 2006 12:36:06 +0000 (GMT) (envelope-from soc-andrew@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k8PCa6op096381 for ; Mon, 25 Sep 2006 12:36:06 GMT (envelope-from soc-andrew@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k8PCa3JQ096378 for perforce@freebsd.org; Mon, 25 Sep 2006 12:36:03 GMT (envelope-from soc-andrew@freebsd.org) Date: Mon, 25 Sep 2006 12:36:03 GMT Message-Id: <200609251236.k8PCa3JQ096378@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to soc-andrew@freebsd.org using -f From: soc-andrew To: Perforce Change Reviews Cc: Subject: PERFORCE change 106658 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Sep 2006 12:36:16 -0000 http://perforce.freebsd.org/chv.cgi?CH=106658 Change 106658 by soc-andrew@soc-andrew_serv on 2006/09/25 12:35:07 Update the BSDInstaller backend to a recent CVS snapshot Affected files ... .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/200_install.lua#3 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/400_configure.lua#3 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/500_create_geom_mirror.lua#1 add .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/600_upgrade.lua#3 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/800_netboot.lua#3 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/950_reboot.lua#2 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/Makefile#3 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/conf/BSDInstaller.lua#3 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/conf/DragonFly.lua#3 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/conf/FreeBSD.lua#2 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/conf/NetBSD.lua#2 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/conf/OpenBSD.lua#2 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/configure/100_choose_where_from.lua#3 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/configure/200_select_disk.lua#3 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/configure/300_select_part.lua#3 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/configure/400_mount_target_system.lua#3 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/configure/450_init_configuration.lua#2 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/configure/500_menu.lua#3 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/configure/550_write_configuration.lua#2 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/configure/600_unmount_target_system.lua#3 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/configure/main.lua#3 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/configure/menu/100_set_root_password.lua#3 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/configure/menu/200_add_user.lua#3 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/configure/menu/300_set_timezone.lua#3 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/configure/menu/350_set_datetime.lua#3 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/configure/menu/400_change_console_settings.lua#3 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/configure/menu/500_install_packages.lua#3 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/configure/menu/550_remove_packages.lua#3 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/install/100_welcome.lua#3 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/install/200_select_disk.lua#5 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/install/220_format_disk.lua#6 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/install/250_partition_disk.lua#7 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/install/270_install_bootblocks.lua#5 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/install/300_select_part.lua#5 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/install/400_select_subparts.lua#5 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/install/405_warn_omitted_subparts.lua#2 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/install/407_create_subparts.lua#4 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/install/410_select_additional_filesystems.lua#3 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/install/420_preselect_packages.lua#3 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/install/450_select_packages.lua#3 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/install/490_confirm_install_os.lua#2 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/install/500_install_os.lua#10 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/install/800_finished.lua#3 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/install/900_reboot.lua#3 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/install/main.lua#3 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/lib/Bitwise.lua#2 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/lib/Capacity.lua#2 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/lib/CmdChain.lua#2 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/lib/ConfigFile.lua#2 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/lib/Disk.lua#2 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/lib/Flow.lua#2 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/lib/FlowStep.lua#2 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/lib/Installation.lua#2 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/lib/InstallationUI.lua#2 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/lib/Menu.lua#2 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/lib/MenuItem.lua#2 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/lib/NavContainer.lua#2 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/lib/NavLeaf.lua#2 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/lib/Network.lua#2 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/lib/NetworkUI.lua#2 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/lib/Package.lua#2 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/lib/PackageGraph.lua#2 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/lib/PackageList.lua#2 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/lib/PackageSet.lua#2 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/lib/PackageUI.lua#2 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/lib/Partition.lua#2 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/lib/StorageSystem.lua#2 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/lib/StorageSystemUI.lua#2 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/lib/Subpartition.lua#2 edit .. //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/main.lua#4 edit Differences ... ==== //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/200_install.lua#3 (text+ko) ==== @@ -1,30 +1,34 @@ --- $Id: 200_install.lua,v 1.12 2005/08/30 00:39:05 cpressey Exp $ +-- $Id: 200_install.lua,v 1.13 2006/09/13 23:43:25 cpressey Exp $ -- --- Menu.Item scriptlet that generates the install menu item. +-- MenuItem scriptlet that generates the install menu item. -- Note that, if we detect that we weren't started from the -- installation media, we don't provide this menu item. -- -if not App.conf.booted_from_install_media then - return nil, "not booted from install media" +id = "install_os" +name = _("Install %s", App.conf.product.name) +short_desc = _("Install %s on this computer system", + App.conf.product.name) + +condition = function() + if not App.conf.booted_from_install_media then + return false, "not booted from install media" + end + return true end -return { - id = "install_os", - name = _("Install %s", App.conf.product.name), - short_desc = _("Install %s on this computer system", - App.conf.product.name), - effect = function() - -- - -- Make a recording of the install session. - -- XXX this might make more sense elsewhere, like as - -- Flow.Steps during the install itself? - -- - CmdChain.record_to(App.expand("${tmp}install-session.sh")) - App.descend("install") - CmdChain.stop_recording() +effect = function() + -- + -- Make a recording of the install session. + -- + -- XXX this might make more sense elsewhere, like as + -- a pair of FlowSteps at the beginning and end of the + -- install sequence itself? + -- + CmdChain.record_to(App.expand("${tmp}install-session.sh")) + App.descend("install") + CmdChain.stop_recording() - return Menu.CONTINUE - end -} + return Menu.CONTINUE +end ==== //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/400_configure.lua#3 (text+ko) ==== @@ -1,26 +1,25 @@ --- $Id: 400_configure.lua,v 1.7 2005/08/26 04:25:24 cpressey Exp $ +-- $Id: 400_configure.lua,v 1.8 2006/09/13 23:43:25 cpressey Exp $ + +id = "configure_installed_system" +name = _("Configure an Installed System") +short_desc = _("Configure an existing %s installation", + App.conf.product.name) -return { - id = "configure_installed_system", - name = _("Configure an Installed System"), - short_desc = _("Configure an existing %s installation", - App.conf.product.name), - effect = function() - -- - -- If there is currently a target system mounted, - -- unmount it before starting. - -- - if App.state.target ~= nil and App.state.target:is_mounted() then - if not App.state.target:unmount() then - App.ui:inform( - _("Warning: already-mounted target system could " .. - "not be correctly unmounted first.") - ) - return step:prev() - end +effect = function() + -- + -- If there is currently a target system mounted, + -- unmount it before starting. + -- + if App.state.target ~= nil and App.state.target:is_mounted() then + if not App.state.target:unmount() then + App.ui:inform( + _("Warning: already-mounted target system could " .. + "not be correctly unmounted first.") + ) + return step:prev() end + end - App.descend("configure") - return Menu.CONTINUE - end -} + App.descend("configure") + return Menu.CONTINUE +end ==== //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/600_upgrade.lua#3 (text+ko) ==== @@ -1,11 +1,10 @@ --- $Id: 600_upgrade.lua,v 1.2 2005/04/09 19:04:20 cpressey Exp $ +-- $Id: 600_upgrade.lua,v 1.3 2006/09/13 23:43:25 cpressey Exp $ + +id = "upgrade_installed_system" +name = _("Upgrade an Installed System") +short_desc = _("Upgrade a system with to the newest available version") -return { - id = "upgrade_installed_system", - name = _("Upgrade an Installed System"), - short_desc = _("Upgrade a system with to the newest available version"), - effect = function() - App.descend("upgrade") - return Menu.CONTINUE - end -} +effect = function() + App.descend("upgrade") + return Menu.CONTINUE +end ==== //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/800_netboot.lua#3 (text+ko) ==== @@ -1,12 +1,11 @@ --- $Id: 800_netboot.lua,v 1.3 2005/04/12 13:28:31 den Exp $ +-- $Id: 800_netboot.lua,v 1.4 2006/09/13 23:43:25 cpressey Exp $ + +id = "set_up_netboot" +name = _("Set Up NetBoot Server") +short_desc = _("Make this computer a boot server " .. + "for other machines on the network") -return { - id = "set_up_netboot", - name = _("Set Up NetBoot Server"), - short_desc = _("Make this computer a boot server " .. - "for other machines on the network"), - effect = function() - App.descend("netboot") - return Menu.CONTINUE - end -} +effect = function() + App.descend("netboot") + return Menu.CONTINUE +end ==== //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/950_reboot.lua#2 (text+ko) ==== @@ -1,17 +1,16 @@ --- $Id: 950_reboot.lua,v 1.2 2005/08/13 18:46:09 cpressey Exp $ +-- $Id: 950_reboot.lua,v 1.4 2006/09/13 23:43:25 cpressey Exp $ + +id = "reboot" +name = _("Reboot") +short_desc = _("Reboot this computer") -return { - id = "reboot", - name = _("Reboot"), - short_desc = _("Reboot this computer"), - effect = function() - if TargetSystemUI.ask_reboot{ - cancel_desc = _("Return to Select Task") -- XXX this_menu_name - } then - App.state.do_reboot = true - return nil - else - return Menu.CONTINUE - end +effect = function() + if App.state.source:ask_reboot{ + cancel_desc = _("Return to Select Task") -- XXX this_menu_name + } then + App.state.do_reboot = true + return nil + else + return Menu.CONTINUE end -} +end ==== //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/Makefile#3 (text+ko) ==== @@ -1,5 +1,5 @@ # Makefile for dfuibe_lua. -# $Id: Makefile,v 1.55 2005/08/27 08:04:49 cpressey Exp $ +# $Id: Makefile,v 1.56 2006/07/29 18:02:50 cpressey Exp $ BASE?=../.. include ${BASE}/Config @@ -37,7 +37,7 @@ test: su root -c "env LD_LIBRARY_PATH='../../lib/libaura:../../lib/libdfui:$(LUA)/lib' \ - LUA_PATH='../../lib/lua/?/?.lua;../../lib/lua/luasocket/lua/?.lua' \ + LUA_PATH='../../lib/lua/?/?.lua;../../lib/lua/luasocket/lua/?.lua;./lib/?.lua' \ LUA_CPATH='../../lib/lua/posix/?.so;../../lib/lua/pty/?.so;../../lib/lua/dfui/?.so;../../lib/lua/luasocket/?.so' \ $(LUA)/bin/lua -lcompat-5.1 main.lua \ ./conf/BSDInstaller.lua ./conf/${OSNAME}.lua \ ==== //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/conf/BSDInstaller.lua#3 (text+ko) ==== @@ -1,6 +1,6 @@ -- -- conf/BSDInstaller.lua --- $Id: BSDInstaller.lua,v 1.13 2005/10/05 21:29:03 cpressey Exp $ +-- $Id: BSDInstaller.lua,v 1.20 2006/09/04 18:01:33 cpressey Exp $ -- -- The monolithic default configuration file for the BSD Installer. -- @@ -154,7 +154,7 @@ ["usr/local"] = "etc/mtree/BSD.local.dist", ["usr/X11R6"] = "etc/mtree/BSD.x11-4.dist" } - + -- -- upgrade_items: similar to "install_items", except for upgrading purposes -- instead of initial installation. @@ -219,24 +219,29 @@ -- space on the device to install anything at all. -- -mountpoints = function(part_cap, ram_cap) +mountpoints = function(part_megs, ram_megs) -- -- First, calculate suggested swap size: -- - local swap = 2 * ram_cap - if ram_cap > (part_cap / 2) or part_cap < 4096 then - swap = ram_cap + local swap_megs = 2 * ram_megs + if ram_megs > (part_megs / 2) or part_megs < 4096 then + swap_megs = ram_megs end - swap = tostring(swap) .. "M" + swap = tostring(swap_megs) .. "M" + + -- + -- The megabytes available on disk for non-swap use. + -- + local avail_megs = part_megs - swap_megs -- -- Now, based on the capacity of the partition, -- return an appropriate list of suggested mountpoints. -- - if part_cap < 300 then + if avail_megs < 300 then return {} - elseif part_cap < 523 then + elseif avail_megs < 523 then return { { mountpoint = "/", capstring = "70M" }, { mountpoint = "swap", capstring = swap }, @@ -245,7 +250,7 @@ { mountpoint = "/usr", capstring = "174M" }, { mountpoint = "/home", capstring = "*" } } - elseif part_cap < 1024 then + elseif avail_megs < 1024 then return { { mountpoint = "/", capstring = "96M" }, { mountpoint = "swap", capstring = swap }, @@ -254,7 +259,7 @@ { mountpoint = "/usr", capstring = "256M" }, { mountpoint = "/home", capstring = "*" } } - elseif part_cap < 4096 then + elseif avail_megs < 4096 then return { { mountpoint = "/", capstring = "128M" }, { mountpoint = "swap", capstring = swap }, @@ -263,7 +268,7 @@ { mountpoint = "/usr", capstring = "512M" }, { mountpoint = "/home", capstring = "*" } } - elseif part_cap < 10240 then + elseif avail_megs < 10240 then return { { mountpoint = "/", capstring = "256M" }, { mountpoint = "swap", capstring = swap }, @@ -309,7 +314,7 @@ } -- --- limits: Limiting values specified by the installation; the most +-- limits: Limiting values specified by the installation; the most -- significant of these is the minimum disk space required to -- install the software. -- @@ -447,6 +452,7 @@ KLDLOAD = "sbin/kldload", KLDUNLOAD = "sbin/kldunload", KLDSTAT = "sbin/kldstat", + TUNEFS = "sbin/tunefs", TOUCH = "usr/bin/touch", YES = "usr/bin/yes", @@ -577,6 +583,16 @@ offlimits_devices = { "fd%d+", "md%d+", "cd%d+" } -- +-- extra_devices: devices which the installer should consider installing +-- onto, even though it might not detect them through normal means. This +-- should not generally be needed, and should be reserved for debugging. +-- These are not Lua regexps; they are plain device names that include the +-- device number (e.g. "vn0".) +-- + +extra_devices = { } + +-- -- has_softupdates: whether the operating system supports creating -- a filesystem with softupdates, i.e. the -U flag to newfs. -- @@ -592,6 +608,33 @@ window_subpartitions = { "c" } +-- +-- offlimits_mounts: BSDInstaller will ignore these mount points. +-- +-- example: offlimits_mounts = { "unionfs" } +-- + +offlimits_mounts = { } + +-- +-- needs_makedev: if true, the operating system needs to run the MAKEDEV +-- script for accessing a device node to ensure that it exists. If false, +-- the OS has a devfs or similar and doesn't need to run MAKEDEV. +-- + +needs_makedev = true + +-- +-- disklabel_offset: the number of sectors away from the beginning of the +-- disk (or partition) that the disklabel should start at. Different OSes +-- have different preferred values for this: +-- +-- DragonFlyBSD starts at an offset of 0, whereas bsdlabel on FreeBSD +-- suggests a starting point of 16. Net/Open starts at an offset of 32. +-- + +disklabel_offset = 0 + ------------------------------------------------------------------- -- Natural Language Services (NLS) ------------------------------------------------------------------- @@ -652,4 +695,3 @@ -- fatal_errors = false - ==== //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/conf/DragonFly.lua#3 (text+ko) ==== @@ -1,6 +1,6 @@ -- -- conf/DragonFly.lua --- $Id: DragonFly.lua,v 1.8 2005/12/21 22:49:26 cpressey Exp $ +-- $Id: DragonFly.lua,v 1.11 2006/09/04 18:01:33 cpressey Exp $ -- -- This file contains DragonFly-specific overrides to BSDInstaller.lua. -- @@ -60,4 +60,6 @@ disklabel_on_disk = false has_softupdates = true window_subpartitions = { "c" } +needs_makedev = true +disklabel_offset = 0 use_cpdup = true ==== //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/conf/FreeBSD.lua#2 (text+ko) ==== @@ -1,6 +1,6 @@ -- -- conf/FreeBSD.lua --- $Id: FreeBSD.lua,v 1.7 2005/09/16 22:41:10 cpressey Exp $ +-- $Id: FreeBSD.lua,v 1.11 2006/09/04 18:01:33 cpressey Exp $ -- -- This file contains FreeBSD-specific overrides to BSDInstaller.lua. -- @@ -50,7 +50,7 @@ } sysids = { - { "FreeBSD/DragonFly", 165 }, + { "FreeBSD", 165 }, { "OpenBSD", 166 }, { "NetBSD", 169 }, { "MS-DOS", 15 }, @@ -65,4 +65,6 @@ disklabel_on_disk = false has_softupdates = true window_subpartitions = { "c" } +needs_makedev = false +disklabel_offset = 16 use_cpdup = false ==== //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/conf/NetBSD.lua#2 (text+ko) ==== @@ -1,6 +1,6 @@ -- -- conf/NetBSD.lua --- $Id: NetBSD.lua,v 1.8 2005/08/27 20:24:59 cpressey Exp $ +-- $Id: NetBSD.lua,v 1.11 2006/09/04 18:01:33 cpressey Exp $ -- -- This file contains NetBSD-specific overrides to conf/BSDInstaller.lua. -- @@ -61,4 +61,6 @@ has_softupdates = false window_subpartitions = { "c", "d" } enable_crashdumps = false +needs_makedev = true +disklabel_offset = 32 use_cpdup = false ==== //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/conf/OpenBSD.lua#2 (text+ko) ==== @@ -1,6 +1,6 @@ -- -- conf/OpenBSD.lua --- $Id: OpenBSD.lua,v 1.5 2005/08/27 20:24:59 cpressey Exp $ +-- $Id: OpenBSD.lua,v 1.8 2006/09/04 18:01:33 cpressey Exp $ -- -- This file contains OpenBSD-specific overrides to conf/BSDInstaller.lua. -- @@ -31,4 +31,6 @@ disklabel_on_disk = true has_softupdates = false window_subpartitions = { "c", "d" } +needs_makedev = true +disklabel_offset = 32 use_cpdup = false ==== //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/configure/100_choose_where_from.lua#3 (text+ko) ==== @@ -1,4 +1,4 @@ --- $Id: 100_choose_where_from.lua,v 1.16 2005/08/30 00:39:05 cpressey Exp $ +-- $Id: 100_choose_where_from.lua,v 1.18 2006/09/13 23:43:25 cpressey Exp $ -- -- Allow the user to select which system to configure. @@ -9,57 +9,61 @@ -- we skip straight to selecting which disk/partition to configure. -- -if App.conf.booted_from_install_media then - return nil, "was booted from install media" + +id = "choose_target_system" +name = _("Choose Target System") + +condition = function() + if App.conf.booted_from_install_media then + return false, "was booted from install media" + else + return true + end end -return { - id = "choose_target_system", - name = _("Choose Target System"), - effect = function(step) - -- - -- If the user has already selected a TargetSystem (e.g. they are - -- coming here directly from the end of an install,) skip ahead. - -- - if App.state.target ~= nil then - return step:next() - end +effect = function(step) + -- + -- If the user has already selected an Installation (e.g. they are + -- coming here directly from the end of an install,) skip ahead. + -- + if App.state.target ~= nil then + return step:next() + end - -- - -- Ask the user where to configure. - -- - local action_id = App.ui:present({ - id = "choose_target_system", - name = _("Choose Target System"), - short_desc = _( - "Please choose which installed system you want to configure." - ), - actions = { - { - id = "this", - name = _("Configure the Running System") - }, - { - id = "disk", - name = _("Configure a System on Disk") - }, - { - id = "cancel", - accelerator = "ESC", - name = _("Return to %s", step:get_prev_name()), - } - }, - role = "menu" - }).action_id + -- + -- Ask the user where to configure. + -- + local action_id = App.ui:present({ + id = "choose_target_system", + name = _("Choose Target System"), + short_desc = _( + "Please choose which installed system you want to configure." + ), + actions = { + { + id = "this", + name = _("Configure the Running System") + }, + { + id = "disk", + name = _("Configure a System on Disk") + }, + { + id = "cancel", + accelerator = "ESC", + name = _("Return to %s", step:get_prev_name()), + } + }, + role = "menu" + }).action_id - if action_id == "cancel" then - return step:prev() - elseif action_id == "disk" then - return step:next() - else -- "this" - App.state.target = App.state.source - -- Jump straight to the menu. - return "configuration_menu" - end + if action_id == "cancel" then + return step:prev() + elseif action_id == "disk" then + return step:next() + else -- "this" + App.state.target = App.state.source + -- Jump straight to the menu. + return "configuration_menu" end -} +end ==== //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/configure/200_select_disk.lua#3 (text+ko) ==== @@ -1,57 +1,56 @@ --- $Id: 200_select_disk.lua,v 1.15 2005/08/26 04:25:24 cpressey Exp $ +-- $Id: 200_select_disk.lua,v 1.18 2006/09/13 23:43:25 cpressey Exp $ -- -- Allow the user to select the disk where the OS installation -- they want to configure resides. -- -return { - id = "select_disk", - name = _("Select Disk"), - req_state = { "storage" }, - effect = function(step) - -- - -- If the user has already selected a TargetSystem (e.g. they are - -- coming here directly from the end of an install,) skip ahead. - -- - if App.state.target ~= nil then - return step:next() - end +id = "select_disk" +name = _("Select Disk") +req_state = { "storage" } + +effect = function(step) + -- + -- If the user has already selected an Installation (e.g. they are + -- coming here directly from the end of an install,) skip ahead. + -- + if App.state.target ~= nil then + return step:next() + end - -- - -- Allow the user to select a disk. - -- - App.state.sel_disk = nil - App.state.sel_part = nil + -- + -- Allow the user to select a disk. + -- + App.state.sel_disk = nil + App.state.sel_part = nil - -- XXX there might be a better place to handle this. - if App.state.storage:get_disk_count() == 0 then - App.ui:inform(_( - "The installer could not find any suitable disks " .. - "attached to this computer. If you wish to " .. - "configure an installation of %s " .. - "on an unorthodox storage device, you will have to " .. - "exit to a %s command prompt and configure it " .. - "manually, using the file /README as a guide.", - App.conf.product.name, App.conf.media_name) - ) - return nil - end + -- XXX there might be a better place to handle this. + if App.state.storage:get_disk_count() == 0 then + App.ui:inform(_( + "The installer could not find any suitable disks " .. + "attached to this computer. If you wish to " .. + "configure an installation of %s " .. + "on an unorthodox storage device, you will have to " .. + "exit to a %s command prompt and configure it " .. + "manually, using the file /README as a guide.", + App.conf.product.name, App.conf.media_name) + ) + return nil + end - local dd = StorageUI.select_disk({ - sd = App.state.storage, - short_desc = _( - "Select the disk on which the installation of %s " .. - "that you wish to configure resides.", - App.conf.product.name), - cancel_desc = _("Return to %s", step:get_prev_name()) - }) + local dd = App.state.storage:select_disk{ + short_desc = _( + "Select the disk on which the installation of %s " .. + "that you wish to configure resides.", + App.conf.product.name + ), + cancel_desc = _("Return to %s", step:get_prev_name()) + } - if dd then - App.state.sel_disk = dd - return step:next() - else - return step:prev() - end + if dd then + App.state.sel_disk = dd + return step:next() + else + return step:prev() end -} +end ==== //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/configure/300_select_part.lua#3 (text+ko) ==== @@ -1,52 +1,51 @@ --- $Id: 300_select_part.lua,v 1.13 2005/08/26 04:25:24 cpressey Exp $ +-- $Id: 300_select_part.lua,v 1.17 2006/09/13 23:43:25 cpressey Exp $ -- -- Allow the user to select the BIOS partition where the OS -- they want to configure resides. -- -return { - id = "select_part", - name = _("Select Partition"), - req_state = { "storage", "sel_disk" }, - effect = function(step) - -- - -- If the user has already selected a TargetSystem (e.g. they are - -- coming here directly from the end of an install,) skip ahead. - -- - if App.state.target ~= nil then - return step:next() - end +id = "select_part" +name = _("Select Partition") +req_state = { "storage", "sel_disk" } - -- - -- Allow the user to select a partition. - -- - App.state.sel_part = nil - local pd = StorageUI.select_part({ - dd = App.state.sel_disk, - short_desc = _( - "Select the primary partition of %s " .. - "on which the installation of %s resides.", - App.state.sel_disk:get_name(), - App.conf.product.name), - cancel_desc = _("Return to %s", step:get_prev_name()) - }) +effect = function(step) + -- + -- If the user has already selected an Installation (e.g. they are + -- coming here directly from the end of an install,) skip ahead. + -- + if App.state.target ~= nil then + return step:next() + end - if pd then - if pd:is_mounted() then - App.ui:inform(_( - "One or more subpartitions on the selected " .. - "primary partition already in use (they are " .. - "currently mounted in the filesystem.) " .. - "You should unmount them before proceeding." - )) - return step - end + -- + -- Allow the user to select a partition. + -- + App.state.sel_part = nil + local pd = App.state.sel_disk:select_part{ + short_desc = _( + "Select the primary partition of %s " .. + "on which the installation of %s resides.", + App.state.sel_disk:get_name(), + App.conf.product.name + ), + cancel_desc = _("Return to %s", step:get_prev_name()) + } - App.state.sel_part = pd - return step:next() - else - return step:prev() + if pd then + if pd:is_mounted() then + App.ui:inform(_( + "One or more subpartitions on the selected " .. + "primary partition already in use (they are " .. + "currently mounted in the filesystem.) " .. + "You should unmount them before proceeding." + )) + return step end + + App.state.sel_part = pd + return step:next() + else + return step:prev() end -} +end ==== //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/configure/400_mount_target_system.lua#3 (text+ko) ==== @@ -1,48 +1,47 @@ --- $Id: 400_mount_target_system.lua,v 1.22 2005/08/04 22:00:40 cpressey Exp $ +-- $Id: 400_mount_target_system.lua,v 1.24 2006/09/13 23:43:25 cpressey Exp $ -- -- Mount the chosen system as the target system for configuration. -- -return { - id = "mount_target_system", - name = _("Mount Target System"), - interactive = false, - req_state = { "storage", "sel_disk", "sel_part" }, - effect = function(step) - -- - -- If the user has already mounted a TargetSystem (e.g. they are - -- coming here directly from the end of an install,) skip ahead. - -- - if App.state.target ~= nil and App.state.target:is_mounted() then - return step:next() - end +id = "mount_target_system" +name = _("Mount Target System") +interactive = false +req_state = { "storage", "sel_disk", "sel_part" } - App.state.target = TargetSystem.new{ - partition = App.state.sel_part, - base = "mnt" - } - local ok, errmsg = App.state.target:probe() - if not ok then - App.log(errmsg) - App.ui:inform(_( - "The target system could not be successfully probed:\n\n%s", - errmsg - )) - App.state.target = nil - return step:prev() - end - local ok, errmsg = App.state.target:mount() - if not ok then - App.log(errmsg) - App.ui:inform(_( - "The target system could not be successfully mounted:\n\n%s", - errmsg - )) - App.state.target = nil - return step:prev() - end +effect = function(step) + -- + -- If the user has already mounted an Installation (e.g. they are + -- coming here directly from the end of an install,) skip ahead. + -- + if App.state.target ~= nil and App.state.target:is_mounted() then + return step:next() + end - return step:next() + App.state.target = InstallationUI.new{ + partition = App.state.sel_part, + base = "mnt" + } + local ok, errmsg = App.state.target:probe() + if not ok then + App.log(errmsg) + App.ui:inform(_( + "The target system could not be successfully probed:\n\n%s", + errmsg + )) + App.state.target = nil + return step:prev() + end + local ok, errmsg = App.state.target:mount() + if not ok then + App.log(errmsg) + App.ui:inform(_( + "The target system could not be successfully mounted:\n\n%s", + errmsg + )) + App.state.target = nil + return step:prev() end -} + + return step:next() +end ==== //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/configure/450_init_configuration.lua#2 (text+ko) ==== @@ -1,18 +1,15 @@ --- $Id: 450_init_configuration.lua,v 1.1 2005/07/12 21:15:05 cpressey Exp $ +-- $Id: 450_init_configuration.lua,v 1.3 2006/09/13 23:43:25 cpressey Exp $ -- -- Initialize the configuration variables. -- -return { - id = "init_configuation", - name = _("Initialize Configuration"), - interactive = false, - req_state = { "storage", "sel_disk", "sel_part" }, - effect = function(step) +id = "init_configuation" +name = _("Initialize Configuration") +interactive = false +req_state = { "storage", "sel_disk", "sel_part" } - App.state.rc_conf = ConfigVars.new() - - return step:next() - end -} +effect = function(step) + App.state.rc_conf = ConfigFile.new() + return step:next() +end ==== //depot/projects/soc2005/bsdinstaller/src/contrib/bsdinstaller/backend/lua/configure/500_menu.lua#3 (text+ko) ==== @@ -1,15 +1,14 @@ --- $Id: 500_menu.lua,v 1.8 2005/07/08 21:24:09 cpressey Exp $ +-- $Id: 500_menu.lua,v 1.9 2006/09/13 23:43:25 cpressey Exp $ -- -- Display the configuration menu. -- -return { - id = "configuration_menu", - name = _("Configuration Menu"), - req_state = { "target" }, - effect = function(step) - App.descend("menu") - return step:next() - end -} +id = "configuration_menu" +name = _("Configuration Menu") +req_state = { "target" } + +effect = function(step) >>> TRUNCATED FOR MAIL (1000 lines) <<<