Index: Makefile
===================================================================
RCS file: /home/dcvs/src/Makefile,v
retrieving revision 1.21
diff -u -r1.21 Makefile
--- Makefile 25 Jan 2007 18:46:01 -0000 1.21
+++ Makefile 14 Jul 2007 18:28:32 -0000
@@ -182,6 +182,12 @@
@cd ${.CURDIR}/etc; make -m ${.CURDIR}/share/mk upgrade_etc
#
+# allow direct creation of iso image from /usr/src
+#
+iso:
+ @cd ${.CURDIR}/nrelease; make -m ${.CURDIR}/share/mk installer_release
+
+#
# Convenient targets for use by the CVS repository meister.
#
update_preview_tag: iamoncrater
Index: contrib/bsdinstaller/COPYRIGHT
===================================================================
RCS file: contrib/bsdinstaller/COPYRIGHT
diff -N contrib/bsdinstaller/COPYRIGHT
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/COPYRIGHT 22 Dec 2005 02:42:52 -0000
@@ -0,0 +1,42 @@
+$Id: COPYRIGHT,v 1.2 2005/12/22 02:42:52 cpressey Exp $
+
+Copyright information and license conditions that apply to files in
+this collection are specified in each individual file.
+
+Where a file does not include copyright information, and where there is
+no other file (for example a README) giving copyright information for it,
+it is understood that the copyright is held by that file's author(s).
+
+Where a file does not include license conditions, and where there is
+no other file (for example a README) giving copyright information for it,
+it is understood that it is covered under the following ("BSD") license:
+
+
+ Copyright (c)2005 . All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notices, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notices, this list of conditions, and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+ 3. Neither the names of the copyright holders nor the names of their
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
Index: contrib/bsdinstaller/Makefile
===================================================================
RCS file: contrib/bsdinstaller/Makefile
diff -N contrib/bsdinstaller/Makefile
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/Makefile 14 Jul 2007 18:26:40 -0000
@@ -0,0 +1,16 @@
+# Make everything.
+# $Id: Makefile,v 1.11 2005/08/29 20:41:52 cpressey Exp $
+
+# Order matters here.
+
+all:
+ (cd src && ${MAKE} all)
+
+nls:
+ (cd src && ${MAKE} nls)
+
+clean:
+ (cd src && ${MAKE} clean)
+
+distribution:
+ (cd src && ${MAKE} distribution)
Index: contrib/bsdinstaller/docs/installer_article.txt
===================================================================
RCS file: contrib/bsdinstaller/docs/installer_article.txt
diff -N contrib/bsdinstaller/docs/installer_article.txt
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/docs/installer_article.txt 29 Apr 2005 23:05:50 -0000
@@ -0,0 +1,140 @@
+The BSD Installer
+written by Chris Pressey and Scott Ullrich
+
+History
+-------
+
+The BSD Installer project started life on DragonFly BSD, and
+although it still maintains close ties to DragonFly, it is now
+a full-fledged project in its own right, used in other open-source
+distributions such as FreeSBIE and pfSense.
+
+Originally, DragonFly LiveCD's came only with a set of instructions
+in a README file for manually installing DragonFly on your computer -
+basically, formatting the hard drive appropriately, and then copying
+the contents of the CD-ROM onto the hard drive.
+
+This is a very useful and effective method, and one that is still
+possible to perform even today, with DragonFly 1.2. It provides
+the most power and flexibility to the user doing the installation.
+
+However, it also involves issuing a lot of commands, some of which
+(like using disklabel to set up BSD partitions on the disk) are
+fairly obscure. Also, there are few safety measures - if you
+accidentally type ad1s3 when you meant ad1s2, you could end up
+overwriting your install of Windows NT without even a suggestion
+from the computer that you are doing something dangerous.
+
+For that reason, several members of the DragonFly community decided
+that it would be nice to have something which was a little less
+intimidating to people who have not mastered BSD disk systems,
+and a little less nerve-wracking even for people who are.
+
+When we started to search for solutions we where well aware of
+FreeBSD's 'sysinstall' program, which was inherited but not used by
+DragonFly. With the advent of a LiveCD as a install medium, it has been
+retired. We were also well aware that sysinstall was starting to show
+its age and wanted something that could be as simple and
+straightforward as the good parts of sysinstall, while avoiding what we
+saw as the bad parts of sysinstall altogether. At the same time, we
+wanted a code base that was easier to manage than sysinstall's.
+
+So, the installer team started with the instructions listed in the
+README and set about writing a system to automate them.
+
+Design
+------
+
+One of the most prominent design constraints is that we did not want to
+be tied down to one particular user interface. Some people liked
+the console-based interface of sysinstall, some preferred a web-based
+frontend, while still others wanted a GUI, running perhaps under
+X Windows. In order to achieve this sort of radical interface
+independence, a user interaction abstraction layer, called DFUI, was
+established. It reduced the complexities of interacting with the
+user to an extremely small set of simple actions such as presenting a
+form with some informative text, some fill-out fields, and some buttons.
+
+Another design constraint which was present from the beginning was that
+the system should be robust. For this reason, we had the frontend
+(user interface component) and backend (install logic component) of
+the DFUI layer run in seperate UNIX processes. If one process crashes,
+this does cause the other process to crash; in some instance, the
+first process can even be restarted, and the user can pick up where they
+left off. (Ideally, of course, we want a system that never ever crashes
+at all; but this is reality, and some concessions have be made. Most of
+all, we didn't want a failure mode that made the user reboot, as we
+felt this was one sure way to discourage potential adopters.)
+
+This approach extended to how the install logic itself worked.
+At one point, we considered writing a library of C source code for
+manipulating the user's hard drive, like sysinstall had. However,
+one of the nicer things about DragonFly's distribution is that it comes
+on a LiveCD which boots into a real version of the operating system,
+with all tools available. We could, then, use these tools from the
+installer, without having to rewrite anything. As a bonus, they would
+operate in seperate UNIX processes, isolated from crashes; and being
+standard BSD tools, the installation process would closely resemble the
+instructions in the README, and (hopefully) be less mysterious to
+anyone interested in how it works.
+
+Features
+--------
+
+- Multiple protocol support
+The BSD Installer supports TCP/IP, Named Pipes or CAPS
+(DragonFly specific protocol) for backend and frontend communication.
+
+- NetBoot Installation Services
+
+NetBoot allows for PXE Netbooting of hosts over the network. With
+the flip of a button NetBoot installation services will configure
+tftpd, nfs and dhcpd to allow for transparent booting from PXE over
+the network. The machine can launch the installer or use the LiveCD
+normally.
+
+- NCurses Installation
+By default The BSD Installer uses a NCurses based text installer similar
+to FreeBSD's sysinstall. The NCurses based frontend is written in C.
+
+- CGI Installation
+
+The CGI Installer is written in C and uses THTTPD as its web server.
+A number of custom "widgets" where created to help match LibDFUI
+including a Add, Edit and Delete button helper.
+
+- QT Based Installation
+
+BSD Installer also features a QT Based frontend that can be used
+with a Xorg or XFree equipped LiveCD. Work is starting back up
+to improve the appearance of the QT frontend but it is operational
+as is at the moment.
+
+- PFI (Pre-Flight Installer)
+
+Pre-Flight Installer allows for the tweaking of the LiveCD
+environment and Installer settings. For example you can
+stick a pfi.conf file on a removable media device and PFI
+will automatically detect the file and make the necessary
+changes. Many items can be set using this method
+including root passwords, ssh settings, installer frontends
+and many other features.
+
+Future
+------
+
+- Lua
+
+The "new" version of BSD Installer is built on C libarries and Lua.
+Lua is a great language that really allows for a lot of flexibility
+and customizations by 3rd parties wishing to utilize BSD Installer
+as the starting point for their project. Work is actively ongoing
+to finish the Lua based installer and its starting to really shape
+up rapidly. The Lua based backend will interface with the NCurses
+, QT and CGI frontends as normal.
+
+Distributions using BSD Installer
+---------------------------------
+
+Currently The BSD Installer is being used by DragonFlyBSD, FreeSBIE and
+pfSense.
Index: contrib/bsdinstaller/docs/dfui/dfui.html
===================================================================
RCS file: contrib/bsdinstaller/docs/dfui/dfui.html
diff -N contrib/bsdinstaller/docs/dfui/dfui.html
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/docs/dfui/dfui.html 17 Jul 2004 01:50:34 -0000
@@ -0,0 +1,502 @@
+
+DragonFly Abstract User Interface (DFUI)
+
+
+DragonFly Abstract User Interface (DFUI)
+
+$Id: dfui.html,v 1.2 2004/07/17 01:50:34 cpressey Exp $
+
+Introduction
+
+This document describes a user interface (UI) abstraction which allows an
+application to communicate with a user through any number of kinds
+of concrete user interfaces, such as curses, GTK+, or a
+web browser.
+
+This abstraction should be suitable for presenting the DragonFly system
+installer to the user; however it need not and should not be limited to only the
+installer. Many other tasks in DragonFly, such as system configuration and
+package installation, could and for the sake of consistency should use the
+same UI.
+
+Abstraction
+
+The DFUI abstraction isolates the semantics of user interation from
+the concrete details of it, similar to a Model View Controller
+abstraction. Such a system is split into frontend and backend:
+
+
+- The backend contains the control logic and invokes the tool programs (such
+as
fdisk.)
+- The frontend constructs the concrete user interface (with widgets and such)
+and presents it to the user.
+
+
+The backend tells the frontend what kind of conversation to hold with the user;
+the frontend tells the backend the user's ultimate decisions.
+
+The backend talks to the frontend in terms of abstract user interface elements.
+It tells the frontend nothing about how the UI should
+be presented, only the bare essentials of what it must convey. Likewise, the frontend
+talks to the backend in terms of data. It keeps trivia about the user (like what language
+they are using) to itself. In this way, we maintain component isolation: the
+backend is concerned only with the semantics of the user interaction, while
+the frontend is concerned only with its implementation.
+
+The frontend may be constructed in almost any manner. It may be a
+curses program, or it may be a CGI. This presents a unique barrier, namely that the
+frontend might be either a single, long-running process or a series of short-running
+processes. This essentially requires a concurrently design where the frontend and backend
+exist in seperate processes that exchange messages using IPC.
+
+The contrast between the curses scenario and the CGI scenario
+is illustrated below.
+
+
+
+|
+ 
+ |
+ 
+ |
+
+
+
+This abstraction gives us several benefits:
+
+
+- We're not tying the installer (and other tasks) to one specific user interface toolkit.
+
- We're not even tying the installer (and other tasks) to one particular kind of UI.
+
- The code for the installation process itself should be easier to manage
+because it won't be clouded with UI details.
+
- The code for the UI itself should be easier to manage
+because it won't be clouded with installer details.
+
- The frontend and backend don't have to be written in the same
+programming language (with some caveats; see below.)
+
- We have the opportunity for the frontend and backend to work
+asymchronously (with some caveats; see below.)
+
- We can use the same UI consistently for all tasks, rather than only in the installer.
+
+
+Data Types
+
+Each of the messages sent between the frontend and the backend consists of
+one piece of data. Before getting to the messages themselves, we'll examine the
+data types in use.
+
+Id's
+
+Many of the other data types each have an id.
+
+An id is a key which identifies the object to both the frontend and the
+backend. It should be unique across all similar objects in the same container.
+(i.e. a form id should be unique across all forms in a session, a field id should
+be unique across all fields in a form, etc.)
+
+Id's are implemented as a short alphanumeric (plus underscores) strings
+such as disk_select_menu.
+
+Info Blocks
+
+Many of the other data types each have an info block.
+
+In contrast to the id, which the computer uses to tell objects apart, an
+info block is for the human operator's benefit. Each info block contains:
+
+
+- the name of the object, which should be a short and
+descriptive title such as "Select Disk";
+- the short description of the object, which should be one or
+two sentences describing the purpose of the object; and
+- the long description of the object, which is analogous to
+a "help file" on the object which should describe its purpose and
+behaviour in a usefully verbose way. The long description component
+of an info block need not contain the actual text of the long description;
+it should instead contain a reference to it in the form of a filename or URL.
+
+
+Forms
+
+The basic unit of interaction is a form. While typically displayed as
+a familiar electronic version of a paper fill-out form, it is defined abstractly enough
+to not pose any obstacles should we need to deal with other media. However,
+in this document we will give typical examples using a familiar GUI interpretation.
+
+Each form consists of:
+
+
+- a form id
+- an info block
+- a multiplicity flag
+- zero or more fields
+- one or more actions
+- zero or more properties
+- zero or more datasets
+
+
+The multiplicity flag determines whether there is a single set of data displayed on the
+form (multiplicity = false), or multiple sets of data (multiplicity = true).
+The former resembles a 'dialog box' in a typical UI.
+The latter resembles a spreadsheet or database entry form, with zero or more 'rows'
+of a data, and facilities for the user to add, remove, etc rows. Examples of these
+two different layout styles are shown below (note of course that these are only
+examples - the frontend may interpret them any reasonable way it likes.)
+
+
+
+|
+ multiplicity = false
+
+ |
+ multiplicity = true
+
+ |
+
+
+
+Fields
+
+Each field describes a piece of data that the user can view and possibly manipulate.
+In a typical GUI, fields are rendered as text boxes and similar widgets.
+Each field has:
+
+
+- a field id
+- an info block
+- zero or more options
+- zero or more properties
+
+
+A form with zero fields has only actions, and might typically look like a menu
+or informative-only dialog box.
+
+Actions
+
+Each action describes an action that can be taken.
+In a typical GUI, actions are rendered as buttons that can be clicked.
+Each action consists of:
+
+
+- an action id
+- an info block
+- zero or more properties
+
+
+Datasets
+
+Each dataset describes a set of data that is displayed or entered into a
+form. In a form with more than zero fields, a multiplicity = false form has
+exactly one dataset, while a multiplicity = true form may have more than one.
+A form with zero fields must have zero datasets.
+
+Each dataset consists of a set of one celldata for each field of the form.
+
+Celldatas
+
+A celldata represents a value entered into a field on a form, either
+as a default value by the backend, or by the user's choice.
+
+Each celldata consists of:
+
+
+- the field id to which it applies
+- the value
+
+
+The data type of all celldata values, as far as DFUI is concerned, is text.
+The backend may convert the text into a more semantically meaningful format,
+such as floating-point values, internally.
+
+Options
+
+Each field has zero or more options. These are supplied values that the
+user may choose to place in the field.
+
+The semantics of options in combination with the editable flag are summarized here:
+
+
+| Editable flag | Number of Options | Semantics |
+| true | zero | user may manually enter any value in field |
+| true | one or more | user may manually enter any value in field, or may select any option to fill field with ("combo box") |
+| false | zero | user may not enter data into field in any fashion |
+| false | one or more | user may not manually enter values into field, but may select an option to fill the field with ("list box") |
+
+
+Responses
+
+Each response describes a user's decision. Each response consists of:
+
+
+- a form id
+- an action id
+- zero or more datasets
+
+
+The form id indicates the form that this is a response to.
+
+The action id indicates the action that the user executed which caused
+this response.
+
+The datasets contain the user's choices. When the form is
+multiplicity = false, there should be exactly one dataset; when the form
+is multiplicity = true, there should be one dataset per "row" of data that the
+user entered. Either way, there should always be one celldata per field
+of the form in each dataset.
+
+Progresses
+
+A progress represents some task which takes a relatively long time to
+complete; in a typical GUI it would be implemented by a progress bar.
+Each progress consists of:
+
+
+- an info block
+- an amount
+
+
+The amount is an integer which ranges from 0 to 100, where 0 indicates
+no progress has been made, and 100 indicates that the task is finished.
+
+Progresses do not have responses, but they may be cancelled.
+
+Properties
+
+See dfui_property.
+
+Messages
+
+The backend may send the following kinds of messages to the frontend:
+
+
+present(form)
+prog_begin(progress)
+prog_update(progress)
+prog_end()
+stop()
+
+
+
+The frontend may send the following kinds of replies to the backend:
+
+
+submit(response)
+continue()
+cancel()
+abort()
+
+
+
+These may, in theory, be asynchronous: the backend may, for example, send several
+present messages before receiving any submit replies,
+so long as there is some way to identify which submits are associated with
+which presents (i.e. the form id).
+
+However, in practice, while some UI's support concurrently displaying multiple
+UI elements in a natural fashion (typified by "windows",) others do not. So to begin,
+we will limit ourselves by enforcing
+a sychronous discipline: each message from the backend must be replied by a reply from
+the frontend before the next message from the backend is sent.
+
+The present Message
+
+The present message carries a form as a payload. Upon
+receipt of this message, the frontend should display the form and let the user
+manipulate it.
+
+The frontend may then reply to a present message with:
+
+
+- a
submit reply with the corresponding form id, which
+indicates that the user chose an action from the form; or
+- an
abort reply, which indicates something catastrophic happened
+and that the backend should halt everything.
+
+
+
+The submit Reply
+
+The submit reply carries a response as a payload. It should
+only occur after a present message.
+
+The prog_begin Message
+
+A prog_begin message carries a progress as a payload
+and indicates that a progress has begun.
+
+The frontend may reply to a prog_begin message with:
+
+
+- a
continue reply, indicating all is well; or
+- an
abort reply, indicating the backend should halt.
+
+
+
+The prog_update Message
+
+A prog_update message carries a progress as a payload
+and indicates that the state of progress has changed.
+
+The frontend may reply to a prog_update message with:
+
+
+- a
continue reply, indicating all is well;
+- a
cancel reply, indicating that the user cancelled the
+progress; or
+- an
abort reply, indicating the backend should halt.
+
+
+
+The prog_end Message
+
+A prog_end message indicates that a progress is finished.
+It has no payload.
+
+The frontend may reply to a prog_end message with:
+
+
+- a
continue reply, indicating all is well; or
+- an
abort reply, indicating the backend should halt.
+
+
+
+The stop Message
+
+The stop message has no payload; it simply tells the frontend
+that the backend has finished processing. The frontend may exit, if it is a
+long-running process, or it may simply display a 'finished' page, if it is a
+short-running CGI process.
+
+Pseudocode
+
+
+
+| curses frontend |
+CGI frontend |
+
+
+
+ if backend is running
+ error "backend is already running"
+ start backend
+ while not done {
+ wait for a message from backend
+ if the message is 'stop'
+ done := TRUE
+ else if the message is 'present' {
+ display a form based on the message
+ let the user interact with the form
+ until the user selects an action
+ send 'submit' message to backend
+ }
+ }
+ |
+
+ if the request method was 'POST' {
+ create 'submit' message from POSTed data
+ send 'submit' message to backend
+ } else {
+ if backend is running
+ error "backend is already running"
+ start backend
+ }
+ wait for a message from backend
+ if the message is 'stop'
+ display 'done' page
+ else if the message is 'present'
+ display a form based on the message
+ |
+
+
+Library
+
+Let us consider now a library, libdfui, which implements this abstraction:
+
+
+- A C program could use functions in this library directly.
+
- A program in another high-level language, such as Python,
+could use the functions in this library with a C binding made
+(with, say, SWIG) for this purpose.
+
- A shell script could use these functions via
+utility programs which parse their arguments and call
+these functions directly (or via a proxy daemon.)
+
+
+Backend
+
+From the backend's point of view, the useful functions in this library are
+as follows. Each function returns an error response (1 = success, 0 = failure.)
+
+
+dfui_be_start(struct dfui_connection *c)
+Connect to the frontend and return a handle to it in c. XXX this function
+also needs to know what frontend to try to connect to and how somehow.
+dfui_be_present(struct dfui_connection *c, struct dfui_form *f, struct dfui_response *r)
+Ask the frontend on the other end of c to present the form f, wait
+for a submit reply, and return the response in r
+dfui_be_prog_begin(struct dfui_connection *c, struct dfui_progress *p)
+Ask the frontend on the other end of c to start showing the progress p.
+dfui_be_prog_update(struct dfui_connection *c, struct dfui_progress *p)
+Ask the frontend on the other end of c to update the progress p.
+dfui_be_prog_end(struct dfui_connection *c)
+Ask the frontend on the other end of c to stop showing any progress.
+dfui_be_stop(struct dfui_connection *c)
+Tell the frontend on the other end of c to stop, and close the connection.
+
+
+Notably, there are also functions for constructing struct dfui_forms and its
+brethren, and for intrerpreting and freeing struct dfui_responses.
+
+Frontend
+
+From the frontend's point of view, the useful functions in this library are
+as follows. Like the backend, these all return failure/success values.
+
+
+dfui_fe_start(struct dfui_connection *c)
+Connect to the backend XXX somehow.
+dfui_fe_receive(struct dfui_connection *c, char *msgtype, void **payload)
+Wait for the backend to send a message, then return the message type in *msgtype
+and the message itself in *payload. It is the frontend's reponsibility to cast the
+payload to the correct data type (based on *msgtype,) and to free it at some later
+time if it is not NULL.
+dfui_fe_submit(struct dfui_connection *c, struct dfui_response *r)
+Send a submit reply to the backend.
+dfui_fe_progress_continue(struct dfui_connection *c)
+Send a continue reply to the backend.
+dfui_fe_progress_cancel(struct dfui_connection *c)
+Send a cancel reply to the backend.
+dfui_fe_abort(struct dfui_connection *c)
+Send an abort reply to the backend.
+dfui_fe_stop(struct dfui_connection *c)
+Close the connection.
+
+
+Notably, there are also functions for intrerpreting struct dfui_forms et al,
+and for constructing and freeing struct dfui_responsess.
+
+Implementation
+
+The IPC used by libdfui, through which the frontend and backend exchange messages
+and replies, is a wrapper around the CAPS mechanism. CAPS is the lightweight messaging
+abstraction Matt Dillon has introduced into DragonFly.
+
+CAPS was chosen for two reasons: it fulfils DFUI's needs as an IPC mechanism, and DFUI
+provides a good "real world" test for CAPS.
+
+The implementation of libdfui in CAPS is fairly straightforward, with one significant twist.
+
+Despite the backend sending 'requests' and the frontend sending 'replies', the backend is
+a CAPS service, while the frontend is a CAPS client. This is necessary as the frontend could
+be a series of short-lived processes. A CAPS service cannot receive a message in one
+process and reply to it in another.
+
+We implement this role reversal by having each message exchange, as described above,
+be implemented by two full CAPS message-reply exchange cycles internally.
+
+That is, for a backend to send a message to the frontend, the backend waits until it
+receives a generic 'client ready' message from the frontend, then sends it's request as a
+CAPS reply. It then waits for another message from the frontend (the DFUI reply) and
+replies to that with a generic 'service ready' message.
+
+
+
Index: contrib/bsdinstaller/docs/dfui/form_multiple.png
===================================================================
RCS file: contrib/bsdinstaller/docs/dfui/form_multiple.png
diff -N contrib/bsdinstaller/docs/dfui/form_multiple.png
Binary files /dev/null and form_multiple.png differ
Index: contrib/bsdinstaller/docs/dfui/form_single.png
===================================================================
RCS file: contrib/bsdinstaller/docs/dfui/form_single.png
diff -N contrib/bsdinstaller/docs/dfui/form_single.png
Binary files /dev/null and form_single.png differ
Index: contrib/bsdinstaller/docs/dfui/property.html
===================================================================
RCS file: contrib/bsdinstaller/docs/dfui/property.html
diff -N contrib/bsdinstaller/docs/dfui/property.html
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/docs/dfui/property.html 15 Feb 2005 21:56:23 -0000
@@ -0,0 +1,150 @@
+
+DFUI: dfui_property
+
+
+dfui_property
+
+$Id: property.html,v 1.3 2005/02/15 21:56:23 cpressey Exp $
+
+A dfui_property gives some information about an object
+which may or may not be present.
+
+Properties may either be weak, meaning that frontends can ignore
+them and still be considered correct, or they may be strong, meaning
+that they carry with them a guarantee of behaviour, and any frontend which
+does not conform to that behaviour should be considered incorrect. The vast
+majority of properties are weak. Frontends are still encouraged to implement
+as many weak properties as apply to them, however, as they are used to help
+create a more pleasant and effective experience for the user.
+
+Form Properties
+
+
+| Hint Id | Description | Values |
+role |
+ Allows the frontend to display a more meaningful form. |
+
+
+ | Value | Description | Assumptions |
+ menu |
+ Form is a menu, where the user may select one of a number of choices. |
+ Form has zero fields; form has more than one action. |
+ confirmation |
+ Form is a confirmation dialog box or similar, with a question and yes/no/etc choices. |
+ Form has zero fields; form has two or more actions. |
+ alert |
+ Form is there to display important information. |
+ Form has zero fields. |
+
+ |
+special |
+ Allows the frontend to display a special-purpose form for a particular occasion.
+ These are typically unique forms used in only one application, such as the installer. |
+
+
+ | Value | Description | Assumptions |
+ bsdinstaller_welcome |
+ Welcome screen for the BSD Installer. |
+ TBA |
+
+ |
+minimum_width |
+ Suggests a minimum visual width of the form. |
+
+ Any integer. The units of measurement are "em"'s, i.e.
+ the width of the widest character in the typeface used to render the form.
+ |
+monospaced |
+ Suggests that the textual content of the form should be monospaced
+ (i.e. each character should occupy the same width.) |
+
+ true or false, default false.
+ |
+default_action |
+ Specifies which action is the default (selected when the form is first displayed
+ and/or triggered by the 'obvious thing' on the user's part, such as pressing Enter,
+ depending on the interface. |
+
+ The id of an action on the form.
+ |
+
+
+Field Hints
+
+
+| Hint Id | Description | Values |
+editable |
+ (STRONG) Determines whether the value(s) in this field may be edited by the user. |
+
+ true or false, default true.
+ |
+obscured |
+ (STRONG) Determines whether the user is allowed to observe the value(s) in this field. |
+
+ true or false, default false.
+ Typically true is used for password-entry fields.
+ |
+control |
+ Allows the frontend to use a more meaningful widget. |
+
+
+ | Value | Description | Assumptions |
+ checkbox |
+ Field may be either 'on' or 'off' (a.k.a. 'yes' or 'no', 'true' or 'false'). |
+ 'on' is represented by the text Y, 'off' is represented by N |
+
+ |
+prominence |
+ Indicates how prominent a particular field should be. |
+
+
+ | Value | Description | Assumptions |
+ minimal | Try to save space. Typically means
+ that an effort should be taken to save screen real estate by having
+ the important contents of this field "drop down" or "pop up" when needed. This
+ is particularly germane for fields with more than zero options, but that need not be
+ a strict assumption. | TBA |
+ maximal | Try to draw attention to this field. | TBA |
+ normal | No special prominence (default.) | TBA |
+
+ |
+regexp |
+ Describes the pattern of characters that values of the field should match. |
+
+ A basic regular expression (define??) Some examples might be ^\d+$ to match
+ a positive integer, and ^a.*z$ to match anything that starts with a and ends with z.
+ |
+alignment |
+ Indicates how data within the field should be aligned. |
+
+
+ | Value | Description | Assumptions |
+ left | Align to the left edge. | TBA |
+ right | Align to the right edge. | TBA |
+ center | Center the contents. | TBA |
+
+ |
+
+
+Action Hints
+
+
+| Hint Id | Description | Values |
+visited |
+ Indicates that this action leads to a form which has already been filled-out, or a path
+ of events which has already been taken. Supplied purely as a navigation aid. |
+
+
+ | Value | Description | Assumptions |
+ true | Indicate to user that this action was already visited. | TBA |
+
+ |
+accelerator |
+ Specifies a keystroke which will trigger this action under normal circumstances. |
+
+ Any letter between a and z.
+ |
+
+
+
+
Index: contrib/bsdinstaller/docs/dfui/session_cgi.png
===================================================================
RCS file: contrib/bsdinstaller/docs/dfui/session_cgi.png
diff -N contrib/bsdinstaller/docs/dfui/session_cgi.png
Binary files /dev/null and session_cgi.png differ
Index: contrib/bsdinstaller/docs/dfui/session_curses.png
===================================================================
RCS file: contrib/bsdinstaller/docs/dfui/session_curses.png
diff -N contrib/bsdinstaller/docs/dfui/session_curses.png
Binary files /dev/null and session_curses.png differ
Index: contrib/bsdinstaller/ports/devel/libaura/Makefile
===================================================================
RCS file: contrib/bsdinstaller/ports/devel/libaura/Makefile
diff -N contrib/bsdinstaller/ports/devel/libaura/Makefile
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/devel/libaura/Makefile 30 Jul 2005 20:43:15 -0000
@@ -0,0 +1,57 @@
+# New ports collection makefile for: libaura
+# Date created: July 21, 2004
+# Whom: Chris Pressey
+
+PORTNAME= libaura
+PORTVERSION= 3.1
+INTERNAL= YES
+CATEGORIES= sysutils
+DISTNAME= ${PORTNAME}-${PORTVERSION}
+WRKSRC= work/${PORTNAME}
+
+MAINTAINER= cpressey@catseye.mine.nu
+COMMENT= Library of Assorted Useful Reusable Abstractions
+
+PLIST_FILES= lib/libaura.a \
+ lib/libaura.so \
+ lib/libaura.so.3 \
+ include/aura/buffer.h \
+ include/aura/dict.h \
+ include/aura/fspred.h \
+ include/aura/popen.h \
+ include/aura/mem.h
+
+do-fetch:
+ @if [ ! -f ${_DISTDIR}${DISTNAME}${EXTRACT_SUFX} ]; then \
+ ${ECHO_MSG}; \
+ ${ECHO_MSG} "Distfile ${DISTNAME}${EXTRACT_SUFX} not found!"; \
+ ${ECHO_MSG}; \
+ ${ECHO_MSG} "This is an 'INTERNAL' port, meaning that the distfile is not retrieved"; \
+ ${ECHO_MSG} "from the Internet, but rather created from a local checkout of the"; \
+ ${ECHO_MSG} "BSD Installer CVS repository. Please see the shell scripts in the"; \
+ ${ECHO_MSG} "scripts/build directory of the repository for more information on how"; \
+ ${ECHO_MSG} "to create these distfiles."; \
+ false; \
+ fi
+
+do-install:
+ ${MKDIR} -p ${LOCALBASE}/include/aura
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/libaura.a ${LOCALBASE}/lib/
+ ${INSTALL_PROGRAM} -o root -g wheel -m 444 ${WRKSRC}/libaura.so.3 ${LOCALBASE}/lib/
+ ${LN} -sf ${LOCALBASE}/lib/libaura.so.3 ${LOCALBASE}/lib/libaura.so
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/buffer.h ${LOCALBASE}/include/aura/
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/dict.h ${LOCALBASE}/include/aura/
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/popen.h ${LOCALBASE}/include/aura/
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/fspred.h ${LOCALBASE}/include/aura/
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/mem.h ${LOCALBASE}/include/aura/
+
+OSTYPE!=sysctl -n kern.ostype
+
+.if ${OSTYPE} == "FreeBSD"
+.include
+.endif
+
+.if ${OSTYPE} == "DragonFly"
+.include
+.endif
+
Index: contrib/bsdinstaller/ports/devel/libaura/pkg-descr
===================================================================
RCS file: contrib/bsdinstaller/ports/devel/libaura/pkg-descr
diff -N contrib/bsdinstaller/ports/devel/libaura/pkg-descr
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/devel/libaura/pkg-descr 22 Jul 2004 04:30:20 -0000
@@ -0,0 +1,10 @@
+Libaura is a library of Assorted Useful Reusable Abstractions -
+data structures and utilities for C language programming. At
+present, they include:
+
+- memory allocators/deallocators
+- key<->value dictionaries (hashed or sorted)
+- extensible buffers
+- filesystem predicates (is_dir, is_named_pipe, etc)
+- popen() variation which allows the caller to know the pid of
+ the process on the other end of the pipe.
Index: contrib/bsdinstaller/ports/devel/lua50-app/Makefile
===================================================================
RCS file: contrib/bsdinstaller/ports/devel/lua50-app/Makefile
diff -N contrib/bsdinstaller/ports/devel/lua50-app/Makefile
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/devel/lua50-app/Makefile 4 Apr 2005 05:47:46 -0000
@@ -0,0 +1,50 @@
+# New ports collection makefile for: lua50-app
+# Date created: 23 Feb 2005
+# Whom: Chris Pressey
+
+PORTNAME= lua50-app
+PORTVERSION= 0.1
+INTERNAL= YES
+CATEGORIES= devel
+DISTNAME= luaapp-${PORTVERSION}
+WRKSRC= work/app
+
+LIB_DEPENDS= lua50.5:${PORTSDIR}/lang/lua50
+BUILD_DEPENDS= ${LOCALBASE}/bin/lua50c51:${PORTSDIR}/devel/lua50-compat51
+RUN_DEPENDS= ${LOCALBASE}/bin/lua50c51:${PORTSDIR}/devel/lua50-compat51 \
+ ${LOCALBASE}/share/lua/5.0/posix.lua:${PORTSDIR}/devel/lua50-posix \
+ ${LOCALBASE}/share/lua/5.0/filename.lua:${PORTSDIR}/devel/lua50-filename
+
+MAINTAINER= cpressey@catseye.mine.nu
+COMMENT= App framework for Lua 5.0.x
+
+PLIST_FILES= share/lua/5.0/app.lua
+
+do-fetch:
+ @if [ ! -f ${_DISTDIR}${DISTNAME}${EXTRACT_SUFX} ]; then \
+ ${ECHO_MSG}; \
+ ${ECHO_MSG} "Distfile ${DISTNAME}${EXTRACT_SUFX} not found!"; \
+ ${ECHO_MSG}; \
+ ${ECHO_MSG} "This is an 'INTERNAL' port, meaning that the distfile is not retrieved"; \
+ ${ECHO_MSG} "from the Internet, but rather created from a local checkout of the"; \
+ ${ECHO_MSG} "BSD Installer CVS repository. Please see the shell scripts in the"; \
+ ${ECHO_MSG} "scripts/build directory of the repository for more information on how"; \
+ ${ECHO_MSG} "to create these distfiles."; \
+ false; \
+ fi
+
+do-build:
+ @${ECHO} "No building required."
+
+do-install:
+ ${CP} ${WRKSRC}/app.lua ${LOCALBASE}/share/lua/5.0/app.lua
+
+OSTYPE!=sysctl -n kern.ostype
+
+.if ${OSTYPE} == "FreeBSD"
+.include
+.endif
+
+.if ${OSTYPE} == "DragonFly"
+.include
+.endif
Index: contrib/bsdinstaller/ports/devel/lua50-app/pkg-descr
===================================================================
RCS file: contrib/bsdinstaller/ports/devel/lua50-app/pkg-descr
diff -N contrib/bsdinstaller/ports/devel/lua50-app/pkg-descr
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/devel/lua50-app/pkg-descr 23 Feb 2005 22:22:16 -0000
@@ -0,0 +1,3 @@
+App framework for Lua, inspired by several sources, primarily the
+Erlang app module.
+
Index: contrib/bsdinstaller/ports/devel/lua50-compat51/Makefile
===================================================================
RCS file: contrib/bsdinstaller/ports/devel/lua50-compat51/Makefile
diff -N contrib/bsdinstaller/ports/devel/lua50-compat51/Makefile
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/devel/lua50-compat51/Makefile 4 Apr 2005 13:58:17 -0000
@@ -0,0 +1,41 @@
+# New ports collection makefile for: lua50-compat51
+# Date created: 10 Feb 2005
+# Whom: Chris Pressey
+
+PORTNAME= lua50-compat51
+PORTVERSION= 5.1.r2
+CATEGORIES= devel
+DISTNAME= compat-5.1r2
+MASTER_SITES= http://luaforge.net/frs/download.php/402/
+
+LIB_DEPENDS= lua50.5:${PORTSDIR}/lang/lua50
+
+MAINTAINER= cpressey@catseye.mine.nu
+COMMENT= Lua 5.1 package compatibility layer for Lua 5.0.x
+
+PLIST_FILES= share/lua/5.0/compat-5.1.lua \
+ lib/lua/${DISTNAME}/compat-5.1.c \
+ lib/lua/${DISTNAME}/compat-5.1.h \
+ bin/lua50c51
+
+do-build:
+ @echo "Nothing to build."
+
+do-install:
+ ${MKDIR} -p ${PREFIX}/lib/lua/5.0
+ ${MKDIR} -p ${PREFIX}/lib/lua/${DISTNAME}
+ ${MKDIR} -p ${PREFIX}/share/lua/5.0
+ ${INSTALL_DATA} ${WRKSRC}/compat-5.1.lua ${PREFIX}/share/lua/5.0
+ ${INSTALL_DATA} ${WRKSRC}/compat-5.1.c ${PREFIX}/lib/lua/${DISTNAME}
+ ${INSTALL_DATA} ${WRKSRC}/compat-5.1.h ${PREFIX}/lib/lua/${DISTNAME}
+ ${INSTALL_SCRIPT} ${FILESDIR}/lua50c51.sh ${PREFIX}/bin/lua50c51
+
+OSTYPE!=sysctl -n kern.ostype
+
+.if ${OSTYPE} == "FreeBSD"
+.include
+.endif
+
+.if ${OSTYPE} == "DragonFly"
+.include
+.endif
Index: contrib/bsdinstaller/ports/devel/lua50-compat51/distinfo
===================================================================
RCS file: contrib/bsdinstaller/ports/devel/lua50-compat51/distinfo
diff -N contrib/bsdinstaller/ports/devel/lua50-compat51/distinfo
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/devel/lua50-compat51/distinfo 17 Feb 2005 05:54:30 -0000
@@ -0,0 +1,2 @@
+MD5 (compat-5.1r2.tar.gz) = 751de141b3f6faa0b9706b757c8bc7a1
+SIZE (compat-5.1r2.tar.gz) = 2039
Index: contrib/bsdinstaller/ports/devel/lua50-compat51/pkg-descr
===================================================================
RCS file: contrib/bsdinstaller/ports/devel/lua50-compat51/pkg-descr
diff -N contrib/bsdinstaller/ports/devel/lua50-compat51/pkg-descr
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/devel/lua50-compat51/pkg-descr 17 Feb 2005 05:54:30 -0000
@@ -0,0 +1,4 @@
+This is a Lua 5.1.x compatibility shim for Lua 5.0.x. It also
+includes a wrapper script, lua5, which sets the LUA_PATH and
+loads the compatibility layer automatically.
+
Index: contrib/bsdinstaller/ports/devel/lua50-compat51/files/lua50c51.sh
===================================================================
RCS file: contrib/bsdinstaller/ports/devel/lua50-compat51/files/lua50c51.sh
diff -N contrib/bsdinstaller/ports/devel/lua50-compat51/files/lua50c51.sh
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/devel/lua50-compat51/files/lua50c51.sh 17 Feb 2005 23:12:49 -0000
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec /usr/local/bin/lua50 -l/usr/local/share/lua/5.0/compat-5.1.lua $*
Index: contrib/bsdinstaller/ports/devel/lua50-compat51/files/patch-compat-5.1.c
===================================================================
RCS file: contrib/bsdinstaller/ports/devel/lua50-compat51/files/patch-compat-5.1.c
diff -N contrib/bsdinstaller/ports/devel/lua50-compat51/files/patch-compat-5.1.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/devel/lua50-compat51/files/patch-compat-5.1.c 4 Apr 2005 13:56:37 -0000
@@ -0,0 +1,12 @@
+--- compat-5.1.c.orig Mon Apr 4 17:35:33 2005
++++ compat-5.1.c Mon Apr 4 17:35:51 2005
+@@ -1,7 +1,7 @@
+ #include
+ #include
+-#include "lua.h"
+-#include "lauxlib.h"
++#include "lua50/lua.h"
++#include "lua50/lauxlib.h"
+ #include "compat-5.1.h"
+
+ static void getfield(lua_State *L, const char *name) {
Index: contrib/bsdinstaller/ports/devel/lua50-curses/Makefile
===================================================================
RCS file: contrib/bsdinstaller/ports/devel/lua50-curses/Makefile
diff -N contrib/bsdinstaller/ports/devel/lua50-curses/Makefile
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/devel/lua50-curses/Makefile 30 Jul 2005 20:43:15 -0000
@@ -0,0 +1,31 @@
+# New ports collection makefile for: lua50-curses
+# Date created: 10 Feb 2005
+# Whom: Chris Pressey
+
+PORTNAME= lua50-curses
+PORTVERSION= 0.1a
+CATEGORIES= devel
+DISTNAME= lcurses-0.1-devel
+MASTER_SITES= http://mega.ist.utl.pt/~tngd/lua/
+
+LIB_DEPENDS= lua50.5:${PORTSDIR}/lang/lua50
+BUILD_DEPENDS= ${LOCALBASE}/bin/lua50c51:${PORTSDIR}/devel/lua50-compat51
+RUN_DEPENDS= ${LOCALBASE}/bin/lua50c51:${PORTSDIR}/devel/lua50-compat51
+
+MAINTAINER= cpressey@catseye.mine.nu
+COMMENT= Curses binding for Lua 5.0.x
+
+PLIST_FILES= lib/lua/5.0/lcurses.so
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/lcurses.so ${PREFIX}/lib/lua/5.0
+
+OSTYPE!=sysctl -n kern.ostype
+
+.if ${OSTYPE} == "FreeBSD"
+.include
+.endif
+
+.if ${OSTYPE} == "DragonFly"
+.include
+.endif
Index: contrib/bsdinstaller/ports/devel/lua50-curses/pkg-descr
===================================================================
RCS file: contrib/bsdinstaller/ports/devel/lua50-curses/pkg-descr
diff -N contrib/bsdinstaller/ports/devel/lua50-curses/pkg-descr
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/devel/lua50-curses/pkg-descr 15 Mar 2005 22:16:10 -0000
@@ -0,0 +1 @@
+Curses bindings for Lua.
Index: contrib/bsdinstaller/ports/devel/lua50-curses/files/patch-Makefile
===================================================================
RCS file: contrib/bsdinstaller/ports/devel/lua50-curses/files/patch-Makefile
diff -N contrib/bsdinstaller/ports/devel/lua50-curses/files/patch-Makefile
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/devel/lua50-curses/files/patch-Makefile 15 Mar 2005 22:16:10 -0000
@@ -0,0 +1,11 @@
+--- Makefile.orig 2005-02-20 13:10:18.000000000 -0800
++++ Makefile 2005-02-20 13:11:13.000000000 -0800
+@@ -5,7 +5,7 @@
+ TMP=/tmp
+
+ # change these to reflect your Lua installation
+-LUA=../lua-5.0.2
++LUA=/usr/local
+ LUAINC= $(LUA)/include
+ LUALIB= $(LUA)/lib
+ LUABIN= $(LUA)/bin
Index: contrib/bsdinstaller/ports/devel/lua50-dfui/Makefile
===================================================================
RCS file: contrib/bsdinstaller/ports/devel/lua50-dfui/Makefile
diff -N contrib/bsdinstaller/ports/devel/lua50-dfui/Makefile
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/devel/lua50-dfui/Makefile 30 Jul 2005 20:43:15 -0000
@@ -0,0 +1,51 @@
+# New ports collection makefile for: lua50-dfui
+# Date created: 21 Feb 2005
+# Whom: Chris Pressey
+
+PORTNAME= lua50-dfui
+PORTVERSION= 0.1
+INTERNAL= YES
+CATEGORIES= devel
+DISTNAME= luadfui-${PORTVERSION}
+WRKSRC= work/dfui
+
+LIB_DEPENDS= lua50.5:${PORTSDIR}/lang/lua50 \
+ aura.3:${PORTSDIR}/devel/libaura \
+ dfui.4:${PORTSDIR}/sysutils/libdfui
+
+BUILD_DEPENDS= ${LOCALBASE}/bin/lua50c51:${PORTSDIR}/devel/lua50-compat51
+RUN_DEPENDS= ${LOCALBASE}/bin/lua50c51:${PORTSDIR}/devel/lua50-compat51 \
+ ${LOCALBASE}/lib/lua/5.0/lposix.so:${PORTSDIR}/devel/lua50-posix
+
+MAINTAINER= cpressey@catseye.mine.nu
+COMMENT= DFUI binding for Lua 5.0.x
+
+PLIST_FILES= lib/lua/5.0/ldfui.so \
+ share/lua/5.0/dfui.lua
+
+do-fetch:
+ @if [ ! -f ${_DISTDIR}${DISTNAME}${EXTRACT_SUFX} ]; then \
+ ${ECHO_MSG}; \
+ ${ECHO_MSG} "Distfile ${DISTNAME}${EXTRACT_SUFX} not found!"; \
+ ${ECHO_MSG}; \
+ ${ECHO_MSG} "This is an 'INTERNAL' port, meaning that the distfile is not retrieved"; \
+ ${ECHO_MSG} "from the Internet, but rather created from a local checkout of the"; \
+ ${ECHO_MSG} "BSD Installer CVS repository. Please see the shell scripts in the"; \
+ ${ECHO_MSG} "scripts/build directory of the repository for more information on how"; \
+ ${ECHO_MSG} "to create these distfiles."; \
+ false; \
+ fi
+
+do-install:
+ ${INSTALL_PROGRAM} -o root -g wheel -m 444 ${WRKSRC}/ldfui.so ${LOCALBASE}/lib/lua/5.0/
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/dfui.lua ${LOCALBASE}/share/lua/5.0/
+
+OSTYPE!=sysctl -n kern.ostype
+
+.if ${OSTYPE} == "FreeBSD"
+.include
+.endif
+
+.if ${OSTYPE} == "DragonFly"
+.include
+.endif
Index: contrib/bsdinstaller/ports/devel/lua50-dfui/pkg-descr
===================================================================
RCS file: contrib/bsdinstaller/ports/devel/lua50-dfui/pkg-descr
diff -N contrib/bsdinstaller/ports/devel/lua50-dfui/pkg-descr
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/devel/lua50-dfui/pkg-descr 22 Feb 2005 06:59:11 -0000
@@ -0,0 +1 @@
+Lua bindings for DFUI.
Index: contrib/bsdinstaller/ports/devel/lua50-filename/Makefile
===================================================================
RCS file: contrib/bsdinstaller/ports/devel/lua50-filename/Makefile
diff -N contrib/bsdinstaller/ports/devel/lua50-filename/Makefile
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/devel/lua50-filename/Makefile 4 Apr 2005 05:47:46 -0000
@@ -0,0 +1,49 @@
+# New ports collection makefile for: lua50-filename
+# Date created: 28 Mar 2005
+# Whom: Chris Pressey
+
+PORTNAME= lua50-filename
+PORTVERSION= 0.1
+INTERNAL= YES
+CATEGORIES= devel
+DISTNAME= luafilename-${PORTVERSION}
+WRKSRC= work/filename
+
+LIB_DEPENDS= lua50.5:${PORTSDIR}/lang/lua50
+BUILD_DEPENDS= ${LOCALBASE}/bin/lua50c51:${PORTSDIR}/devel/lua50-compat51
+RUN_DEPENDS= ${LOCALBASE}/bin/lua50c51:${PORTSDIR}/devel/lua50-compat51 \
+ ${LOCALBASE}/share/lua/5.0/posix.lua:${PORTSDIR}/devel/lua50-posix
+
+MAINTAINER= cpressey@catseye.mine.nu
+COMMENT= Filename-manipulating functions for Lua 5.0.x
+
+PLIST_FILES= share/lua/5.0/filename.lua
+
+do-fetch:
+ @if [ ! -f ${_DISTDIR}${DISTNAME}${EXTRACT_SUFX} ]; then \
+ ${ECHO_MSG}; \
+ ${ECHO_MSG} "Distfile ${DISTNAME}${EXTRACT_SUFX} not found!"; \
+ ${ECHO_MSG}; \
+ ${ECHO_MSG} "This is an 'INTERNAL' port, meaning that the distfile is not retrieved"; \
+ ${ECHO_MSG} "from the Internet, but rather created from a local checkout of the"; \
+ ${ECHO_MSG} "BSD Installer CVS repository. Please see the shell scripts in the"; \
+ ${ECHO_MSG} "scripts/build directory of the repository for more information on how"; \
+ ${ECHO_MSG} "to create these distfiles."; \
+ false; \
+ fi
+
+do-build:
+ @${ECHO} "No building required."
+
+do-install:
+ ${CP} ${WRKSRC}/filename.lua ${LOCALBASE}/share/lua/5.0/filename.lua
+
+OSTYPE!=sysctl -n kern.ostype
+
+.if ${OSTYPE} == "FreeBSD"
+.include
+.endif
+
+.if ${OSTYPE} == "DragonFly"
+.include
+.endif
Index: contrib/bsdinstaller/ports/devel/lua50-filename/pkg-descr
===================================================================
RCS file: contrib/bsdinstaller/ports/devel/lua50-filename/pkg-descr
diff -N contrib/bsdinstaller/ports/devel/lua50-filename/pkg-descr
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/devel/lua50-filename/pkg-descr 29 Mar 2005 20:58:31 -0000
@@ -0,0 +1 @@
+Package of filename-manipulating functions for Lua.
\ No newline at end of file
Index: contrib/bsdinstaller/ports/devel/lua50-filesystem/Makefile
===================================================================
RCS file: contrib/bsdinstaller/ports/devel/lua50-filesystem/Makefile
diff -N contrib/bsdinstaller/ports/devel/lua50-filesystem/Makefile
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/devel/lua50-filesystem/Makefile 28 Mar 2005 00:25:44 -0000
@@ -0,0 +1,32 @@
+# New ports collection makefile for: lua50-filesystem
+# Date created: 10 Feb 2005
+# Whom: Chris Pressey
+
+PORTNAME= lua50-filesystem
+PORTVERSION= 1.0
+CATEGORIES= devel
+DISTNAME= luafilesystem-${PORTVERSION}
+MASTER_SITES= http://luaforge.net/frs/download.php/430/
+
+LIB_DEPENDS= lua50.5:${PORTSDIR}/lang/lua50
+BUILD_DEPENDS= ${LOCALBASE}/bin/lua50c51:${PORTSDIR}/devel/lua50-compat51
+RUN_DEPENDS= ${LOCALBASE}/bin/lua50c51:${PORTSDIR}/devel/lua50-compat51
+
+MAINTAINER= cpressey@catseye.mine.nu
+COMMENT= Portable File System routines for Lua 5.0.x
+
+PLIST_FILES= lib/lua/5.0/liblfs.1.0.so \
+ lib/lua/5.0/lfs.so
+
+ALL_TARGET= lib
+
+OSTYPE!=sysctl -n kern.ostype
+
+.if ${OSTYPE} == "FreeBSD"
+.include
+.endif
+
+.if ${OSTYPE} == "DragonFly"
+.include
+.endif
+
Index: contrib/bsdinstaller/ports/devel/lua50-filesystem/pkg-descr
===================================================================
RCS file: contrib/bsdinstaller/ports/devel/lua50-filesystem/pkg-descr
diff -N contrib/bsdinstaller/ports/devel/lua50-filesystem/pkg-descr
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/devel/lua50-filesystem/pkg-descr 15 Mar 2005 22:18:35 -0000
@@ -0,0 +1 @@
+Portable file system manipulation routines for Lua.
Index: contrib/bsdinstaller/ports/devel/lua50-filesystem/files/patch-config
===================================================================
RCS file: contrib/bsdinstaller/ports/devel/lua50-filesystem/files/patch-config
diff -N contrib/bsdinstaller/ports/devel/lua50-filesystem/files/patch-config
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/devel/lua50-filesystem/files/patch-config 15 Mar 2005 22:18:35 -0000
@@ -0,0 +1,30 @@
+--- config.orig 2005-01-19 09:20:04.000000000 -0800
++++ config 2005-02-20 11:18:02.000000000 -0800
+@@ -7,19 +7,19 @@
+ LUA_INC= /usr/local/include/lua5
+
+ # OS dependent
+-LIB_EXT= .dylib
+-#LIB_EXT= .so
+-LIB_OPTION= -dynamiclib #for MacOS X
+-#LIB_OPTION= -shared #for Linux
++#LIB_EXT= .dylib
++LIB_EXT= .so
++#LIB_OPTION= -dynamiclib #for MacOS X
++LIB_OPTION= -shared #for Linux
+
+-COMPAT_DIR= .
++COMPAT_DIR= /usr/local/share/lua/compat-5.1r2
+
+ # Compilation directives
+ # On FreeBSD systems, the following line should be commented
+-DLLIB= -ldl
++#DLLIB= -ldl
+ WARN= -O2 -Wall -fPIC -W -Waggregate-return -Wcast-align -Wmissing-prototypes -Wnested-externs -Wshadow -Wwrite-strings
+-INCS= -I$(LUA_INC) -I$(COMPAT_DIR)
+-LIBS= -L$(LUA_LIBDIR) -llua -llualib -lm $(DLLIB)
++INCS= -I$(LUA_INC) -I$(COMPAT_DIR) -I/usr/local/include
++LIBS= -L$(LUA_LIBDIR) -L/usr/local/lib -llua -llualib -lm $(DLLIB)
+ CFLAGS= $(WARN) $(INCS)
+ CC= gcc
+
Index: contrib/bsdinstaller/ports/devel/lua50-gettext/Makefile
===================================================================
RCS file: contrib/bsdinstaller/ports/devel/lua50-gettext/Makefile
diff -N contrib/bsdinstaller/ports/devel/lua50-gettext/Makefile
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/devel/lua50-gettext/Makefile 30 Jul 2005 20:43:15 -0000
@@ -0,0 +1,48 @@
+# New ports collection makefile for: lua50-gettext
+# Date created: 23 Feb 2005
+# Whom: Chris Pressey
+
+PORTNAME= lua50-gettext
+PORTVERSION= 0.1
+INTERNAL= YES
+CATEGORIES= devel
+DISTNAME= luagettext-${PORTVERSION}
+WRKSRC= work/gettext
+
+LIB_DEPENDS= lua50.5:${PORTSDIR}/lang/lua50 \
+ intl.6:${PORTSDIR}/devel/gettext
+BUILD_DEPENDS= ${LOCALBASE}/bin/lua50c51:${PORTSDIR}/devel/lua50-compat51
+RUN_DEPENDS= ${LOCALBASE}/bin/lua50c51:${PORTSDIR}/devel/lua50-compat51
+
+MAINTAINER= cpressey@catseye.mine.nu
+COMMENT= Gettext binding for Lua 5.0.x
+
+PLIST_FILES= lib/lua/5.0/lgettext.so \
+ share/lua/5.0/gettext.lua
+
+do-fetch:
+ @if [ ! -f ${_DISTDIR}${DISTNAME}${EXTRACT_SUFX} ]; then \
+ ${ECHO_MSG}; \
+ ${ECHO_MSG} "Distfile ${DISTNAME}${EXTRACT_SUFX} not found!"; \
+ ${ECHO_MSG}; \
+ ${ECHO_MSG} "This is an 'INTERNAL' port, meaning that the distfile is not retrieved"; \
+ ${ECHO_MSG} "from the Internet, but rather created from a local checkout of the"; \
+ ${ECHO_MSG} "BSD Installer CVS repository. Please see the shell scripts in the"; \
+ ${ECHO_MSG} "scripts/build directory of the repository for more information on how"; \
+ ${ECHO_MSG} "to create these distfiles."; \
+ false; \
+ fi
+
+do-install:
+ ${INSTALL_PROGRAM} -o root -g wheel -m 444 ${WRKSRC}/lgettext.so ${LOCALBASE}/lib/lua/5.0/
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/gettext.lua ${LOCALBASE}/share/lua/5.0/
+
+OSTYPE!=sysctl -n kern.ostype
+
+.if ${OSTYPE} == "FreeBSD"
+.include
+.endif
+
+.if ${OSTYPE} == "DragonFly"
+.include
+.endif
Index: contrib/bsdinstaller/ports/devel/lua50-gettext/pkg-descr
===================================================================
RCS file: contrib/bsdinstaller/ports/devel/lua50-gettext/pkg-descr
diff -N contrib/bsdinstaller/ports/devel/lua50-gettext/pkg-descr
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/devel/lua50-gettext/pkg-descr 23 Feb 2005 17:19:43 -0000
@@ -0,0 +1 @@
+Lua bindings for Gettext.
Index: contrib/bsdinstaller/ports/devel/lua50-posix/Makefile
===================================================================
RCS file: contrib/bsdinstaller/ports/devel/lua50-posix/Makefile
diff -N contrib/bsdinstaller/ports/devel/lua50-posix/Makefile
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/devel/lua50-posix/Makefile 30 Jul 2005 20:43:15 -0000
@@ -0,0 +1,35 @@
+# New ports collection makefile for: lua50-posix
+# Date created: 10 Feb 2005
+# Whom: Chris Pressey
+
+PORTNAME= lua50-posix
+PORTVERSION= 2005.0327
+CATEGORIES= devel
+DISTNAME= lposix
+WRKSRC= work/posix
+MASTER_SITES= http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/
+
+LIB_DEPENDS= lua50.5:${PORTSDIR}/lang/lua50
+BUILD_DEPENDS= ${LOCALBASE}/bin/lua50c51:${PORTSDIR}/devel/lua50-compat51
+RUN_DEPENDS= ${LOCALBASE}/bin/lua50c51:${PORTSDIR}/devel/lua50-compat51
+
+MAINTAINER= cpressey@catseye.mine.nu
+COMMENT= POSIX bindings for Lua 5.0.x
+
+PLIST_FILES= lib/lua/5.0/lposix.so \
+ share/lua/5.0/posix.lua
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/lposix.so ${PREFIX}/lib/lua/5.0/
+ ${INSTALL_DATA} ${WRKSRC}/posix.lua ${PREFIX}/share/lua/5.0/
+
+OSTYPE!=sysctl -n kern.ostype
+
+.if ${OSTYPE} == "FreeBSD"
+.include
+.endif
+
+.if ${OSTYPE} == "DragonFly"
+.include
+.endif
+
Index: contrib/bsdinstaller/ports/devel/lua50-posix/distinfo
===================================================================
RCS file: contrib/bsdinstaller/ports/devel/lua50-posix/distinfo
diff -N contrib/bsdinstaller/ports/devel/lua50-posix/distinfo
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/devel/lua50-posix/distinfo 27 Mar 2005 23:40:21 -0000
@@ -0,0 +1,2 @@
+MD5 (lposix.tar.gz) = f22871247e444412a901d179028a0d82
+SIZE (lposix.tar.gz) = 9651
Index: contrib/bsdinstaller/ports/devel/lua50-posix/pkg-descr
===================================================================
RCS file: contrib/bsdinstaller/ports/devel/lua50-posix/pkg-descr
diff -N contrib/bsdinstaller/ports/devel/lua50-posix/pkg-descr
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/devel/lua50-posix/pkg-descr 27 Mar 2005 23:40:21 -0000
@@ -0,0 +1,2 @@
+These are POSIX bindings for lua 5.0.x.
+
Index: contrib/bsdinstaller/ports/devel/lua50-posix/files/patch-Makefile
===================================================================
RCS file: contrib/bsdinstaller/ports/devel/lua50-posix/files/patch-Makefile
diff -N contrib/bsdinstaller/ports/devel/lua50-posix/files/patch-Makefile
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/devel/lua50-posix/files/patch-Makefile 3 Apr 2005 21:26:08 -0000
@@ -0,0 +1,41 @@
+--- Makefile.orig 2003-11-05 16:26:49.000000000 -0800
++++ Makefile 2005-04-03 14:22:32.000000000 -0700
+@@ -1,30 +1,33 @@
+ # makefile for POSIX library for Lua
+
+ # change these to reflect your Lua installation
+-LUA= /tmp/lhf/lua-5.0
++LUA= /usr/local
+ LUAINC= $(LUA)/include
+ LUALIB= $(LUA)/lib
+ LUABIN= $(LUA)/bin
+
+ # no need to change anything below here
+ CFLAGS= -fPIC $(INCS) $(WARN) -O2 $G
+-WARN= -pedantic -Wall
++WARN= -Wall
+ INCS= -I$(LUAINC)
+
+ MYNAME= posix
+ MYLIB= l$(MYNAME)
+
+-OBJS= $(MYLIB).o
++OBJS= $(MYLIB).o compat-5.1.o
+
+ T= $(MYLIB).so
+
+-all: test
++all: $T
+
+ test: $T
+ $(LUABIN)/lua -l$(MYNAME) test.lua
+
+ $T: $(OBJS)
+- $(CC) -o $@ -shared $(OBJS)
++ $(CC) -o $@ -shared $(OBJS) -L$(LUALIB) -llua50 -llualib50
++
++compat-5.1.c: $(LUALIB)/lua/compat-5.1r2/compat-5.1.c
++ cp $(LUALIB)/lua/compat-5.1r2/compat-5.1.? .
+
+ $(OBJS): modemuncher.c
+
Index: contrib/bsdinstaller/ports/devel/lua50-posix/files/patch-lposix.c
===================================================================
RCS file: contrib/bsdinstaller/ports/devel/lua50-posix/files/patch-lposix.c
diff -N contrib/bsdinstaller/ports/devel/lua50-posix/files/patch-lposix.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/devel/lua50-posix/files/patch-lposix.c 4 Apr 2005 13:56:37 -0000
@@ -0,0 +1,139 @@
+--- lposix.c.orig Thu Nov 6 03:23:48 2003
++++ lposix.c Mon Apr 4 17:30:55 2005
+@@ -9,6 +9,7 @@
+ #include
+ #include
+ #include
++#include
+ #include
+ #include
+ #include
+@@ -24,10 +25,10 @@
+ #include
+
+ #define MYNAME "posix"
+-#define MYVERSION MYNAME " library for " LUA_VERSION " / Nov 2003"
++#define MYVERSION "2005.0327"
+
+-#include "lua.h"
+-#include "lauxlib.h"
++#include "lua50/lua.h"
++#include "lua50/lauxlib.h"
+
+ #ifndef MYBUFSIZ
+ #define MYBUFSIZ 512
+@@ -112,6 +113,20 @@
+ return pusherror(L, info);
+ }
+
++/*
++ * This function is adapted from liolib.c: push a FILE * onto the
++ * Lua stack as a file object that Lua's file module understands.
++ */
++static void pushfileptr(lua_State *L, FILE *f)
++{
++ FILE **pf;
++
++ pf = (FILE **)lua_newuserdata(L, sizeof(FILE *));
++ *pf = f;
++ luaL_getmetatable(L, "FILE*");
++ lua_setmetatable(L, -2);
++}
++
+ static void badoption(lua_State *L, int i, const char *what, int option)
+ {
+ luaL_argerror(L, 2,
+@@ -312,6 +327,33 @@
+ }
+
+
++static int Pmkstemp(lua_State *L) /** mkstemp(template) */
++{
++ char *tpl;
++ int fd;
++ FILE *f;
++
++ if ((tpl = strdup(luaL_checkstring(L, 1))) == NULL) {
++ lua_pushnil(L);
++ lua_pushnumber(L, ENOMEM);
++ return(2);
++ }
++ fd = mkstemp(tpl);
++ f = fdopen(fd, "w+");
++ if (f == NULL) {
++ lua_pushnil(L);
++ lua_pushnumber(L, errno);
++ free(tpl);
++ return(1);
++ }
++
++ pushfileptr(L, f);
++ lua_pushstring(L, tpl);
++ free(tpl);
++ return(2);
++}
++
++
+ static int Pexec(lua_State *L) /** exec(path,[args]) */
+ {
+ const char *path = luaL_checkstring(L, 1);
+@@ -355,6 +397,40 @@
+ }
+
+
++static int Pnanosleep(lua_State *L) /** nanosleep(secs,[nanosecs]) */
++{
++ double sec, nsec;
++ struct timespec ts;
++
++ sec = lua_tonumber(L, 1);
++ nsec = lua_tonumber(L, 2);
++
++ /*
++ * Any fractional part of the seconds value should
++ * slide over into the nanoseconds value.
++ */
++ nsec += (sec - floor(sec)) * 1000000000.0;
++
++ /*
++ * Don't allow overflow.
++ */
++ if (sec > 1000000000.0) {
++ sec = 1000000000.0;
++ }
++ while (nsec > 1000000000.0) {
++ nsec -= 1000000000.0;
++ sec += 1.0;
++ }
++
++ ts.tv_sec = sec;
++ ts.tv_nsec = nsec;
++
++ lua_pushnumber(L, nanosleep(&ts, NULL));
++
++ return 1;
++}
++
++
+ static int Pputenv(lua_State *L) /** putenv(string) */
+ {
+ size_t l;
+@@ -777,6 +853,8 @@
+ {"link", Plink},
+ {"mkdir", Pmkdir},
+ {"mkfifo", Pmkfifo},
++ {"mkstemp", Pmkstemp},
++ {"nanosleep", Pnanosleep},
+ {"pathconf", Ppathconf},
+ {"putenv", Pputenv},
+ {"readlink", Preadlink},
+@@ -809,4 +887,9 @@
+ lua_pushliteral(L,MYVERSION);
+ lua_settable(L,-3);
+ return 1;
++}
++
++LUALIB_API int luaopen_lposix (lua_State *L)
++{
++ return luaopen_posix(L);
+ }
Index: contrib/bsdinstaller/ports/devel/lua50-posix/files/patch-posix.lua
===================================================================
RCS file: contrib/bsdinstaller/ports/devel/lua50-posix/files/patch-posix.lua
diff -N contrib/bsdinstaller/ports/devel/lua50-posix/files/patch-posix.lua
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/devel/lua50-posix/files/patch-posix.lua 29 Mar 2005 05:48:46 -0000
@@ -0,0 +1,16 @@
+--- posix.lua.orig 2003-06-18 05:47:44.000000000 -0700
++++ posix.lua 2005-03-28 20:13:37.000000000 -0800
+@@ -2,9 +2,8 @@
+ -- support code for posix library
+ -- usage lua -lposix ...
+
+-local function so(x)
+- local SOPATH= os.getenv"LUA_SOPATH" or "./"
+- assert(loadlib(SOPATH.."l"..x..".so","luaopen_"..x))()
+-end
++module("posix")
+
+-so"posix"
++require "lposix"
++
++return posix
Index: contrib/bsdinstaller/ports/devel/lua50-pty/Makefile
===================================================================
RCS file: contrib/bsdinstaller/ports/devel/lua50-pty/Makefile
diff -N contrib/bsdinstaller/ports/devel/lua50-pty/Makefile
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/devel/lua50-pty/Makefile 30 Jul 2005 20:43:15 -0000
@@ -0,0 +1,47 @@
+# New ports collection makefile for: lua50-pty
+# Date created: 3 Apr 2005
+# Whom: Chris Pressey
+
+PORTNAME= lua50-pty
+PORTVERSION= 0.1
+INTERNAL= YES
+CATEGORIES= devel
+DISTNAME= luapty-${PORTVERSION}
+WRKSRC= work/pty
+
+LIB_DEPENDS= lua50.5:${PORTSDIR}/lang/lua50
+BUILD_DEPENDS= ${LOCALBASE}/bin/lua50c51:${PORTSDIR}/devel/lua50-compat51
+RUN_DEPENDS= ${LOCALBASE}/bin/lua50c51:${PORTSDIR}/devel/lua50-compat51
+
+MAINTAINER= cpressey@catseye.mine.nu
+COMMENT= Pty (pseudo-terminal) bindings for Lua 5.0.x
+
+PLIST_FILES= lib/lua/5.0/lpty.so \
+ share/lua/5.0/pty.lua
+
+do-fetch:
+ @if [ ! -f ${_DISTDIR}${DISTNAME}${EXTRACT_SUFX} ]; then \
+ ${ECHO_MSG}; \
+ ${ECHO_MSG} "Distfile ${DISTNAME}${EXTRACT_SUFX} not found!"; \
+ ${ECHO_MSG}; \
+ ${ECHO_MSG} "This is an 'INTERNAL' port, meaning that the distfile is not retrieved"; \
+ ${ECHO_MSG} "from the Internet, but rather created from a local checkout of the"; \
+ ${ECHO_MSG} "BSD Installer CVS repository. Please see the shell scripts in the"; \
+ ${ECHO_MSG} "scripts/build directory of the repository for more information on how"; \
+ ${ECHO_MSG} "to create these distfiles."; \
+ false; \
+ fi
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/lpty.so ${PREFIX}/lib/lua/5.0
+ ${INSTALL_DATA} ${WRKSRC}/pty.lua ${PREFIX}/share/lua/5.0
+
+OSTYPE!=sysctl -n kern.ostype
+
+.if ${OSTYPE} == "FreeBSD"
+.include
+.endif
+
+.if ${OSTYPE} == "DragonFly"
+.include
+.endif
Index: contrib/bsdinstaller/ports/devel/lua50-pty/pkg-descr
===================================================================
RCS file: contrib/bsdinstaller/ports/devel/lua50-pty/pkg-descr
diff -N contrib/bsdinstaller/ports/devel/lua50-pty/pkg-descr
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/devel/lua50-pty/pkg-descr 3 Apr 2005 20:00:18 -0000
@@ -0,0 +1 @@
+Lua 5.0.x bindings Pty's (pseudo-terminals.)
Index: contrib/bsdinstaller/ports/lang/lua50/Makefile
===================================================================
RCS file: contrib/bsdinstaller/ports/lang/lua50/Makefile
diff -N contrib/bsdinstaller/ports/lang/lua50/Makefile
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/lang/lua50/Makefile 17 Mar 2005 08:26:30 -0000
@@ -0,0 +1,50 @@
+# New ports collection makefile for: lua50
+# Date created: 16 Feb 2005
+# Whom: Chris Pressey
+
+PORTNAME= lua50
+PORTVERSION= 5.0.2
+CATEGORIES= lang
+DISTNAME= lua-${PORTVERSION}
+MASTER_SITES= http://www.lua.org/ftp/ \
+ ftp://ftp.tecgraf.puc-rio.br/pub/lua/ \
+ ftp://csg.uwaterloo.ca/pub/lhf/lua/ \
+ ftp://ftp.ntua.gr/pub/lang/lua/ \
+ ftp://ftp.uni-trier.de/pub/languages/lua/ \
+ ftp://ftp.gwdg.de/pub/languages/lua/
+
+COMMENT= Maintenance (5.0.x) version of Lua
+
+USE_REINPLACE= yes
+ALL_TARGET= all so
+INSTALL_TARGET= install soinstall
+INSTALLS_SHLIB= YES
+
+do-configure:
+ ${REINPLACE_CMD} \
+ -e 's|^\(MYCFLAGS=\).*$$|\1 ${CFLAGS}|' \
+ -e 's|^\(LOADLIB=\).*$$|\1 -DUSE_DLOPEN=1|' \
+ -e 's|^\(CC=\).*$$|\1 ${CC}|' \
+ -e 's|^\(STRIP=\).*$$|\1 ${STRIP_CMD}|' \
+ -e 's|^\(INSTALL_ROOT=\).*$$|\1 ${PREFIX}|' \
+ -e 's|^\(INSTALL_EXEC=\).*$$|\1 ${INSTALL_PROGRAM}|' \
+ -e 's|^\(INSTALL_DATA=\).*$$|\1 ${INSTALL_DATA}|' \
+ -e 's|^\(INSTALL_INC=\).*$$|\1 ${PREFIX}/include/lua50|' \
+ -e 's|^#\(USERCONF.*READLINE.*\)$$|\1|' \
+ -e 's|^\(EXTRA_LIBS=\).*$$|\1 -lm -lreadline -lhistory -lncurses|' \
+ -e 's|V=5.0|V=5|' \
+ ${WRKSRC}/config
+
+.if ${MACHINE_ARCH:L} == "amd64"
+CFLAGS+= -fPIC
+.endif
+
+OSTYPE!=sysctl -n kern.ostype
+
+.if ${OSTYPE} == "FreeBSD"
+.include
+.endif
+
+.if ${OSTYPE} == "DragonFly"
+.include
+.endif
Index: contrib/bsdinstaller/ports/lang/lua50/distinfo
===================================================================
RCS file: contrib/bsdinstaller/ports/lang/lua50/distinfo
diff -N contrib/bsdinstaller/ports/lang/lua50/distinfo
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/lang/lua50/distinfo 17 Feb 2005 05:48:39 -0000
@@ -0,0 +1,2 @@
+MD5 (lua-5.0.2.tar.gz) = dea74646b7e5c621fef7174df83c34b1
+SIZE (lua-5.0.2.tar.gz) = 190442
Index: contrib/bsdinstaller/ports/lang/lua50/pkg-descr
===================================================================
RCS file: contrib/bsdinstaller/ports/lang/lua50/pkg-descr
diff -N contrib/bsdinstaller/ports/lang/lua50/pkg-descr
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/lang/lua50/pkg-descr 17 Feb 2005 05:48:39 -0000
@@ -0,0 +1,3 @@
+This is a maintenance version of Lua, 5.0.x.
+
+WWW: http://www.lua.org/
Index: contrib/bsdinstaller/ports/lang/lua50/pkg-plist
===================================================================
RCS file: contrib/bsdinstaller/ports/lang/lua50/pkg-plist
diff -N contrib/bsdinstaller/ports/lang/lua50/pkg-plist
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/lang/lua50/pkg-plist 17 Feb 2005 05:48:39 -0000
@@ -0,0 +1,12 @@
+bin/lua50
+bin/luac50
+include/lua50/lauxlib.h
+include/lua50/lua.h
+include/lua50/lualib.h
+lib/liblua50.a
+lib/liblua50.so
+lib/liblua50.so.5
+lib/liblualib50.a
+lib/liblualib50.so
+lib/liblualib50.so.5
+
Index: contrib/bsdinstaller/ports/lang/lua50/files/patch-Makefile
===================================================================
RCS file: contrib/bsdinstaller/ports/lang/lua50/files/patch-Makefile
diff -N contrib/bsdinstaller/ports/lang/lua50/files/patch-Makefile
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/lang/lua50/files/patch-Makefile 17 Feb 2005 05:48:39 -0000
@@ -0,0 +1,33 @@
+--- Makefile.orig 2004-03-11 17:50:55.000000000 -0800
++++ Makefile 2005-02-16 19:56:33.000000000 -0800
+@@ -30,17 +30,16 @@
+
+ # official installation
+ install: all strip
+- mkdir -p $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN)
++ mkdir -p $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB)
+ $(INSTALL_EXEC) bin/* $(INSTALL_BIN)
+ $(INSTALL_DATA) include/*.h $(INSTALL_INC)
+ $(INSTALL_DATA) lib/*.a $(INSTALL_LIB)
+- $(INSTALL_DATA) doc/*.1 $(INSTALL_MAN)
+
+ # shared libraries (for Linux)
+ so:
+- ld -o lib/liblua.so.$V -shared src/*.o
+- ld -o lib/liblualib.so.$V -shared src/lib/*.o
+- cd lib; ln -fs liblua.so.$V liblua.so; ln -fs liblualib.so.$V liblualib.so
++ ld -o lib/liblua50.so.$V -shared src/*.o
++ ld -o lib/liblualib50.so.$V -shared src/lib/*.o
++ cd lib; ln -fs liblua50.so.$V liblua50.so; ln -fs liblualib50.so.$V liblualib50.so
+
+ # binaries using shared libraries
+ sobin:
+@@ -51,7 +50,7 @@
+ # install shared libraries
+ soinstall:
+ $(INSTALL_EXEC) lib/*.so.* $(INSTALL_LIB)
+- cd $(INSTALL_LIB); ln -fs liblua.so.$V liblua.so; ln -fs liblualib.so.$V liblualib.so
++ cd $(INSTALL_LIB); ln -fs liblua50.so.$V liblua50.so; ln -fs liblualib50.so.$V liblualib50.so
+
+ # clean shared libraries
+ soclean:
Index: contrib/bsdinstaller/ports/lang/lua50/files/patch-src__Makefile
===================================================================
RCS file: contrib/bsdinstaller/ports/lang/lua50/files/patch-src__Makefile
diff -N contrib/bsdinstaller/ports/lang/lua50/files/patch-src__Makefile
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/lang/lua50/files/patch-src__Makefile 17 Feb 2005 05:48:39 -0000
@@ -0,0 +1,11 @@
+--- src/Makefile.orig 2005-02-16 19:56:55.000000000 -0800
++++ src/Makefile 2005-02-16 19:57:06.000000000 -0800
+@@ -67,7 +67,7 @@
+ lvm.h \
+ lzio.h
+
+-T= $(LIB)/liblua.a
++T= $(LIB)/liblua50.a
+
+ all: $T
+
Index: contrib/bsdinstaller/ports/lang/lua50/files/patch-src__lib__Makefile
===================================================================
RCS file: contrib/bsdinstaller/ports/lang/lua50/files/patch-src__lib__Makefile
diff -N contrib/bsdinstaller/ports/lang/lua50/files/patch-src__lib__Makefile
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/lang/lua50/files/patch-src__lib__Makefile 17 Feb 2005 05:48:39 -0000
@@ -0,0 +1,11 @@
+--- src/lib/Makefile.orig 2005-02-16 20:00:23.000000000 -0800
++++ src/lib/Makefile 2005-02-16 20:00:33.000000000 -0800
+@@ -9,7 +9,7 @@
+ OBJS= lauxlib.o lbaselib.o ldblib.o liolib.o lmathlib.o ltablib.o lstrlib.o loadlib.o
+ SRCS= lauxlib.c lbaselib.c ldblib.c liolib.c lmathlib.c ltablib.c lstrlib.c loadlib.c
+
+-T= $(LIB)/liblualib.a
++T= $(LIB)/liblualib50.a
+
+ all: $T
+
Index: contrib/bsdinstaller/ports/lang/lua50/files/patch-src__lib__lmathlib.c
===================================================================
RCS file: contrib/bsdinstaller/ports/lang/lua50/files/patch-src__lib__lmathlib.c
diff -N contrib/bsdinstaller/ports/lang/lua50/files/patch-src__lib__lmathlib.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/lang/lua50/files/patch-src__lib__lmathlib.c 17 Feb 2005 05:48:39 -0000
@@ -0,0 +1,20 @@
+--- src/lib/lmathlib.c.orig Tue Mar 11 21:30:37 2003
++++ src/lib/lmathlib.c Fri May 9 02:32:59 2003
+@@ -170,7 +170,7 @@
+ static int math_random (lua_State *L) {
+ /* the `%' avoids the (rare) case of r==1, and is needed also because on
+ some systems (SunOS!) `rand()' may return a value larger than RAND_MAX */
+- lua_Number r = (lua_Number)(rand()%RAND_MAX) / (lua_Number)RAND_MAX;
++ lua_Number r = (lua_Number)(random()%RAND_MAX) / (lua_Number)RAND_MAX;
+ switch (lua_gettop(L)) { /* check number of arguments */
+ case 0: { /* no arguments */
+ lua_pushnumber(L, r); /* Number between 0 and 1 */
+@@ -196,7 +196,7 @@
+
+
+ static int math_randomseed (lua_State *L) {
+- srand(luaL_checkint(L, 1));
++ srandom(luaL_checkint(L, 1));
+ return 0;
+ }
+
Index: contrib/bsdinstaller/ports/lang/lua50/files/patch-src__lua__Makefile
===================================================================
RCS file: contrib/bsdinstaller/ports/lang/lua50/files/patch-src__lua__Makefile
diff -N contrib/bsdinstaller/ports/lang/lua50/files/patch-src__lua__Makefile
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/lang/lua50/files/patch-src__lua__Makefile 17 Feb 2005 05:48:39 -0000
@@ -0,0 +1,18 @@
+--- src/lua/Makefile.orig 2003-04-08 19:07:23.000000000 -0700
++++ src/lua/Makefile 2005-02-16 19:59:19.000000000 -0800
+@@ -8,12 +8,12 @@
+ OBJS= lua.o
+ SRCS= lua.c
+
+-T= $(BIN)/lua
++T= $(BIN)/lua50
+
+ all: $T
+
+-$T: $(OBJS) $(LIB)/liblua.a $(LIB)/liblualib.a
+- $(CC) -o $@ $(MYLDFLAGS) $(OBJS) -L$(LIB) -llua -llualib $(EXTRA_LIBS) $(DLLIB)
++$T: $(OBJS) $(LIB)/liblua50.a $(LIB)/liblualib50.a
++ $(CC) -o $@ $(MYLDFLAGS) $(OBJS) -L$(LIB) -llua50 -llualib50 $(EXTRA_LIBS) $(DLLIB)
+
+ $(LIB)/liblua.a:
+ cd ..; $(MAKE)
Index: contrib/bsdinstaller/ports/lang/lua50/files/patch-src__luac__Makefile
===================================================================
RCS file: contrib/bsdinstaller/ports/lang/lua50/files/patch-src__luac__Makefile
diff -N contrib/bsdinstaller/ports/lang/lua50/files/patch-src__luac__Makefile
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/lang/lua50/files/patch-src__luac__Makefile 17 Feb 2005 05:48:39 -0000
@@ -0,0 +1,18 @@
+--- src/luac/Makefile.orig 2003-10-21 04:54:08.000000000 -0700
++++ src/luac/Makefile 2005-02-16 19:59:00.000000000 -0800
+@@ -8,12 +8,12 @@
+ OBJS= luac.o print.o lopcodes.o
+ SRCS= luac.c print.c
+
+-T= $(BIN)/luac
++T= $(BIN)/luac50
+
+ all: $T
+
+-$T: $(OBJS) $(LIB)/liblua.a $(LIB)/liblualib.a
+- $(CC) -o $@ $(MYLDFLAGS) $(OBJS) -L$(LIB) -llua -llualib $(EXTRA_LIBS) $(DLLIB)
++$T: $(OBJS) $(LIB)/liblua50.a $(LIB)/liblualib50.a
++ $(CC) -o $@ $(MYLDFLAGS) $(OBJS) -L$(LIB) -llua50 -llualib50 $(EXTRA_LIBS) $(DLLIB)
+
+ # print.c needs opcode names from lopcodes.c
+ lopcodes.o: ../lopcodes.c ../lopcodes.h
Index: contrib/bsdinstaller/ports/net/lua50-socket/Makefile
===================================================================
RCS file: contrib/bsdinstaller/ports/net/lua50-socket/Makefile
diff -N contrib/bsdinstaller/ports/net/lua50-socket/Makefile
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/net/lua50-socket/Makefile 30 Jul 2005 20:43:15 -0000
@@ -0,0 +1,43 @@
+# New ports collection makefile for: lua50-socket
+# Date created: 15 Feb 2005
+# Whom: Chris Pressey
+
+PORTNAME= lua50-socket
+PORTVERSION= 2.0.b3
+CATEGORIES= net
+DISTNAME= luasocket-2.0-beta3
+MASTER_SITES= http://www.cs.princeton.edu/~diego/professional/luasocket/
+
+COMMENT= Socket binding for Lua 5.0.x (+5.1-compat)
+
+BUILD_DEPENDS= ${LOCALBASE}/bin/lua50c51:${PORTSDIR}/devel/lua50-compat51
+RUN_DEPENDS= ${LOCALBASE}/bin/lua50c51:${PORTSDIR}/devel/lua50-compat51
+
+PLIST_FILES= lib/lua/5.0/lsocket.so \
+ lib/lua/5.0/lmime.so \
+ share/lua/5.0/ftp.lua \
+ share/lua/5.0/http.lua \
+ share/lua/5.0/ltn12.lua \
+ share/lua/5.0/mime.lua \
+ share/lua/5.0/smtp.lua \
+ share/lua/5.0/socket.lua \
+ share/lua/5.0/tp.lua \
+ share/lua/5.0/url.lua
+
+USE_GMAKE= YES
+MAKEFILE= makefile.Linux
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/lsocket.so ${PREFIX}/lib/lua/5.0/
+ ${INSTALL_PROGRAM} ${WRKSRC}/lmime.so ${PREFIX}/lib/lua/5.0/
+ ${INSTALL_DATA} ${WRKSRC}/lua/*.lua ${PREFIX}/share/lua/5.0/
+
+OSTYPE!=sysctl -n kern.ostype
+
+.if ${OSTYPE} == "FreeBSD"
+.include
+.endif
+
+.if ${OSTYPE} == "DragonFly"
+.include
+.endif
Index: contrib/bsdinstaller/ports/net/lua50-socket/distinfo
===================================================================
RCS file: contrib/bsdinstaller/ports/net/lua50-socket/distinfo
diff -N contrib/bsdinstaller/ports/net/lua50-socket/distinfo
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/net/lua50-socket/distinfo 17 Feb 2005 05:57:53 -0000
@@ -0,0 +1,2 @@
+MD5 (luasocket-2.0-beta3.tar.gz) = ba32118746205cb088ce7fed06d8d1b7
+SIZE (luasocket-2.0-beta3.tar.gz) = 115472
Index: contrib/bsdinstaller/ports/net/lua50-socket/pkg-descr
===================================================================
RCS file: contrib/bsdinstaller/ports/net/lua50-socket/pkg-descr
diff -N contrib/bsdinstaller/ports/net/lua50-socket/pkg-descr
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/net/lua50-socket/pkg-descr 17 Feb 2005 05:57:53 -0000
@@ -0,0 +1,2 @@
+Luasocket is a socket binding for Lua 5.
+
Index: contrib/bsdinstaller/ports/net/lua50-socket/files/patch-Makefile
===================================================================
RCS file: contrib/bsdinstaller/ports/net/lua50-socket/files/patch-Makefile
diff -N contrib/bsdinstaller/ports/net/lua50-socket/files/patch-Makefile
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/net/lua50-socket/files/patch-Makefile 9 Apr 2005 05:18:57 -0000
@@ -0,0 +1,35 @@
+--- makefile.Linux.orig 2005-01-15 14:52:38.000000000 -0800
++++ makefile.Linux 2005-04-08 22:07:50.000000000 -0700
+@@ -3,7 +3,7 @@
+
+ COMPAT=compat-5.1r2
+
+-LUAC=luac
++LUAC=lua50c
+ BIN2C=bin2c
+ CC=gcc
+ OPT=-O2 $(INC)
+@@ -28,7 +28,9 @@
+ mime.o \
+ $(COMPAT)/compat-5.1.o
+
+-CFLAGS=-I../../include -I$(COMPAT) $(PROF) $(OPT) $(DBG) $(DEF) -pedantic -W -Wall
++CFLAGS=-I../../include -I$(COMPAT) -I/usr/local/include/lua50 \
++ $(PROF) $(OPT) $(DBG) $(DEF) -pedantic -W -Wall
++LDFLAGS=-L/usr/local/lib -llua50 -llualib50
+
+ LDYN=lsocket.so
+
+@@ -37,10 +39,10 @@
+ all: $(LDYN) $(MDYN)
+
+ $(LDYN): $(LOBJS)
+- gcc -shared -o $(LDYN) $(LOBJS)
++ gcc -shared -o $(LDYN) $(LOBJS) $(LDFLAGS)
+
+ $(MDYN): $(MOBJS)
+- gcc -shared -o $(MDYN) $(MOBJS)
++ gcc -shared -o $(MDYN) $(MOBJS) $(LDFLAGS)
+
+ auxiliar.o: auxiliar.c auxiliar.h
+ buffer.o: buffer.c buffer.h io.h timeout.h
Index: contrib/bsdinstaller/ports/net/lua50-socket/files/patch-lua__smtp.lua
===================================================================
RCS file: contrib/bsdinstaller/ports/net/lua50-socket/files/patch-lua__smtp.lua
diff -N contrib/bsdinstaller/ports/net/lua50-socket/files/patch-lua__smtp.lua
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/net/lua50-socket/files/patch-lua__smtp.lua 31 Jul 2005 04:13:04 -0000
@@ -0,0 +1,41 @@
+--- lua/smtp.lua 2005/07/26 21:06:14 1.1
++++ lua/smtp.lua 2005/07/31 00:05:08 1.2
+@@ -14,11 +14,13 @@ local string = require("string")
+ local math = require("math")
+ local os = require("os")
+ local socket = require("socket")
+-local tp = require("socket.tp")
++local tp = require("tp")
+ local ltn12 = require("ltn12")
+ local mime = require("mime")
+ module("socket.smtp")
+
++smtp = {}
++
+ -----------------------------------------------------------------------------
+ -- Program constants
+ -----------------------------------------------------------------------------
+@@ -222,7 +224,7 @@ local function adjust_headers(mesgt)
+ mesgt.headers = lower
+ end
+
+-function message(mesgt)
++function smtp.message(mesgt)
+ adjust_headers(mesgt)
+ -- create and return message source
+ local co = coroutine.create(function() send_message(mesgt) end)
+@@ -236,7 +238,7 @@ end
+ ---------------------------------------------------------------------------
+ -- High level SMTP API
+ -----------------------------------------------------------------------------
+-send = socket.protect(function(mailt)
++smtp.send = socket.protect(function(mailt)
+ local s = open(mailt.server, mailt.port)
+ local ext = s:greet(mailt.domain)
+ s:auth(mailt.user, mailt.password, ext)
+@@ -246,3 +248,5 @@ send = socket.protect(function(mailt)
+ end)
+
+ --getmetatable(_M).__index = nil
++
++return smtp
Index: contrib/bsdinstaller/ports/net/lua50-socket/files/patch-lua__tp.lua
===================================================================
RCS file: contrib/bsdinstaller/ports/net/lua50-socket/files/patch-lua__tp.lua
diff -N contrib/bsdinstaller/ports/net/lua50-socket/files/patch-lua__tp.lua
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/net/lua50-socket/files/patch-lua__tp.lua 31 Jul 2005 04:13:04 -0000
@@ -0,0 +1,26 @@
+--- lua/tp.lua 2005/07/26 21:06:14 1.1
++++ lua/tp.lua 2005/07/31 00:05:08 1.2
+@@ -14,6 +14,8 @@ local socket = require("socket")
+ local ltn12 = require("ltn12")
+ module("socket.tp")
+
++tp = {}
++
+ -----------------------------------------------------------------------------
+ -- Program constants
+ -----------------------------------------------------------------------------
+@@ -108,7 +110,7 @@ function metat.__index:close()
+ end
+
+ -- connect with server and return c object
+-function connect(host, port, timeout)
++function tp.connect(host, port, timeout)
+ local c, e = socket.tcp()
+ if not c then return nil, e end
+ c:settimeout(timeout or TIMEOUT)
+@@ -121,3 +123,5 @@ function connect(host, port, timeout)
+ end
+
+ --getmetatable(_M).__index = nil
++
++return tp
Index: contrib/bsdinstaller/ports/sysutils/bsdinstaller/Makefile
===================================================================
RCS file: contrib/bsdinstaller/ports/sysutils/bsdinstaller/Makefile
diff -N contrib/bsdinstaller/ports/sysutils/bsdinstaller/Makefile
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/sysutils/bsdinstaller/Makefile 11 Oct 2006 22:32:16 -0000
@@ -0,0 +1,451 @@
+# New ports collection makefile for: bsdinstaller
+# Date created: July 24, 2005
+# Whom: Chris Pressey
+
+PORTNAME= bsdinstaller
+PORTVERSION= 2.0
+INTERNAL= YES
+CATEGORIES= sysutils
+DISTNAME= ${PORTNAME}-${PORTVERSION}
+WRKSRC= work/installer/src
+
+.if defined(WITH_NLS)
+LIB_DEPENDS= intl.6:${PORTSDIR}/devel/gettext
+.endif
+
+MAINTAINER= cpressey@catseye.mine.nu
+COMMENT= BSD Installer mega-package
+
+# XXX Not sure if this should be LOCALBASE or PREFIX... probably LOCALBASE?
+.if defined(WITH_NLS)
+LOCALEDIR= ${LOCALBASE}/share/locale
+LANGUAGES= ru
+ALL_TARGET= nls
+.else
+MAKE_ARGS+= LOCALEDIR="" NLS_CFLAGS="" NLS_LDFLAGS=""
+.endif
+
+.if defined(WITH_QT)
+USE_QT_VER= 3
+.endif
+
+DFUIBE_LUA_DIR= ${PREFIX}/share/dfuibe_lua
+
+# Make it so that we don't have to build the parts we're not installing...
+.if defined(WITH_QT)
+MAKE_ARGS+= BUILD_QT_FRONTEND=true
+.else
+MAKE_ARGS+= BUILD_QT_FRONTEND=false
+.endif
+
+.if defined(WITH_CGI)
+MAKE_ARGS+= BUILD_CGI_FRONTEND=true
+.else
+MAKE_ARGS+= BUILD_CGI_FRONTEND=false
+.endif
+
+.if defined(WITH_CURSES)
+MAKE_ARGS+= BUILD_NCURSES_FRONTEND=true
+.else
+MAKE_ARGS+= BUILD_NCURSES_FRONTEND=false
+.endif
+
+.if defined(WITH_C_BACKEND)
+MAKE_ARGS+= BUILD_C_BACKEND=true
+.else
+MAKE_ARGS+= BUILD_C_BACKEND=false
+.endif
+
+.if defined(WITH_LUA_BACKEND)
+MAKE_ARGS+= BUILD_LUA_BACKEND=true
+.else
+MAKE_ARGS+= BUILD_LUA_BACKEND=false
+.endif
+
+# Don't strip executables if this is being built as a "debuggable" package.
+.if defined(DEBUG) || defined(WITH_DEBUG) || defined(WITH_DEBUG_INFO) || defined(EXTRA_CFLAGS)
+STRIP=
+.endif
+
+###### Packing list.
+PLIST_FILES=
+
+# libaura
+PLIST_FILES+= lib/libaura.a \
+ lib/libaura.so \
+ lib/libaura.so.3 \
+ include/aura/buffer.h \
+ include/aura/dict.h \
+ include/aura/fspred.h \
+ include/aura/popen.h \
+ include/aura/mem.h
+
+# libdfui
+PLIST_FILES+= lib/libdfui.a \
+ lib/libdfui.so \
+ lib/libdfui.so.4 \
+ include/dfui/dfui.h \
+ include/dfui/dump.h \
+ include/dfui/lang.h \
+ include/dfui/system.h
+
+# libinstaller
+.if defined(WITH_C_BACKEND)
+PLIST_FILES+= lib/libinstaller.a \
+ lib/libinstaller.so \
+ lib/libinstaller.so.5 \
+ include/installer/commands.h \
+ include/installer/confed.h \
+ include/installer/diskutil.h \
+ include/installer/functions.h \
+ include/installer/package.h \
+ include/installer/uiutil.h
+.endif
+
+# dfuife_curses
+.if defined(WITH_CURSES)
+PLIST_FILES+= sbin/dfuife_curses \
+ share/dfuife_curses/fred.txt
+.if defined(WITH_NLS)
+PLIST_FILES+= share/locale/ru/LC_MESSAGES/dfuife_curses.mo
+.endif
+.endif
+
+# dfuife_cgi
+.if defined(WITH_CGI)
+PLIST_FILES+= www/dfuife.cgi \
+ www/dfly-pg.gif \
+ www/fred-bg.gif \
+ www/fred.png \
+ www/dfuife.css \
+ www/dfuife.js \
+ www/index.html
+.endif
+
+# dfuife_qt
+.if defined(WITH_QT)
+PLIST_FILES+= sbin/dfuife_qt
+.endif
+
+# dfuibe_installer
+.if defined(WITH_C_BACKEND)
+PLIST_FILES+= sbin/dfuibe_installer \
+ share/dfuibe_installer/cmdnames.conf
+.if defined(WITH_NLS)
+PLIST_FILES+= share/locale/ru/LC_MESSAGES/dfuibe_installer.mo
+.endif
+.endif
+
+# lua50 - maybe should go into libexec.
+.if defined(WITH_LUA_BACKEND)
+PLIST_FILES+= lib/liblua50.so \
+ lib/liblualib50.so \
+ bin/lua50 \
+ bin/lua50c
+
+# lua50-compat5.1
+PLIST_FILES+= share/lua/5.0/compat-5.1.lua \
+ lib/lua/${DISTNAME}/compat-5.1.c \
+ lib/lua/${DISTNAME}/compat-5.1.h \
+ bin/lua50c51
+
+# lua50-pty
+PLIST_FILES+= lib/lua/5.0/lpty.so \
+ share/lua/5.0/pty.lua
+
+# lua50-app
+PLIST_FILES+= share/lua/5.0/app.lua
+
+# lua50-gettext
+.if defined(WITH_NLS)
+PLIST_FILES+= lib/lua/5.0/lgettext.so \
+ share/lua/5.0/gettext.lua
+.endif
+
+# lua50-filename
+PLIST_FILES+= share/lua/5.0/filename.lua
+
+# lua50-posix
+PLIST_FILES+= lib/lua/5.0/lposix.so \
+ share/lua/5.0/posix.lua
+
+# lua50-dfui
+PLIST_FILES+= lib/lua/5.0/ldfui.so \
+ share/lua/5.0/dfui.lua
+
+# lua50-luasocket
+PLIST_FILES+= lib/lua/5.0/lsocket.so \
+ lib/lua/5.0/lmime.so \
+ share/lua/5.0/ftp.lua \
+ share/lua/5.0/http.lua \
+ share/lua/5.0/ltn12.lua \
+ share/lua/5.0/mime.lua \
+ share/lua/5.0/smtp.lua \
+ share/lua/5.0/socket.lua \
+ share/lua/5.0/tp.lua \
+ share/lua/5.0/url.lua
+
+# lua50-transceiver
+PLIST_FILES+= share/lua/5.0/transceiver.lua
+
+# lua50-curses
+.if defined(WITH_CURSES)
+PLIST_FILES+= lib/lua/5.0/lcurses.so \
+ share/lua/5.0/curses.lua
+.endif
+
+# dfuibe_lua
+PLIST_FILES+= share/dfuibe_lua/main.lua \
+ share/dfuibe_lua/200_install.lua \
+ share/dfuibe_lua/400_configure.lua \
+ share/dfuibe_lua/600_upgrade.lua \
+ share/dfuibe_lua/800_netboot.lua \
+ share/dfuibe_lua/950_reboot.lua \
+ share/dfuibe_lua/lib/bitwise.lua \
+ share/dfuibe_lua/lib/cmdchain.lua \
+ share/dfuibe_lua/lib/configvars.lua \
+ share/dfuibe_lua/lib/flow.lua \
+ share/dfuibe_lua/lib/menu.lua \
+ share/dfuibe_lua/lib/network.lua \
+ share/dfuibe_lua/lib/network_ui.lua \
+ share/dfuibe_lua/lib/package.lua \
+ share/dfuibe_lua/lib/package_ui.lua \
+ share/dfuibe_lua/lib/storage.lua \
+ share/dfuibe_lua/lib/storage_ui.lua \
+ share/dfuibe_lua/lib/target_system.lua \
+ share/dfuibe_lua/lib/target_system_ui.lua \
+ share/dfuibe_lua/lib/uinav.lua \
+ share/dfuibe_lua/conf/BSDInstaller.lua \
+ share/dfuibe_lua/conf/DragonFly.lua \
+ share/dfuibe_lua/conf/FreeBSD.lua \
+ share/dfuibe_lua/conf/NetBSD.lua \
+ share/dfuibe_lua/conf/OpenBSD.lua \
+ share/dfuibe_lua/pit/main.lua \
+ share/dfuibe_lua/pit/050_welcome.lua \
+ share/dfuibe_lua/pit/100_select_language.lua \
+ share/dfuibe_lua/pit/150_configure_console.lua \
+ share/dfuibe_lua/pit/400_load_kernel_modules.lua \
+ share/dfuibe_lua/pit/800_configure_network.lua \
+ share/dfuibe_lua/install/main.lua \
+ share/dfuibe_lua/install/100_welcome.lua \
+ share/dfuibe_lua/install/200_select_disk.lua \
+ share/dfuibe_lua/install/220_format_disk.lua \
+ share/dfuibe_lua/install/250_partition_disk.lua \
+ share/dfuibe_lua/install/270_install_bootblocks.lua \
+ share/dfuibe_lua/install/300_select_part.lua \
+ share/dfuibe_lua/install/400_select_subparts.lua \
+ share/dfuibe_lua/install/405_warn_omitted_subparts.lua \
+ share/dfuibe_lua/install/407_create_subparts.lua \
+ share/dfuibe_lua/install/410_select_additional_filesystems.lua \
+ share/dfuibe_lua/install/420_preselect_packages.lua \
+ share/dfuibe_lua/install/450_select_packages.lua \
+ share/dfuibe_lua/install/490_confirm_install_os.lua \
+ share/dfuibe_lua/install/500_install_os.lua \
+ share/dfuibe_lua/install/800_finished.lua \
+ share/dfuibe_lua/install/900_reboot.lua \
+ share/dfuibe_lua/configure/main.lua \
+ share/dfuibe_lua/configure/100_choose_where_from.lua \
+ share/dfuibe_lua/configure/200_select_disk.lua \
+ share/dfuibe_lua/configure/300_select_part.lua \
+ share/dfuibe_lua/configure/400_mount_target_system.lua \
+ share/dfuibe_lua/configure/450_init_configuration.lua \
+ share/dfuibe_lua/configure/500_menu.lua \
+ share/dfuibe_lua/configure/550_write_configuration.lua \
+ share/dfuibe_lua/configure/600_unmount_target_system.lua \
+ share/dfuibe_lua/configure/menu/main.lua \
+ share/dfuibe_lua/configure/menu/100_set_root_password.lua \
+ share/dfuibe_lua/configure/menu/200_add_user.lua \
+ share/dfuibe_lua/configure/menu/300_set_timezone.lua \
+ share/dfuibe_lua/configure/menu/350_set_datetime.lua \
+ share/dfuibe_lua/configure/menu/400_change_console_settings.lua \
+ share/dfuibe_lua/configure/menu/500_install_packages.lua \
+ share/dfuibe_lua/configure/menu/550_remove_packages.lua \
+ share/dfuibe_lua/upgrade/main.lua \
+ share/dfuibe_lua/upgrade/100_begin_upgrade.lua \
+ share/dfuibe_lua/upgrade/200_select_disk.lua \
+ share/dfuibe_lua/upgrade/300_select_part.lua \
+ share/dfuibe_lua/upgrade/400_mount_target_system.lua \
+ share/dfuibe_lua/upgrade/500_perform_upgrade.lua \
+ share/dfuibe_lua/upgrade/550_upgrade_configuration.lua \
+ share/dfuibe_lua/upgrade/600_unmount_target_system.lua \
+ share/dfuibe_lua/netboot/main.lua \
+ share/dfuibe_lua/netboot/500_setup_server.lua
+.if defined(WITH_NLS)
+PLIST_FILES+= share/locale/ru/LC_MESSAGES/dfuibe_lua.mo
+.endif
+.endif # WITH_LUA
+
+##### Fetch
+
+do-fetch:
+ @if [ ! -f ${_DISTDIR}${DISTNAME}${EXTRACT_SUFX} ]; then \
+ ${ECHO_MSG}; \
+ ${ECHO_MSG} "Distfile ${DISTNAME}${EXTRACT_SUFX} not found!"; \
+ ${ECHO_MSG}; \
+ ${ECHO_MSG} "This is an 'INTERNAL' port, meaning that the distfile is not retrieved"; \
+ ${ECHO_MSG} "from the Internet, but rather created from a local checkout of the"; \
+ ${ECHO_MSG} "BSD Installer CVS repository. Please see the shell scripts in the"; \
+ ${ECHO_MSG} "scripts/build directory of the repository for more information on how"; \
+ ${ECHO_MSG} "to create these distfiles."; \
+ false; \
+ fi
+
+##### Install
+
+do-install:
+ echo "Installing libaura..."
+ ${MKDIR} -p ${PREFIX}/include/aura
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/lib/libaura/libaura.a ${PREFIX}/lib/
+ ${INSTALL_PROGRAM} -o root -g wheel -m 444 ${WRKSRC}/lib/libaura/libaura.so.3 ${PREFIX}/lib/
+ ${LN} -sf ${PREFIX}/lib/libaura.so.3 ${PREFIX}/lib/libaura.so
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/lib/libaura/buffer.h ${PREFIX}/include/aura/
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/lib/libaura/dict.h ${PREFIX}/include/aura/
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/lib/libaura/popen.h ${PREFIX}/include/aura/
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/lib/libaura/fspred.h ${PREFIX}/include/aura/
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/lib/libaura/mem.h ${PREFIX}/include/aura/
+ echo "Installing libdfui..."
+ ${MKDIR} -p ${PREFIX}/include/dfui
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/lib/libdfui/libdfui.a ${PREFIX}/lib/
+ ${INSTALL_PROGRAM} -o root -g wheel -m 444 ${WRKSRC}/lib/libdfui/libdfui.so.4 ${PREFIX}/lib/
+ ${LN} -sf ${PREFIX}/lib/libdfui.so.4 ${PREFIX}/lib/libdfui.so
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/lib/libdfui/dfui.h ${PREFIX}/include/dfui/
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/lib/libdfui/dump.h ${PREFIX}/include/dfui/
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/lib/libdfui/lang.h ${PREFIX}/include/dfui/
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/lib/libdfui/system.h ${PREFIX}/include/dfui/
+.if defined(WITH_C_BACKEND)
+ echo "Installing libinstaller..."
+ ${MKDIR} -p ${PREFIX}/include/installer
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/lib/libinstaller/libinstaller.a ${PREFIX}/lib/
+ ${INSTALL_PROGRAM} -o root -g wheel -m 444 ${WRKSRC}/lib/libinstaller/libinstaller.so.5 ${PREFIX}/lib/
+ ${LN} -sf ${PREFIX}/lib/libinstaller.so.5 ${PREFIX}/lib/libinstaller.so
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/lib/libinstaller/commands.h ${PREFIX}/include/installer/
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/lib/libinstaller/confed.h ${PREFIX}/include/installer/
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/lib/libinstaller/diskutil.h ${PREFIX}/include/installer/
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/lib/libinstaller/functions.h ${PREFIX}/include/installer/
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/lib/libinstaller/package.h ${PREFIX}/include/installer/
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/lib/libinstaller/uiutil.h ${PREFIX}/include/installer/
+.endif
+.if defined(WITH_CURSES)
+ echo "Installing dfuife_curses..."
+ ${MKDIR} -p ${PREFIX}/share/dfuife_curses
+ ${INSTALL_PROGRAM} -o root -g wheel ${WRKSRC}/frontends/ncurses/dfuife_curses ${PREFIX}/sbin/
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/frontends/ncurses/fred.txt ${PREFIX}/share/dfuife_curses/
+.if defined(WITH_NLS)
+ for _language in ${LANGUAGES}; do \
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/frontends/ncurses/po/$${_language}.mo \
+ ${LOCALEDIR}/$${_language}/LC_MESSAGES/dfuife_curses.mo; \
+ done
+.endif
+.endif
+.if defined(WITH_CGI)
+ echo "Installing dfuife_cgi..."
+ ${MKDIR} -p ${PREFIX}/www
+ ${INSTALL_PROGRAM} ${WRKSRC}/frontends/cgi/dfuife.cgi ${PREFIX}/www
+ ${INSTALL_DATA} ${WRKSRC}/frontends/cgi/dfly-pg.gif ${PREFIX}/www
+ ${INSTALL_DATA} ${WRKSRC}/frontends/cgi/fred-bg.gif ${PREFIX}/www
+ ${INSTALL_DATA} ${WRKSRC}/frontends/cgi/fred.png ${PREFIX}/www
+ ${INSTALL_DATA} ${WRKSRC}/frontends/cgi/dfuife.css ${PREFIX}/www
+ ${INSTALL_DATA} ${WRKSRC}/frontends/cgi/dfuife.js ${PREFIX}/www
+ ${INSTALL_DATA} ${WRKSRC}/frontends/cgi/index.html ${PREFIX}/www
+.endif
+# dfuife_qt
+.if defined(WITH_QT)
+ echo "Installing dfuife_qt..."
+ ${INSTALL_PROGRAM} -o root -g wheel -m 555 ${WRKSRC}/frontends/cgi/dfuife_qt ${PREFIX}/sbin
+.endif
+.if defined(WITH_C_BACKEND)
+ echo "Installing dfuibe_installer..."
+ ${INSTALL_PROGRAM} -s -o root -g wheel -m 555 ${WRKSRC}/backend/installer/dfuibe_installer ${PREFIX}/sbin
+ ${MKDIR} -p ${PREFIX}/share/dfuibe_installer
+ ${INSTALL_DATA} -o root -g wheel -m 555 ${WRKSRC}/backend/installer/conf/cmdnames.conf ${PREFIX}/share/dfuibe_installer
+.if defined(WITH_NLS)
+ for _language in ${LANGUAGES}; do \
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/backend/installer/po/$${_language}.mo \
+ ${LOCALEDIR}/$${_language}/LC_MESSAGES/dfuibe_installer.mo; \
+ done
+.endif
+.endif
+.if defined(WITH_LUA_BACKEND)
+ echo "Installing lua50..."
+ ${INSTALL_PROGRAM} -o root -g wheel -m 444 ${WRKSRC}/platform/lua/lib/liblua50.so ${PREFIX}/lib/
+ ${INSTALL_PROGRAM} -o root -g wheel -m 444 ${WRKSRC}/platform/lua/lib/liblualib50.so ${PREFIX}/lib/
+ ${INSTALL_PROGRAM} -o root -g wheel -m 555 ${WRKSRC}/platform/lua/bin/lua ${PREFIX}/bin/lua50
+ ${INSTALL_PROGRAM} -o root -g wheel -m 555 ${WRKSRC}/platform/lua/bin/luac ${PREFIX}/bin/lua50c
+ echo "Installing lua50-compat5.1..."
+ ${MKDIR} -p ${PREFIX}/lib/lua/5.0
+ ${MKDIR} -p ${PREFIX}/lib/lua/${DISTNAME}
+ ${MKDIR} -p ${PREFIX}/share/lua/5.0
+ ${INSTALL_DATA} ${WRKSRC}/lib/lua/compat-5.1/compat-5.1.lua ${PREFIX}/share/lua/5.0
+ ${INSTALL_DATA} ${WRKSRC}/lib/lua/compat-5.1/compat-5.1.c ${PREFIX}/lib/lua/${DISTNAME}
+ ${INSTALL_DATA} ${WRKSRC}/lib/lua/compat-5.1/compat-5.1.h ${PREFIX}/lib/lua/${DISTNAME}
+ ${INSTALL_SCRIPT} ${WRKSRC}/lib/lua/compat-5.1/lua50c51.sh ${PREFIX}/bin/lua50c51
+ echo "Installing lua50-POSIX..."
+ ${INSTALL_DATA} ${WRKSRC}/lib/lua/posix/lposix.so ${PREFIX}/lib/lua/5.0/
+ ${INSTALL_DATA} ${WRKSRC}/lib/lua/posix/posix.lua ${PREFIX}/share/lua/5.0/
+ echo "Installing lua50-pty..."
+ ${INSTALL_DATA} ${WRKSRC}/lib/lua/pty/lpty.so ${PREFIX}/lib/lua/5.0
+ ${INSTALL_DATA} ${WRKSRC}/lib/lua/pty/pty.lua ${PREFIX}/share/lua/5.0
+ echo "Installing lua50-filename..."
+ ${INSTALL_DATA} ${WRKSRC}/lib/lua/filename/filename.lua ${PREFIX}/share/lua/5.0/filename.lua
+ echo "Installing lua50-app..."
+ ${INSTALL_DATA} ${WRKSRC}/lib/lua/app/app.lua ${PREFIX}/share/lua/5.0/app.lua
+ echo "Installing lua50-dfui..."
+ ${INSTALL_PROGRAM} -o root -g wheel -m 444 ${WRKSRC}/lib/lua/dfui/ldfui.so ${PREFIX}/lib/lua/5.0/
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/lib/lua/dfui/dfui.lua ${PREFIX}/share/lua/5.0/
+ echo "Installing lua50-luasocket..."
+ ${INSTALL_PROGRAM} ${WRKSRC}/lib/lua/luasocket/lsocket.so ${PREFIX}/lib/lua/5.0/
+ ${INSTALL_PROGRAM} ${WRKSRC}/lib/lua/luasocket/lmime.so ${PREFIX}/lib/lua/5.0/
+ ${INSTALL_DATA} ${WRKSRC}/lib/lua/luasocket/lua/*.lua ${PREFIX}/share/lua/5.0/
+ echo "Installing lua50-transceiver..."
+ ${INSTALL_DATA} ${WRKSRC}/lib/lua/transceiver/transceiver.lua ${PREFIX}/share/lua/5.0/
+.if defined(WITH_CURSES)
+ echo "Installing lua50-lcurses..."
+ ${INSTALL_PROGRAM} ${WRKSRC}/lib/lua/lcurses/lcurses.so ${PREFIX}/lib/lua/5.0
+ ${INSTALL_DATA} ${WRKSRC}/lib/lua/lcurses/curses.lua ${PREFIX}/share/lua/5.0/
+.endif
+.if defined(WITH_NLS)
+ echo "Installing lua50-gettext..."
+ ${INSTALL_PROGRAM} -o root -g wheel -m 444 ${WRKSRC}/lib/lua/gettext/lgettext.so ${PREFIX}/lib/lua/5.0/
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/lib/lua/gettext/gettext.lua ${PREFIX}/share/lua/5.0/
+.endif
+ echo "Installing dfuibe_lua..."
+ ${MKDIR} -p ${DFUIBE_LUA_DIR}
+ ${MKDIR} -p ${DFUIBE_LUA_DIR}/lib
+ ${MKDIR} -p ${DFUIBE_LUA_DIR}/conf
+ ${MKDIR} -p ${DFUIBE_LUA_DIR}/pit
+ ${MKDIR} -p ${DFUIBE_LUA_DIR}/install
+ ${MKDIR} -p ${DFUIBE_LUA_DIR}/configure
+ ${MKDIR} -p ${DFUIBE_LUA_DIR}/configure/menu
+ ${MKDIR} -p ${DFUIBE_LUA_DIR}/upgrade
+ ${MKDIR} -p ${DFUIBE_LUA_DIR}/netboot
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/backend/lua/*.lua ${DFUIBE_LUA_DIR}/
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/backend/lua/lib/*.lua ${DFUIBE_LUA_DIR}/lib/
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/backend/lua/conf/*.lua ${DFUIBE_LUA_DIR}/conf/
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/backend/lua/pit/*.lua ${DFUIBE_LUA_DIR}/pit/
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/backend/lua/install/*.lua ${DFUIBE_LUA_DIR}/install/
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/backend/lua/configure/*.lua ${DFUIBE_LUA_DIR}/configure/
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/backend/lua/configure/menu/*.lua ${DFUIBE_LUA_DIR}/configure/menu/
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/backend/lua/upgrade/*.lua ${DFUIBE_LUA_DIR}/upgrade/
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/backend/lua/netboot/*.lua ${DFUIBE_LUA_DIR}/netboot/
+.if defined(WITH_NLS)
+ for _language in ${LANGUAGES}; do \
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/backend/lua/po/$${_language}.mo \
+ ${LOCALEDIR}/$${_language}/LC_MESSAGES/dfuibe_lua.mo; \
+ done
+.endif
+.endif # WITH_LUA_BACKEND
+
+OSTYPE!=sysctl -n kern.ostype
+
+.if ${OSTYPE} == "FreeBSD"
+.include
+.endif
+
+.if ${OSTYPE} == "DragonFly"
+.include
+.endif
+
+.if ${MACHINE_ARCH:L} == "amd64"
+CFLAGS+= -fPIC
+.endif
+
Index: contrib/bsdinstaller/ports/sysutils/bsdinstaller/pkg-descr
===================================================================
RCS file: contrib/bsdinstaller/ports/sysutils/bsdinstaller/pkg-descr
diff -N contrib/bsdinstaller/ports/sysutils/bsdinstaller/pkg-descr
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/sysutils/bsdinstaller/pkg-descr 30 Jul 2005 07:00:43 -0000
@@ -0,0 +1 @@
+A "mega-package" containing all the BSD Installer components.
Index: contrib/bsdinstaller/ports/sysutils/dfuibe_installer/Makefile
===================================================================
RCS file: contrib/bsdinstaller/ports/sysutils/dfuibe_installer/Makefile
diff -N contrib/bsdinstaller/ports/sysutils/dfuibe_installer/Makefile
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/sysutils/dfuibe_installer/Makefile 22 Dec 2005 20:15:50 -0000
@@ -0,0 +1,68 @@
+# New ports collection makefile for: dfuibe_installer
+# Date created: May 13, 2004
+# Whom: Chris Pressey
+
+PORTNAME= dfuibe_installer
+PORTVERSION= 1.1.7
+INTERNAL= YES
+CATEGORIES= sysutils
+DISTNAME= ${PORTNAME}-${PORTVERSION}
+WRKSRC= work/installer
+
+LIB_DEPENDS= aura.3:${PORTSDIR}/devel/libaura \
+ dfui.4:${PORTSDIR}/sysutils/libdfui \
+ installer.5:${PORTSDIR}/sysutils/libinstaller
+.if defined(WITH_NLS)
+LIB_DEPENDS:= ${LIB_DEPENDS} \
+ intl.6:${PORTSDIR}/devel/gettext
+.endif
+
+MAINTAINER= cpressey@catseye.mine.nu
+COMMENT= DFUI BSD Installer backend
+
+SHAREDIR= ${LOCALBASE}/share/dfuibe_installer
+
+.if defined(WITH_NLS)
+LOCALEDIR= ${LOCALBASE}/share/locale
+LANGUAGES= ru
+.endif
+
+PLIST_FILES= sbin/dfuibe_installer \
+ share/dfuibe_installer/cmdnames.conf
+
+.if defined(WITH_NLS)
+PLIST_FILES+= share/locale/ru/LC_MESSAGES/dfuibe_installer.mo
+.endif
+
+do-fetch:
+ @if [ ! -f ${_DISTDIR}${DISTNAME}${EXTRACT_SUFX} ]; then \
+ ${ECHO_MSG}; \
+ ${ECHO_MSG} "Distfile ${DISTNAME}${EXTRACT_SUFX} not found!"; \
+ ${ECHO_MSG}; \
+ ${ECHO_MSG} "This is an 'INTERNAL' port, meaning that the distfile is not retrieved"; \
+ ${ECHO_MSG} "from the Internet, but rather created from a local checkout of the"; \
+ ${ECHO_MSG} "BSD Installer CVS repository. Please see the shell scripts in the"; \
+ ${ECHO_MSG} "scripts/build directory of the repository for more information on how"; \
+ ${ECHO_MSG} "to create these distfiles."; \
+ false; \
+ fi
+
+do-install:
+ ${INSTALL_PROGRAM} -o root -g wheel -m 555 ${WRKSRC}/dfuibe_installer ${LOCALBASE}/sbin
+ ${MKDIR} -p ${SHAREDIR}
+ ${INSTALL_DATA} -o root -g wheel -m 555 ${WRKSRC}/conf/cmdnames.conf ${SHAREDIR}
+ for _language in ${LANGUAGES}; do \
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/po/$${_language}.mo \
+ ${LOCALEDIR}/$${_language}/LC_MESSAGES/${PORTNAME}.mo; \
+ done
+
+OSTYPE!=sysctl -n kern.ostype
+
+.if ${OSTYPE} == "FreeBSD"
+.include
+.endif
+
+.if ${OSTYPE} == "DragonFly"
+.include
+.endif
+
Index: contrib/bsdinstaller/ports/sysutils/dfuibe_installer/pkg-descr
===================================================================
RCS file: contrib/bsdinstaller/ports/sysutils/dfuibe_installer/pkg-descr
diff -N contrib/bsdinstaller/ports/sysutils/dfuibe_installer/pkg-descr
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/sysutils/dfuibe_installer/pkg-descr 29 Jan 2005 22:30:37 -0000
@@ -0,0 +1,2 @@
+BSD Installer backend. Uses DFUI, so one of the available
+DFUI frontends must also be installed for this to be useful.
Index: contrib/bsdinstaller/ports/sysutils/dfuibe_lua/Makefile
===================================================================
RCS file: contrib/bsdinstaller/ports/sysutils/dfuibe_lua/Makefile
diff -N contrib/bsdinstaller/ports/sysutils/dfuibe_lua/Makefile
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/sysutils/dfuibe_lua/Makefile 27 Jul 2006 21:47:52 -0000
@@ -0,0 +1,166 @@
+# New ports collection makefile for: dfuibe_lua
+# Date created: Nov 27, 2004
+# Whom: Chris Pressey
+
+PORTNAME= dfuibe_lua
+PORTVERSION= 1.0
+INTERNAL= YES
+CATEGORIES= sysutils
+DISTNAME= ${PORTNAME}-${PORTVERSION}
+WRKSRC= work/lua
+
+LIB_DEPENDS= lua50.5:${PORTSDIR}/lang/lua50
+
+RUN_DEPENDS= ${LOCALBASE}/lib/lua/5.0/lpty.so:${PORTSDIR}/devel/lua50-pty \
+ ${LOCALBASE}/lib/lua/5.0/ldfui.so:${PORTSDIR}/devel/lua50-dfui \
+ ${LOCALBASE}/share/lua/5.0/app.lua:${PORTSDIR}/devel/lua50-app
+.if defined(WITH_NLS)
+RUN_DEPENDS:= ${RUN_DEPENDS} \
+ ${LOCALBASE}/lib/lua/5.0/lgettext.so:${PORTSDIR}/devel/lua50-gettext
+.endif
+
+MAINTAINER= cpressey@catseye.mine.nu
+COMMENT= DFUI Lua backend
+
+DFUIBE_LUA_DIR= ${LOCALBASE}/share/dfuibe_lua
+
+.if defined(WITH_NLS)
+LOCALEDIR= /usr/local/share/locale
+LANGUAGES= ru
+.endif
+
+PLIST_FILES= share/dfuibe_lua/main.lua \
+ share/dfuibe_lua/200_install.lua \
+ share/dfuibe_lua/400_configure.lua \
+ share/dfuibe_lua/500_create_geom_mirror.lua \
+ share/dfuibe_lua/600_upgrade.lua \
+ share/dfuibe_lua/800_netboot.lua \
+ share/dfuibe_lua/950_reboot.lua \
+ share/dfuibe_lua/lib/bitwise.lua \
+ share/dfuibe_lua/lib/cmdchain.lua \
+ share/dfuibe_lua/lib/configvars.lua \
+ share/dfuibe_lua/lib/flow.lua \
+ share/dfuibe_lua/lib/menu.lua \
+ share/dfuibe_lua/lib/network.lua \
+ share/dfuibe_lua/lib/network_ui.lua \
+ share/dfuibe_lua/lib/package.lua \
+ share/dfuibe_lua/lib/package_ui.lua \
+ share/dfuibe_lua/lib/storage.lua \
+ share/dfuibe_lua/lib/storage_ui.lua \
+ share/dfuibe_lua/lib/target_system.lua \
+ share/dfuibe_lua/lib/target_system_ui.lua \
+ share/dfuibe_lua/lib/uinav.lua \
+ share/dfuibe_lua/conf/cleanup.lua \
+ share/dfuibe_lua/conf/cmdnames.lua \
+ share/dfuibe_lua/conf/def_pkgs.lua \
+ share/dfuibe_lua/conf/limits.lua \
+ share/dfuibe_lua/conf/mountpoints.lua \
+ share/dfuibe_lua/conf/nls.lua \
+ share/dfuibe_lua/conf/prefs.lua \
+ share/dfuibe_lua/conf/sources.lua \
+ share/dfuibe_lua/conf/sysids.lua \
+ share/dfuibe_lua/conf/uinavctl.lua \
+ share/dfuibe_lua/pit/main.lua \
+ share/dfuibe_lua/pit/050_welcome.lua \
+ share/dfuibe_lua/pit/100_select_language.lua \
+ share/dfuibe_lua/pit/150_configure_console.lua \
+ share/dfuibe_lua/pit/400_load_kernel_modules.lua \
+ share/dfuibe_lua/pit/800_configure_network.lua \
+ share/dfuibe_lua/install/main.lua \
+ share/dfuibe_lua/install/100_welcome.lua \
+ share/dfuibe_lua/install/200_select_disk.lua \
+ share/dfuibe_lua/install/220_format_disk.lua \
+ share/dfuibe_lua/install/250_partition_disk.lua \
+ share/dfuibe_lua/install/300_select_part.lua \
+ share/dfuibe_lua/install/400_select_subparts.lua \
+ share/dfuibe_lua/install/405_warn_omitted_subparts.lua \
+ share/dfuibe_lua/install/407_create_subparts.lua \
+ share/dfuibe_lua/install/410_select_additional_filesystems.lua \
+ share/dfuibe_lua/install/420_preselect_packages.lua \
+ share/dfuibe_lua/install/450_select_packages.lua \
+ share/dfuibe_lua/install/490_confirm_install_os.lua \
+ share/dfuibe_lua/install/500_install_os.lua \
+ share/dfuibe_lua/install/700_install_bootblocks.lua \
+ share/dfuibe_lua/install/800_finished.lua \
+ share/dfuibe_lua/install/900_reboot.lua \
+ share/dfuibe_lua/configure/main.lua \
+ share/dfuibe_lua/configure/100_choose_where_from.lua \
+ share/dfuibe_lua/configure/200_select_disk.lua \
+ share/dfuibe_lua/configure/300_select_part.lua \
+ share/dfuibe_lua/configure/400_mount_target_system.lua \
+ share/dfuibe_lua/configure/450_init_configuration.lua \
+ share/dfuibe_lua/configure/500_menu.lua \
+ share/dfuibe_lua/configure/550_write_configuration.lua \
+ share/dfuibe_lua/configure/600_unmount_target_system.lua \
+ share/dfuibe_lua/configure/menu/main.lua \
+ share/dfuibe_lua/configure/menu/100_set_root_password.lua \
+ share/dfuibe_lua/configure/menu/200_add_user.lua \
+ share/dfuibe_lua/configure/menu/300_set_timezone.lua \
+ share/dfuibe_lua/configure/menu/350_set_datetime.lua \
+ share/dfuibe_lua/configure/menu/400_change_console_settings.lua \
+ share/dfuibe_lua/configure/menu/500_install_packages.lua \
+ share/dfuibe_lua/configure/menu/550_remove_packages.lua \
+ share/dfuibe_lua/upgrade/main.lua \
+ share/dfuibe_lua/upgrade/100_begin_upgrade.lua \
+ share/dfuibe_lua/upgrade/200_select_disk.lua \
+ share/dfuibe_lua/upgrade/300_select_part.lua \
+ share/dfuibe_lua/upgrade/400_mount_target_system.lua \
+ share/dfuibe_lua/upgrade/500_perform_upgrade.lua \
+ share/dfuibe_lua/upgrade/550_upgrade_configuration.lua \
+ share/dfuibe_lua/upgrade/600_unmount_target_system.lua \
+ share/dfuibe_lua/netboot/main.lua \
+ share/dfuibe_lua/netboot/500_setup_server.lua
+
+.if defined(WITH_NLS)
+PLIST_FILES+= share/locale/ru/LC_MESSAGES/dfuibe_lua.mo
+.endif
+
+do-fetch:
+ @if [ ! -f ${_DISTDIR}${DISTNAME}${EXTRACT_SUFX} ]; then \
+ ${ECHO_MSG}; \
+ ${ECHO_MSG} "Distfile ${DISTNAME}${EXTRACT_SUFX} not found!"; \
+ ${ECHO_MSG}; \
+ ${ECHO_MSG} "This is an 'INTERNAL' port, meaning that the distfile is not retrieved"; \
+ ${ECHO_MSG} "from the Internet, but rather created from a local checkout of the"; \
+ ${ECHO_MSG} "BSD Installer CVS repository. Please see the shell scripts in the"; \
+ ${ECHO_MSG} "scripts/build directory of the repository for more information on how"; \
+ ${ECHO_MSG} "to create these distfiles."; \
+ false; \
+ fi
+
+do-install:
+ ${MKDIR} -p ${DFUIBE_LUA_DIR}
+ ${MKDIR} -p ${DFUIBE_LUA_DIR}/lib
+ ${MKDIR} -p ${DFUIBE_LUA_DIR}/conf
+ ${MKDIR} -p ${DFUIBE_LUA_DIR}/pit
+ ${MKDIR} -p ${DFUIBE_LUA_DIR}/install
+ ${MKDIR} -p ${DFUIBE_LUA_DIR}/configure
+ ${MKDIR} -p ${DFUIBE_LUA_DIR}/configure/menu
+ ${MKDIR} -p ${DFUIBE_LUA_DIR}/upgrade
+ ${MKDIR} -p ${DFUIBE_LUA_DIR}/netboot
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/*.lua ${DFUIBE_LUA_DIR}/
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/lib/*.lua ${DFUIBE_LUA_DIR}/lib/
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/conf/*.lua ${DFUIBE_LUA_DIR}/conf/
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/pit/*.lua ${DFUIBE_LUA_DIR}/pit/
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/install/*.lua ${DFUIBE_LUA_DIR}/install/
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/configure/*.lua ${DFUIBE_LUA_DIR}/configure/
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/configure/menu/*.lua ${DFUIBE_LUA_DIR}/configure/menu/
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/upgrade/*.lua ${DFUIBE_LUA_DIR}/upgrade/
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/netboot/*.lua ${DFUIBE_LUA_DIR}/netboot/
+.if defined(WITH_NLS)
+ for _language in ${LANGUAGES}; do \
+ (cd ${WRKSRC}/po && msgfmt -o $${_language}.mo $${_language}); \
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/po/$${_language}.mo \
+ ${LOCALEDIR}/$${_language}/LC_MESSAGES/${PORTNAME}.mo; \
+ done
+.endif
+
+OSTYPE!=sysctl -n kern.ostype
+
+.if ${OSTYPE} == "FreeBSD"
+.include
+.endif
+
+.if ${OSTYPE} == "DragonFly"
+.include
+.endif
Index: contrib/bsdinstaller/ports/sysutils/dfuibe_lua/pkg-descr
===================================================================
RCS file: contrib/bsdinstaller/ports/sysutils/dfuibe_lua/pkg-descr
diff -N contrib/bsdinstaller/ports/sysutils/dfuibe_lua/pkg-descr
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/sysutils/dfuibe_lua/pkg-descr 10 Dec 2004 19:45:48 -0000
@@ -0,0 +1,5 @@
+Lua backend for DFUI. Most useful if one of the available
+DFUI frontends is also installed.
+
+
+
Index: contrib/bsdinstaller/ports/sysutils/dfuife_cgi/Makefile
===================================================================
RCS file: contrib/bsdinstaller/ports/sysutils/dfuife_cgi/Makefile
diff -N contrib/bsdinstaller/ports/sysutils/dfuife_cgi/Makefile
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/sysutils/dfuife_cgi/Makefile 22 Dec 2005 20:15:50 -0000
@@ -0,0 +1,57 @@
+# New ports collection makefile for: dfuife_cgi
+# Date created: June 5, 2004
+# Whom: Chris Pressey
+
+PORTNAME= dfuife_cgi
+PORTVERSION= 1.4.1
+INTERNAL= YES
+CATEGORIES= sysutils
+DISTNAME= ${PORTNAME}-${PORTVERSION}
+WRKSRC= work/cgi
+
+LIB_DEPENDS= aura.3:${PORTSDIR}/devel/libaura \
+ dfui.4:${PORTSDIR}/sysutils/libdfui
+
+MAINTAINER= cpressey@catseye.mine.nu
+COMMENT= DFUI CGI frontend
+
+PLIST_FILES= www/dfuife.cgi \
+ www/dfly-pg.gif \
+ www/fred-bg.gif \
+ www/fred.png \
+ www/dfuife.css \
+ www/dfuife.js \
+ www/index.html
+
+do-fetch:
+ @if [ ! -f ${_DISTDIR}${DISTNAME}${EXTRACT_SUFX} ]; then \
+ ${ECHO_MSG}; \
+ ${ECHO_MSG} "Distfile ${DISTNAME}${EXTRACT_SUFX} not found!"; \
+ ${ECHO_MSG}; \
+ ${ECHO_MSG} "This is an 'INTERNAL' port, meaning that the distfile is not retrieved"; \
+ ${ECHO_MSG} "from the Internet, but rather created from a local checkout of the"; \
+ ${ECHO_MSG} "BSD Installer CVS repository. Please see the shell scripts in the"; \
+ ${ECHO_MSG} "scripts/build directory of the repository for more information on how"; \
+ ${ECHO_MSG} "to create these distfiles."; \
+ false; \
+ fi
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/dfuife.cgi ${PREFIX}/www
+ ${INSTALL_DATA} ${WRKSRC}/dfly-pg.gif ${PREFIX}/www
+ ${INSTALL_DATA} ${WRKSRC}/fred-bg.gif ${PREFIX}/www
+ ${INSTALL_DATA} ${WRKSRC}/fred.png ${PREFIX}/www
+ ${INSTALL_DATA} ${WRKSRC}/dfuife.css ${PREFIX}/www
+ ${INSTALL_DATA} ${WRKSRC}/dfuife.js ${PREFIX}/www
+ ${INSTALL_DATA} ${WRKSRC}/index.html ${PREFIX}/www
+
+OSTYPE!=sysctl -n kern.ostype
+
+.if ${OSTYPE} == "FreeBSD"
+.include
+.endif
+
+.if ${OSTYPE} == "DragonFly"
+.include
+.endif
+
Index: contrib/bsdinstaller/ports/sysutils/dfuife_cgi/pkg-descr
===================================================================
RCS file: contrib/bsdinstaller/ports/sysutils/dfuife_cgi/pkg-descr
diff -N contrib/bsdinstaller/ports/sysutils/dfuife_cgi/pkg-descr
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/sysutils/dfuife_cgi/pkg-descr 15 Mar 2005 21:39:23 -0000
@@ -0,0 +1,6 @@
+DFUI CGI frontend. Allows a DFUI backend (such as a system
+installer) to communicate with the user via a web browser.
+
+*** NOTE *** : this port will install files into ${PREFIX}/www,
+probably /usr/local/www, overwriting any files you may already
+have there, such as /usr/local/www/index.html.
Index: contrib/bsdinstaller/ports/sysutils/dfuife_curses/Makefile
===================================================================
RCS file: contrib/bsdinstaller/ports/sysutils/dfuife_curses/Makefile
diff -N contrib/bsdinstaller/ports/sysutils/dfuife_curses/Makefile
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/sysutils/dfuife_curses/Makefile 22 Dec 2005 20:15:51 -0000
@@ -0,0 +1,66 @@
+# New ports collection makefile for: dfuife_curses
+# Date created: May 13, 2004
+# Whom: Chris Pressey
+
+PORTNAME= dfuife_curses
+PORTVERSION= 1.5.1
+INTERNAL= YES
+CATEGORIES= sysutils
+DISTNAME= ${PORTNAME}-${PORTVERSION}
+WRKSRC= work/ncurses
+
+LIB_DEPENDS= aura.3:${PORTSDIR}/devel/libaura \
+ dfui.4:${PORTSDIR}/sysutils/libdfui
+
+.if defined(WITH_NLS)
+LIB_DEPENDS:= ${LIB_DEPENDS} \
+ intl.6:${PORTSDIR}/devel/gettext
+.endif
+
+MAINTAINER= cpressey@catseye.mine.nu
+COMMENT= DFUI curses frontend
+
+PLIST_FILES= sbin/dfuife_curses share/dfuife_curses/fred.txt
+.if defined(WITH_NLS)
+PLIST_FILES+= share/locale/ru/LC_MESSAGES/dfuife_curses.mo
+.endif
+
+.if defined(WITH_NLS)
+LOCALEDIR= ${LOCALBASE}/share/locale
+LANGUAGES= ru
+.endif
+
+do-fetch:
+ @if [ ! -f ${_DISTDIR}${DISTNAME}${EXTRACT_SUFX} ]; then \
+ ${ECHO_MSG}; \
+ ${ECHO_MSG} "Distfile ${DISTNAME}${EXTRACT_SUFX} not found!"; \
+ ${ECHO_MSG}; \
+ ${ECHO_MSG} "This is an 'INTERNAL' port, meaning that the distfile is not retrieved"; \
+ ${ECHO_MSG} "from the Internet, but rather created from a local checkout of the"; \
+ ${ECHO_MSG} "BSD Installer CVS repository. Please see the shell scripts in the"; \
+ ${ECHO_MSG} "scripts/build directory of the repository for more information on how"; \
+ ${ECHO_MSG} "to create these distfiles."; \
+ false; \
+ fi
+
+do-install:
+ ${MKDIR} -p ${LOCALBASE}/share/dfuife_curses
+ ${INSTALL_PROGRAM} -o root -g wheel ${WRKSRC}/dfuife_curses ${LOCALBASE}/sbin/
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/fred.txt ${LOCALBASE}/share/dfuife_curses/
+.if defined(WITH_NLS)
+ for _language in ${LANGUAGES}; do \
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/po/$${_language}.mo \
+ ${LOCALEDIR}/$${_language}/LC_MESSAGES/${PORTNAME}.mo; \
+ done
+.endif
+
+OSTYPE!=sysctl -n kern.ostype
+
+.if ${OSTYPE} == "FreeBSD"
+.include
+.endif
+
+.if ${OSTYPE} == "DragonFly"
+.include
+.endif
+
Index: contrib/bsdinstaller/ports/sysutils/dfuife_curses/pkg-descr
===================================================================
RCS file: contrib/bsdinstaller/ports/sysutils/dfuife_curses/pkg-descr
diff -N contrib/bsdinstaller/ports/sysutils/dfuife_curses/pkg-descr
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/sysutils/dfuife_curses/pkg-descr 9 Jul 2004 23:25:40 -0000
@@ -0,0 +1,6 @@
+DFUI curses frontend. Allows a DFUI backend (such as a system
+installer) to communicate with the user with an addressable text
+screen-oriented ('curses') user interface.
+
+
+
Index: contrib/bsdinstaller/ports/sysutils/dfuife_qt/Makefile
===================================================================
RCS file: contrib/bsdinstaller/ports/sysutils/dfuife_qt/Makefile
diff -N contrib/bsdinstaller/ports/sysutils/dfuife_qt/Makefile
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/sysutils/dfuife_qt/Makefile 9 Apr 2005 06:09:59 -0000
@@ -0,0 +1,46 @@
+# New ports collection makefile for: dfuife_qt
+# Date created: Oct 19, 2004
+# Whom: Chris Pressey
+
+PORTNAME= dfuife_qt
+PORTVERSION= 1.2
+INTERNAL= YES
+CATEGORIES= sysutils
+DISTNAME= ${PORTNAME}-${PORTVERSION}
+WRKSRC= work/qt
+
+LIB_DEPENDS= dfui.4:${PORTSDIR}/sysutils/libdfui
+
+USE_QT_VER= 3
+
+MAINTAINER= cpressey@catseye.mine.nu
+COMMENT= DFUI Qt frontend
+
+PLIST_FILES= sbin/dfuife_qt
+
+do-fetch:
+ @if [ ! -f ${_DISTDIR}${DISTNAME}${EXTRACT_SUFX} ]; then \
+ ${ECHO_MSG}; \
+ ${ECHO_MSG} "Distfile ${DISTNAME}${EXTRACT_SUFX} not found!"; \
+ ${ECHO_MSG}; \
+ ${ECHO_MSG} "This is an 'INTERNAL' port, meaning that the distfile is not retrieved"; \
+ ${ECHO_MSG} "from the Internet, but rather created from a local checkout of the"; \
+ ${ECHO_MSG} "BSD Installer CVS repository. Please see the shell scripts in the"; \
+ ${ECHO_MSG} "scripts/build directory of the repository for more information on how"; \
+ ${ECHO_MSG} "to create these distfiles."; \
+ false; \
+ fi
+
+do-install:
+ ${INSTALL_PROGRAM} -o root -g wheel -m 555 ${WRKSRC}/dfuife_qt ${LOCALBASE}/sbin
+
+OSTYPE!=sysctl -n kern.ostype
+
+.if ${OSTYPE} == "FreeBSD"
+.include
+.endif
+
+.if ${OSTYPE} == "DragonFly"
+.include
+.endif
+
Index: contrib/bsdinstaller/ports/sysutils/dfuife_qt/pkg-descr
===================================================================
RCS file: contrib/bsdinstaller/ports/sysutils/dfuife_qt/pkg-descr
diff -N contrib/bsdinstaller/ports/sysutils/dfuife_qt/pkg-descr
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/sysutils/dfuife_qt/pkg-descr 20 Oct 2004 02:36:50 -0000
@@ -0,0 +1,3 @@
+DFUI Qt frontend. Allows a DFUI backend (such as a system
+installer) to communicate with the user via a graphical
+user interface built with the Qt Toolkit, as seen in KDE.
Index: contrib/bsdinstaller/ports/sysutils/libdfui/Makefile
===================================================================
RCS file: contrib/bsdinstaller/ports/sysutils/libdfui/Makefile
diff -N contrib/bsdinstaller/ports/sysutils/libdfui/Makefile
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/sysutils/libdfui/Makefile 30 Jul 2005 20:43:16 -0000
@@ -0,0 +1,57 @@
+# New ports collection makefile for: libdfui
+# Date created: May 13, 2004
+# Whom: Chris Pressey
+
+PORTNAME= libdfui
+PORTVERSION= 4.1
+INTERNAL= YES
+CATEGORIES= sysutils
+DISTNAME= ${PORTNAME}-${PORTVERSION}
+WRKSRC= work/${PORTNAME}
+
+LIB_DEPENDS= aura.3:${PORTSDIR}/devel/libaura
+
+MAINTAINER= cpressey@catseye.mine.nu
+COMMENT= Abstract user interface protocol library
+
+PLIST_FILES= lib/libdfui.a \
+ lib/libdfui.so \
+ lib/libdfui.so.4 \
+ include/dfui/dfui.h \
+ include/dfui/dump.h \
+ include/dfui/lang.h \
+ include/dfui/system.h
+
+do-fetch:
+ @if [ ! -f ${_DISTDIR}${DISTNAME}${EXTRACT_SUFX} ]; then \
+ ${ECHO_MSG}; \
+ ${ECHO_MSG} "Distfile ${DISTNAME}${EXTRACT_SUFX} not found!"; \
+ ${ECHO_MSG}; \
+ ${ECHO_MSG} "This is an 'INTERNAL' port, meaning that the distfile is not retrieved"; \
+ ${ECHO_MSG} "from the Internet, but rather created from a local checkout of the"; \
+ ${ECHO_MSG} "BSD Installer CVS repository. Please see the shell scripts in the"; \
+ ${ECHO_MSG} "scripts/build directory of the repository for more information on how"; \
+ ${ECHO_MSG} "to create these distfiles."; \
+ false; \
+ fi
+
+do-install:
+ ${MKDIR} -p ${LOCALBASE}/include/dfui
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/libdfui.a ${LOCALBASE}/lib/
+ ${INSTALL_PROGRAM} -o root -g wheel -m 444 ${WRKSRC}/libdfui.so.4 ${LOCALBASE}/lib/
+ ${LN} -sf ${LOCALBASE}/lib/libdfui.so.4 ${LOCALBASE}/lib/libdfui.so
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/dfui.h ${LOCALBASE}/include/dfui/
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/dump.h ${LOCALBASE}/include/dfui/
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/lang.h ${LOCALBASE}/include/dfui/
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/system.h ${LOCALBASE}/include/dfui/
+
+OSTYPE!=sysctl -n kern.ostype
+
+.if ${OSTYPE} == "FreeBSD"
+.include
+.endif
+
+.if ${OSTYPE} == "DragonFly"
+.include
+.endif
+
Index: contrib/bsdinstaller/ports/sysutils/libdfui/pkg-descr
===================================================================
RCS file: contrib/bsdinstaller/ports/sysutils/libdfui/pkg-descr
diff -N contrib/bsdinstaller/ports/sysutils/libdfui/pkg-descr
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/sysutils/libdfui/pkg-descr 9 Jul 2004 23:25:40 -0000
@@ -0,0 +1,6 @@
+DFUI is a user interface abstraction in the form of a protocol by
+which application logic (such as a system installer) in the backend
+can talk to a concrete user interface (such as curses or GTK) in
+the frontend.
+
+
Index: contrib/bsdinstaller/ports/sysutils/libinstaller/Makefile
===================================================================
RCS file: contrib/bsdinstaller/ports/sysutils/libinstaller/Makefile
diff -N contrib/bsdinstaller/ports/sysutils/libinstaller/Makefile
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/sysutils/libinstaller/Makefile 30 Jul 2005 20:43:16 -0000
@@ -0,0 +1,62 @@
+# New ports collection makefile for: libinstaller
+# Date created: Aug 8, 2004
+# Whom: Chris Pressey
+
+PORTNAME= libinstaller
+PORTVERSION= 5.1
+INTERNAL= YES
+CATEGORIES= sysutils
+DISTNAME= ${PORTNAME}-${PORTVERSION}
+WRKSRC= work/${PORTNAME}
+
+LIB_DEPENDS= aura.3:${PORTSDIR}/devel/libaura \
+ dfui.4:${PORTSDIR}/sysutils/libdfui
+
+MAINTAINER= cpressey@catseye.mine.nu
+COMMENT= BSD Installer library
+
+PLIST_FILES= lib/libinstaller.a \
+ lib/libinstaller.so \
+ lib/libinstaller.so.5 \
+ include/installer/commands.h \
+ include/installer/confed.h \
+ include/installer/diskutil.h \
+ include/installer/functions.h \
+ include/installer/package.h \
+ include/installer/uiutil.h
+
+do-fetch:
+ @if [ ! -f ${_DISTDIR}${DISTNAME}${EXTRACT_SUFX} ]; then \
+ ${ECHO_MSG}; \
+ ${ECHO_MSG} "Distfile ${DISTNAME}${EXTRACT_SUFX} not found!"; \
+ ${ECHO_MSG}; \
+ ${ECHO_MSG} "This is an 'INTERNAL' port, meaning that the distfile is not retrieved"; \
+ ${ECHO_MSG} "from the Internet, but rather created from a local checkout of the"; \
+ ${ECHO_MSG} "BSD Installer CVS repository. Please see the shell scripts in the"; \
+ ${ECHO_MSG} "scripts/build directory of the repository for more information on how"; \
+ ${ECHO_MSG} "to create these distfiles."; \
+ false; \
+ fi
+
+do-install:
+ ${MKDIR} -p ${LOCALBASE}/include/installer
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/libinstaller.a ${LOCALBASE}/lib/
+ ${INSTALL_PROGRAM} -o root -g wheel -m 444 ${WRKSRC}/libinstaller.so.5 ${LOCALBASE}/lib/
+ ${LN} -sf ${LOCALBASE}/lib/libinstaller.so.5 ${LOCALBASE}/lib/libinstaller.so
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/commands.h ${LOCALBASE}/include/installer/
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/confed.h ${LOCALBASE}/include/installer/
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/diskutil.h ${LOCALBASE}/include/installer/
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/functions.h ${LOCALBASE}/include/installer/
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/package.h ${LOCALBASE}/include/installer/
+ ${INSTALL_DATA} -o root -g wheel -m 444 ${WRKSRC}/uiutil.h ${LOCALBASE}/include/installer/
+
+OSTYPE!=sysctl -n kern.ostype
+
+.if ${OSTYPE} == "FreeBSD"
+.include
+.endif
+
+.if ${OSTYPE} == "DragonFly"
+.include
+.endif
+
Index: contrib/bsdinstaller/ports/sysutils/libinstaller/pkg-descr
===================================================================
RCS file: contrib/bsdinstaller/ports/sysutils/libinstaller/pkg-descr
diff -N contrib/bsdinstaller/ports/sysutils/libinstaller/pkg-descr
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/sysutils/libinstaller/pkg-descr 8 Aug 2004 19:33:00 -0000
@@ -0,0 +1,2 @@
+This is the library used by the BSD Installer.
+
Index: contrib/bsdinstaller/ports/www/thttpd-notimeout/Makefile
===================================================================
RCS file: contrib/bsdinstaller/ports/www/thttpd-notimeout/Makefile
diff -N contrib/bsdinstaller/ports/www/thttpd-notimeout/Makefile
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/www/thttpd-notimeout/Makefile 10 Jul 2004 22:03:04 -0000
@@ -0,0 +1,92 @@
+# New ports collection makefile for: thttpd
+# Date created: 24 May 1999
+# Whom: Anders Nordby
+#
+# $FreeBSD: ports/www/thttpd/Makefile,v 1.35 2004/02/01 04:51:54 silby Exp $
+#
+
+PORTNAME= thttpd
+PORTVERSION= 2.24
+PKGNAMESUFFIX= -notimeout
+CATEGORIES= www ipv6
+MASTER_SITES= http://www.acme.com/software/thttpd/ \
+ http://atreides.freenix.no/~anders/
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX} notes.html
+DIST_SUBDIR= ${PORTNAME}
+EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
+
+MAINTAINER= anders@FreeBSD.org
+COMMENT= Tiny/turbo/throttling HTTP server
+
+IGNOREFILES= notes.html
+
+GNU_CONFIGURE= yes
+USE_REINPLACE= yes
+
+MAN1= makeweb.1 htpasswd.1
+MAN8= thttpd.8 redirect.8 ssi.8 syslogtocern.8
+
+.include
+
+do-install:
+ @${INSTALL_PROGRAM} ${WRKSRC}/thttpd ${PREFIX}/sbin/
+ @${INSTALL_MAN} ${WRKSRC}/thttpd.8 ${PREFIX}/man/man8
+ @${INSTALL} -d -o root -g wheel -m 0755 ${PREFIX}/www
+ @${INSTALL} -d -o root -g wheel -m 0755 ${PREFIX}/www/data
+ @${INSTALL} -d -o root -g wheel -m 0755 ${PREFIX}/www/logs
+ @${INSTALL} -d -o root -g wheel -m 0755 ${PREFIX}/www/cgi-bin
+ @${INSTALL_PROGRAM} ${WRKSRC}/cgi-src/redirect ${PREFIX}/www/cgi-bin/
+ @${INSTALL_PROGRAM} ${WRKSRC}/cgi-src/ssi ${PREFIX}/www/cgi-bin/
+ @${INSTALL_PROGRAM} ${WRKSRC}/cgi-src/phf ${PREFIX}/www/cgi-bin/
+ @${INSTALL_MAN} ${WRKSRC}/cgi-src/redirect.8 ${PREFIX}/man/man8
+ @${INSTALL_MAN} ${WRKSRC}/cgi-src/ssi.8 ${PREFIX}/man/man8
+ @${INSTALL_PROGRAM} ${WRKSRC}/extras/makeweb ${PREFIX}/bin/
+ @${INSTALL} -c -m 755 -o root -g wheel ${WRKSRC}/extras/syslogtocern ${PREFIX}/bin/
+ @${INSTALL_PROGRAM} ${WRKSRC}/extras/htpasswd ${PREFIX}/bin/
+ @${INSTALL_MAN} ${WRKSRC}/extras/makeweb.1 ${PREFIX}/man/man1
+ @${INSTALL_MAN} ${WRKSRC}/extras/htpasswd.1 ${PREFIX}/man/man1
+ @${INSTALL_MAN} ${WRKSRC}/extras/syslogtocern.8 ${PREFIX}/man/man8
+ @if [ ! -f ${PREFIX}/sbin/thttpd_wrapper ]; then \
+ ${ECHO} "Installing ${PREFIX}/sbin/thttpd_wrapper file."; \
+ ${ECHO_CMD} "#!/bin/sh" > ${PREFIX}/sbin/thttpd_wrapper; \
+ ${ECHO_CMD} "${ECHO_CMD} \$$\$$ > /var/run/thttpd_wrapper.pid" >> ${PREFIX}/sbin/thttpd_wrapper; \
+ ${ECHO_CMD} "while true ; do" >> ${PREFIX}/sbin/thttpd_wrapper; \
+ ${ECHO_CMD} " ${PREFIX}/sbin/thttpd -D -C ${PREFIX}/etc/thttpd.conf" >> ${PREFIX}/sbin/thttpd_wrapper; \
+ ${ECHO_CMD} " sleep 10" >> ${PREFIX}/sbin/thttpd_wrapper; \
+ ${ECHO_CMD} "done" >> ${PREFIX}/sbin/thttpd_wrapper; \
+ ${CHMOD} 751 ${PREFIX}/sbin/thttpd_wrapper; \
+ fi
+ @${ECHO} "Installing ${PREFIX}/etc/thttpd.conf.sample configuration file."
+ @${ECHO_CMD} "dir=${PREFIX}/www/data" > ${PREFIX}/etc/thttpd.conf.sample
+ @${ECHO_CMD} "chroot" >> ${PREFIX}/etc/thttpd.conf.sample
+ @${ECHO_CMD} "cgipat=*.cgi" >> ${PREFIX}/etc/thttpd.conf.sample
+ @${ECHO_CMD} "logfile=${PREFIX}/www/logs/thttpd.log" >> ${PREFIX}/etc/thttpd.conf.sample
+ @${ECHO_CMD} "pidfile=/var/run/thttpd.pid" >> ${PREFIX}/etc/thttpd.conf.sample
+ @${ECHO} "Installing ${PREFIX}/etc/rc.d/thttpd.sh sample startup file."
+ @${INSTALL_SCRIPT} -m 751 ${FILESDIR}/thttpd.sh ${PREFIX}/etc/rc.d/thttpd.sh.sample
+ @${REINPLACE_CMD} -i '' -e 's|%%PREFIX%%|${PREFIX}|g' ${PREFIX}/etc/rc.d/thttpd.sh.sample
+
+.if !defined(NOPORTDOCS)
+ @${MKDIR} ${PREFIX}/share/doc/thttpd
+ @${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/notes.html ${PREFIX}/share/doc/thttpd
+.endif
+
+post-install:
+ @${CAT} ${PKGMESSAGE}
+
+post-configure: config-message
+.if ${OSVERSION} > 502101
+ @cd ${WRKSRC} && patch < ${PATCHDIR}/extra-patch-config.h
+.endif
+
+post-build: config-message
+
+config-message:
+ @${ECHO} "====================================================================="
+ @${ECHO} ""
+ @${ECHO} "Be sure to take a look at the options in config.h before (re)building"
+ @${ECHO} "if you want to tweak the server."
+ @${ECHO} ""
+ @${ECHO} "====================================================================="
+
+.include
Index: contrib/bsdinstaller/ports/www/thttpd-notimeout/distinfo
===================================================================
RCS file: contrib/bsdinstaller/ports/www/thttpd-notimeout/distinfo
diff -N contrib/bsdinstaller/ports/www/thttpd-notimeout/distinfo
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/www/thttpd-notimeout/distinfo 10 Jul 2004 22:03:04 -0000
@@ -0,0 +1,3 @@
+MD5 (thttpd/thttpd-2.24.tar.gz) = 9e72c27986548d0cbc8ea850b7b47bdd
+SIZE (thttpd/thttpd-2.24.tar.gz) = 130116
+MD5 (thttpd/notes.html) = IGNORE
Index: contrib/bsdinstaller/ports/www/thttpd-notimeout/pkg-descr
===================================================================
RCS file: contrib/bsdinstaller/ports/www/thttpd-notimeout/pkg-descr
diff -N contrib/bsdinstaller/ports/www/thttpd-notimeout/pkg-descr
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/www/thttpd-notimeout/pkg-descr 10 Jul 2004 22:03:04 -0000
@@ -0,0 +1,24 @@
+ thttpd - tiny/turbo/throttling HTTP server
+
+thttpd is a simple, small, portable, fast, and secure HTTP server.
+
+Simple: It handles only the minimum necessary to implement HTTP/1.1.
+
+Small: See the size comparison chart at
+http://www.acme.com/software/thttpd/notes.html#sizes. It also has a
+very small run-time size, since it does not fork and is very careful about
+memory allocation.
+
+Portable: It compiles cleanly on SunOS 4.1.x, Solaris 2.x, BSD/OS 2.x,
+Linux 1.2.x, and OSF/1 (on a 64-bit Alpha).
+
+Fast: In typical use it's about as fast as the best full-featured servers
+(Apache, NCSA, Netscape). Under extreme load it's much faster.
+
+Secure: It goes to great lengths to protect the web server machine
+against attacks and breakins from other sites.
+
+It also has one extremely useful feature (URL-traffic-based throttling) that
+no other server currently has.
+
+WWW: http://www.acme.com/software/thttpd/
Index: contrib/bsdinstaller/ports/www/thttpd-notimeout/pkg-message
===================================================================
RCS file: contrib/bsdinstaller/ports/www/thttpd-notimeout/pkg-message
diff -N contrib/bsdinstaller/ports/www/thttpd-notimeout/pkg-message
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/www/thttpd-notimeout/pkg-message 10 Jul 2004 22:03:04 -0000
@@ -0,0 +1,11 @@
+===========================================================================
+
+ If you want users to be able to create their own web
+ subdirectories off of the main web directory, you need to:
+
+ a) add a group for www admins
+ b) chgrp yourgroup ${PREFIX}/bin/makeweb ${PREFIX}/www
+ c) chmod 2755 ${PREFIX}/bin/makeweb
+ d) tell them about makeweb(1)
+
+===========================================================================
Index: contrib/bsdinstaller/ports/www/thttpd-notimeout/pkg-plist
===================================================================
RCS file: contrib/bsdinstaller/ports/www/thttpd-notimeout/pkg-plist
diff -N contrib/bsdinstaller/ports/www/thttpd-notimeout/pkg-plist
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/www/thttpd-notimeout/pkg-plist 10 Jul 2004 22:03:04 -0000
@@ -0,0 +1,16 @@
+bin/htpasswd
+bin/makeweb
+bin/syslogtocern
+etc/rc.d/thttpd.sh.sample
+etc/thttpd.conf.sample
+sbin/thttpd
+sbin/thttpd_wrapper
+%%PORTDOCS%%share/doc/thttpd/notes.html
+www/cgi-bin/phf
+www/cgi-bin/redirect
+www/cgi-bin/ssi
+%%PORTDOCS%%@dirrm share/doc/thttpd
+@unexec rmdir %D/www/cgi-bin 2> /dev/null || true
+@unexec rmdir %D/www/data 2> /dev/null || true
+@unexec rmdir %D/www/logs 2> /dev/null || true
+@unexec rmdir %D/www 2> /dev/null || true
Index: contrib/bsdinstaller/ports/www/thttpd-notimeout/files/extra-patch-config.h
===================================================================
RCS file: contrib/bsdinstaller/ports/www/thttpd-notimeout/files/extra-patch-config.h
diff -N contrib/bsdinstaller/ports/www/thttpd-notimeout/files/extra-patch-config.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/www/thttpd-notimeout/files/extra-patch-config.h 10 Jul 2004 22:03:04 -0000
@@ -0,0 +1,9 @@
+--- config.h.old Sat Jan 31 22:17:25 2004
++++ config.h Sat Jan 31 22:17:38 2004
+@@ -380,4 +380,6 @@
+ */
+ #define MIN_WOULDBLOCK_DELAY 100L
+
++#define USE_SENDFILE
++
+ #endif /* _CONFIG_H_ */
Index: contrib/bsdinstaller/ports/www/thttpd-notimeout/files/patch-ab
===================================================================
RCS file: contrib/bsdinstaller/ports/www/thttpd-notimeout/files/patch-ab
diff -N contrib/bsdinstaller/ports/www/thttpd-notimeout/files/patch-ab
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/www/thttpd-notimeout/files/patch-ab 10 Jul 2004 22:03:04 -0000
@@ -0,0 +1,11 @@
+--- Makefile.in.orig Tue Apr 24 19:21:06 2001
++++ Makefile.in Tue Apr 24 19:21:33 2001
+@@ -47,7 +47,7 @@
+ # You shouldn't need to edit anything below here.
+
+ CC = @CC@
+-CCOPT = @V_CCOPT@
++CCOPT = @CFLAGS@
+ DEFS = @DEFS@
+ INCLS = -I.
+ CFLAGS = $(CCOPT) $(DEFS) $(INCLS)
Index: contrib/bsdinstaller/ports/www/thttpd-notimeout/files/patch-ac
===================================================================
RCS file: contrib/bsdinstaller/ports/www/thttpd-notimeout/files/patch-ac
diff -N contrib/bsdinstaller/ports/www/thttpd-notimeout/files/patch-ac
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/www/thttpd-notimeout/files/patch-ac 10 Jul 2004 22:03:04 -0000
@@ -0,0 +1,11 @@
+--- cgi-src/Makefile.in.orig Tue Apr 24 19:44:12 2001
++++ cgi-src/Makefile.in Tue Apr 24 19:44:25 2001
+@@ -31,7 +31,7 @@
+ MANDIR = @mandir@
+
+ CC = @CC@
+-CCOPT = @V_CCOPT@
++CCOPT = @CFLAGS@
+ DEFS = @DEFS@
+ INCLS = -I..
+ CFLAGS = $(CCOPT) $(DEFS) $(INCLS)
Index: contrib/bsdinstaller/ports/www/thttpd-notimeout/files/patch-ad
===================================================================
RCS file: contrib/bsdinstaller/ports/www/thttpd-notimeout/files/patch-ad
diff -N contrib/bsdinstaller/ports/www/thttpd-notimeout/files/patch-ad
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/www/thttpd-notimeout/files/patch-ad 10 Jul 2004 22:03:04 -0000
@@ -0,0 +1,11 @@
+--- extras/Makefile.in.orig Tue Apr 24 19:46:03 2001
++++ extras/Makefile.in Tue Apr 24 19:46:13 2001
+@@ -32,7 +32,7 @@
+ MANDIR = @mandir@
+
+ CC = @CC@
+-CCOPT = @V_CCOPT@
++CCOPT = @CFLAGS@
+ DEFS = @DEFS@
+ INCLS = -I..
+ CFLAGS = $(CCOPT) $(DEFS) $(INCLS)
Index: contrib/bsdinstaller/ports/www/thttpd-notimeout/files/patch-config.h
===================================================================
RCS file: contrib/bsdinstaller/ports/www/thttpd-notimeout/files/patch-config.h
diff -N contrib/bsdinstaller/ports/www/thttpd-notimeout/files/patch-config.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/www/thttpd-notimeout/files/patch-config.h 10 Jul 2004 22:03:04 -0000
@@ -0,0 +1,11 @@
+--- config.h.orig 2004-06-06 18:09:22.000000000 -0700
++++ config.h 2004-06-06 18:09:58.000000000 -0700
+@@ -75,7 +75,7 @@
+ ** or whatever. If you don't want any limit, comment this out, but that's
+ ** probably a really bad idea.
+ */
+-#define CGI_TIMELIMIT 30
++/* #define CGI_TIMELIMIT 30 */
+
+ /* CONFIGURE: How many seconds to allow for reading the initial request
+ ** on a new connection.
Index: contrib/bsdinstaller/ports/www/thttpd-notimeout/files/patch-libhttpd.c
===================================================================
RCS file: contrib/bsdinstaller/ports/www/thttpd-notimeout/files/patch-libhttpd.c
diff -N contrib/bsdinstaller/ports/www/thttpd-notimeout/files/patch-libhttpd.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/www/thttpd-notimeout/files/patch-libhttpd.c 10 Jul 2004 22:03:04 -0000
@@ -0,0 +1,12 @@
+--- libhttpd.c.orig Mon May 27 01:22:26 2002
++++ libhttpd.c Sun Oct 20 23:49:58 2002
+@@ -3816,6 +3816,9 @@
+ httpd_send_err( hc, 500, err500title, "", err500form, hc->encodedurl );
+ return -1;
+ }
++#ifdef USE_SENDFILE
++ hc->file_fd = *((int *) hc->file_address);
++#endif
+ send_mime(
+ hc, 200, ok200title, hc->encodings, "", hc->type, hc->sb.st_size,
+ hc->sb.st_mtime );
Index: contrib/bsdinstaller/ports/www/thttpd-notimeout/files/patch-libhttpd.h
===================================================================
RCS file: contrib/bsdinstaller/ports/www/thttpd-notimeout/files/patch-libhttpd.h
diff -N contrib/bsdinstaller/ports/www/thttpd-notimeout/files/patch-libhttpd.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/www/thttpd-notimeout/files/patch-libhttpd.h 10 Jul 2004 22:03:04 -0000
@@ -0,0 +1,12 @@
+--- libhttpd.h.orig Sun Oct 20 23:50:43 2002
++++ libhttpd.h Sun Oct 20 23:51:10 2002
+@@ -141,6 +141,9 @@
+ struct stat sb;
+ int conn_fd;
+ char* file_address;
++#ifdef USE_SENDFILE
++ int file_fd;
++#endif
+ } httpd_conn;
+
+ /* Methods. */
Index: contrib/bsdinstaller/ports/www/thttpd-notimeout/files/patch-mmc.c
===================================================================
RCS file: contrib/bsdinstaller/ports/www/thttpd-notimeout/files/patch-mmc.c
diff -N contrib/bsdinstaller/ports/www/thttpd-notimeout/files/patch-mmc.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/www/thttpd-notimeout/files/patch-mmc.c 10 Jul 2004 22:03:04 -0000
@@ -0,0 +1,89 @@
+--- mmc.c.orig Tue Oct 22 09:42:01 2002
++++ mmc.c Fri Nov 14 12:26:39 2003
+@@ -74,6 +74,9 @@
+ time_t ctime;
+ int refcount;
+ time_t reftime;
++#ifdef USE_SENDFILE
++ int fd;
++#endif
+ void* addr;
+ unsigned int hash;
+ int hash_idx;
+@@ -140,7 +143,11 @@
+ /* Yep. Just return the existing map */
+ ++m->refcount;
+ m->reftime = now;
++#ifdef USE_SENDFILE
++ return (&m->fd);
++#else
+ return m->addr;
++#endif
+ }
+
+ /* Open the file. */
+@@ -186,7 +193,9 @@
+ else
+ {
+ size_t size_size = (size_t) m->size; /* loses on files >2GB */
+-#ifdef HAVE_MMAP
++#ifdef USE_SENDFILE
++ m->fd = fd;
++#elif defined(HAVE_MMAP)
+ /* Map the file into memory. */
+ m->addr = mmap( 0, size_size, PROT_READ, MAP_PRIVATE, fd, 0 );
+ if ( m->addr == (void*) -1 && errno == ENOMEM )
+@@ -234,8 +243,9 @@
+ }
+ #endif /* HAVE_MMAP */
+ }
++#ifndef USE_SENDFILE
+ (void) close( fd );
+-
++#endif /* !USE_SENDFILE */
+ /* Put the Map into the hash table. */
+ if ( add_hash( m ) < 0 )
+ {
+@@ -253,8 +263,12 @@
+ /* Update the total byte count. */
+ mapped_bytes += m->size;
+
++#ifdef USE_SENDFILE
++ return (&m->fd);
++#else
+ /* And return the address. */
+ return m->addr;
++#endif
+ }
+
+
+@@ -267,14 +281,18 @@
+ if ( sbP != (struct stat*) 0 )
+ {
+ m = find_hash( sbP->st_ino, sbP->st_dev, sbP->st_size, sbP->st_ctime );
++#ifndef USE_SENDFILE
+ if ( m != (Map*) 0 && m->addr != addr )
+ m = (Map*) 0;
++#endif
+ }
++#ifndef USE_SENDFILE
+ /* If that didn't work, try a full search. */
+ if ( m == (Map*) 0 )
+ for ( m = maps; m != (Map*) 0; m = m->next )
+ if ( m->addr == addr )
+ break;
++#endif
+ if ( m == (Map*) 0 )
+ syslog( LOG_ERR, "mmc_unmap failed to find entry!" );
+ else if ( m->refcount <= 0 )
+@@ -363,7 +381,9 @@
+ m = *mm;
+ if ( m->size != 0 )
+ {
+-#ifdef HAVE_MMAP
++#ifdef USE_SENDFILE
++ close(m->fd);
++#elif defined(HAVE_MMAP)
+ if ( munmap( m->addr, m->size ) < 0 )
+ syslog( LOG_ERR, "munmap - %m" );
+ #else /* HAVE_MMAP */
Index: contrib/bsdinstaller/ports/www/thttpd-notimeout/files/patch-thttpd.c
===================================================================
RCS file: contrib/bsdinstaller/ports/www/thttpd-notimeout/files/patch-thttpd.c
diff -N contrib/bsdinstaller/ports/www/thttpd-notimeout/files/patch-thttpd.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/www/thttpd-notimeout/files/patch-thttpd.c 10 Jul 2004 22:03:04 -0000
@@ -0,0 +1,56 @@
+--- thttpd.c.orig Tue May 13 17:14:33 2003
++++ thttpd.c Wed Oct 29 05:50:14 2003
+@@ -1593,12 +1593,45 @@
+ if ( hc->responselen == 0 )
+ {
+ /* No, just write the file. */
++#ifdef USE_SENDFILE
++ off_t sbytes;
++
++ sz = sendfile(
++ hc->file_fd, hc->conn_fd, c->bytes_sent,
++ MIN( c->bytes_to_send - c->bytes_sent, c->max_limit ),
++ NULL, &sbytes, 0 );
++ if (sz == -1 && errno == EAGAIN)
++ sz = sbytes > 0 ? sbytes : -1;
++ else if (sz == 0)
++ sz = sbytes;
++#else
+ sz = write(
+ hc->conn_fd, &(hc->file_address[c->bytes_sent]),
+ MIN( c->bytes_to_send - c->bytes_sent, c->max_limit ) );
++#endif
+ }
+ else
+ {
++#ifdef USE_SENDFILE
++ struct sf_hdtr sf;
++ struct iovec iv;
++ off_t sbytes;
++
++ iv.iov_base = hc->response;
++ iv.iov_len = hc->responselen;
++ sf.headers = &iv;
++ sf.hdr_cnt = 1;
++ sf.trailers = NULL;
++ sf.trl_cnt = 0;
++ sz = sendfile(
++ hc->file_fd, hc->conn_fd, c->bytes_sent,
++ MIN( c->bytes_to_send - c->bytes_sent, c->max_limit ),
++ &sf, &sbytes, 0 );
++ if (sz == -1 && errno == EAGAIN)
++ sz = sbytes > 0 ? sbytes : -1;
++ else if (sz == 0)
++ sz = sbytes;
++#else
+ /* Yes. We'll combine headers and file into a single writev(),
+ ** hoping that this generates a single packet.
+ */
+@@ -1609,6 +1642,7 @@
+ iv[1].iov_base = &(hc->file_address[c->bytes_sent]);
+ iv[1].iov_len = MIN( c->bytes_to_send - c->bytes_sent, c->max_limit );
+ sz = writev( hc->conn_fd, iv, 2 );
++#endif
+ }
+
+ if ( sz == 0 ||
Index: contrib/bsdinstaller/ports/www/thttpd-notimeout/files/thttpd.sh
===================================================================
RCS file: contrib/bsdinstaller/ports/www/thttpd-notimeout/files/thttpd.sh
diff -N contrib/bsdinstaller/ports/www/thttpd-notimeout/files/thttpd.sh
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/ports/www/thttpd-notimeout/files/thttpd.sh 10 Jul 2004 22:03:04 -0000
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+case "$1" in
+start)
+ if [ -x %%PREFIX%%/sbin/thttpd_wrapper ]; then
+ %%PREFIX%%/sbin/thttpd_wrapper &
+ echo -n ' thttpd'
+ fi
+ ;;
+stop)
+ kill `cat /var/run/thttpd_wrapper.pid` && killall thttpd && echo -n ' thttpd'
+ ;;
+*)
+ echo "Usage: `basename $0` {start|stop}" >&2
+ ;;
+esac
+
+exit 0
Index: contrib/bsdinstaller/root_skels/installer/boot/cdboot.flp.bz2
===================================================================
RCS file: contrib/bsdinstaller/root_skels/installer/boot/cdboot.flp.bz2
diff -N contrib/bsdinstaller/root_skels/installer/boot/cdboot.flp.bz2
Binary files /dev/null and cdboot.flp.bz2 differ
Index: contrib/bsdinstaller/root_skels/installer/boot/memtest86.flp.bz2
===================================================================
RCS file: contrib/bsdinstaller/root_skels/installer/boot/memtest86.flp.bz2
diff -N contrib/bsdinstaller/root_skels/installer/boot/memtest86.flp.bz2
Binary files /dev/null and memtest86.flp.bz2 differ
Index: contrib/bsdinstaller/root_skels/installer/etc/dhcpd.conf
===================================================================
RCS file: contrib/bsdinstaller/root_skels/installer/etc/dhcpd.conf
diff -N contrib/bsdinstaller/root_skels/installer/etc/dhcpd.conf
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/root_skels/installer/etc/dhcpd.conf 12 Apr 2005 03:49:45 -0000
@@ -0,0 +1,31 @@
+# $DragonFly: src/nrelease/installer/etc/dhcpd.conf,v 1.1 2005/04/08 03:25:18 dillon Exp $
+#
+
+ddns-update-style none;
+
+class "pxeboot-class" {
+ match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
+}
+
+class "etherboot-class" {
+ match if substring (option vendor-class-identifier, 0, 9) = "Etherboot";
+}
+
+class "dragonfly-class" {
+ match if substring (option vendor-class-identifier, 0, 9) = "DragonFly";
+}
+
+subnet 10.1.0.0 netmask 255.255.0.0 {
+ pool {
+ allow members of "pxeboot-class";
+ allow members of "etherboot-class";
+ allow members of "dragonfly-class";
+ range 10.1.0.128 10.1.0.254;
+ option subnet-mask 255.255.255.0;
+ option broadcast-address 10.1.0.255;
+ filename "pxeboot";
+ option root-path "10.1.0.1:/";
+ next-server 10.1.0.1;
+ }
+}
+
Index: contrib/bsdinstaller/root_skels/installer/etc/fstab
===================================================================
RCS file: contrib/bsdinstaller/root_skels/installer/etc/fstab
diff -N contrib/bsdinstaller/root_skels/installer/etc/fstab
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/root_skels/installer/etc/fstab 8 Jan 2005 20:37:05 -0000
@@ -0,0 +1,12 @@
+# $Id: fstab,v 1.3 2005/01/08 20:37:05 cpressey Exp $
+# $DragonFly: src/nrelease/installer/etc/fstab,v 1.2 2004/10/15 02:43:50 dillon Exp $
+#
+# Device Mountpoint FStype Options Dump Pass#
+/dev/acd0a / cd9660 ro,noauto 0 0
+swap /root mfs rw,-C,-s=8192 0 0
+swap /var mfs rw,-C,-s=8192 0 0
+swap /tmp mfs rw,-C,-s=8192 0 0
+swap /etc mfs rw,-C,-s=8192 0 0
+swap /dev mfs rw,-C,-s=8192,-i=512 0 0
+swap /usr/local/etc mfs rw,-C,-s=8192 0 0
+proc /proc procfs rw 0 0
Index: contrib/bsdinstaller/root_skels/installer/etc/issue
===================================================================
RCS file: contrib/bsdinstaller/root_skels/installer/etc/issue
diff -N contrib/bsdinstaller/root_skels/installer/etc/issue
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/root_skels/installer/etc/issue 21 Apr 2005 01:40:55 -0000
@@ -0,0 +1,5 @@
+Welcome to DragonFly!
+
+- To start the installer, login as 'installer'.
+- To start the installer under X Windows, login as 'xinstaller'.
+- To just get a shell prompt, login as 'root'.
Index: contrib/bsdinstaller/root_skels/installer/etc/master.passwd
===================================================================
RCS file: contrib/bsdinstaller/root_skels/installer/etc/master.passwd
diff -N contrib/bsdinstaller/root_skels/installer/etc/master.passwd
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/root_skels/installer/etc/master.passwd 13 Apr 2005 03:32:16 -0000
@@ -0,0 +1,23 @@
+# $DragonFly: src/nrelease/installer/etc/master.passwd,v 1.2 2004/07/11 01:24:07 dillon Exp $
+#
+root::0:0::0:0:Charlie &:/root:/bin/csh
+toor:*:0:0::0:0:Bourne-again Superuser:/root:
+installer::0:0::0:0:Installer:/root:/usr/local/bin/installer
+xinstaller::0:0::0:0:X-Windows Installer:/root:/usr/local/bin/xinstaller
+daemon:*:1:1::0:0:Owner of many system processes:/root:/sbin/nologin
+operator:*:2:5::0:0:System &:/:/sbin/nologin
+bin:*:3:7::0:0:Binaries Commands and Source:/:/sbin/nologin
+tty:*:4:65533::0:0:Tty Sandbox:/:/sbin/nologin
+kmem:*:5:65533::0:0:KMem Sandbox:/:/sbin/nologin
+games:*:7:13::0:0:Games pseudo-user:/usr/games:/sbin/nologin
+news:*:8:8::0:0:News Subsystem:/:/sbin/nologin
+man:*:9:9::0:0:Mister Man Pages:/usr/share/man:/sbin/nologin
+sshd:*:22:22::0:0:Secure Shell Daemon:/var/empty:/sbin/nologin
+smmsp:*:25:25::0:0:Sendmail Submission User:/var/spool/clientmqueue:/sbin/nologin
+mailnull:*:26:26::0:0:Sendmail Default User:/var/spool/mqueue:/sbin/nologin
+bind:*:53:53::0:0:Bind Sandbox:/:/sbin/nologin
+uucp:*:66:66::0:0:UUCP pseudo-user:/var/spool/uucppublic:/usr/libexec/uucp/uucico
+xten:*:67:67::0:0:X-10 daemon:/usr/local/xten:/sbin/nologin
+pop:*:68:6::0:0:Post Office Owner:/nonexistent:/sbin/nologin
+www:*:80:80::0:0:World Wide Web Owner:/nonexistent:/sbin/nologin
+nobody:*:65534:65534::0:0:Unprivileged user:/nonexistent:/sbin/nologin
Index: contrib/bsdinstaller/root_skels/installer/etc/ttys
===================================================================
RCS file: contrib/bsdinstaller/root_skels/installer/etc/ttys
diff -N contrib/bsdinstaller/root_skels/installer/etc/ttys
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/root_skels/installer/etc/ttys 8 Jan 2005 20:34:03 -0000
@@ -0,0 +1,307 @@
+#
+# $FreeBSD: src/etc/etc.i386/ttys,v 1.8 2000/01/29 12:18:03 obrien Exp $
+# $Id: ttys,v 1.3 2005/01/08 20:34:03 cpressey Exp $
+# $DragonFly: src/nrelease/installer/etc/ttys,v 1.3 2004/08/26 20:31:57 dillon Exp $
+# @(#)ttys 5.1 (Berkeley) 4/17/89
+#
+# This file specifies various information about terminals on the system.
+# It is used by several different programs. Common entries for the
+# various columns include:
+#
+# name The name of the terminal device.
+#
+# getty The program to start running on the terminal. Typically a
+# getty program, as the name implies. Other common entries
+# include none, when no getty is needed, and xdm, to start the
+# X Window System.
+#
+# type The initial terminal type for this port. For hardwired
+# terminal lines, this will contain the type of terminal used.
+# For virtual consoles, the correct type is cons25. Other
+# common values include network for network connections on
+# pseudo-terminals, dialup for incoming modem ports, and unknown
+# when the terminal type cannot be predetermined.
+#
+# status Must be on or off. If on, init will run the getty program on
+# the specified port. If the word "secure" appears, this tty
+# allows root login.
+#
+# name getty type status comments
+#
+# If console is marked "insecure", then init will ask for the root password
+# when going to single-user mode.
+console none unknown off secure
+#
+ttyv0 "/usr/libexec/getty Pc" cons25 on secure
+# Virtual terminals
+ttyv2 "/usr/libexec/getty Pc" cons25 on secure
+ttyv3 "/usr/libexec/getty Pc" cons25 on secure
+ttyv4 "/usr/libexec/getty Pc" cons25 on secure
+ttyv5 "/usr/libexec/getty Pc" cons25 on secure
+ttyv6 "/usr/libexec/getty Pc" cons25 on secure
+ttyv7 "/usr/libexec/getty Pc" cons25 on secure
+#ttyv8 "/usr/X11R6/bin/xdm -nodaemon" xterm off secure
+# Serial terminals
+# vt100-color seems to work best when talking to the serial port
+# from a cu/tip running on an xterm.
+ttyd0 "/usr/libexec/getty std.9600" vt100-color off secure
+ttyd1 "/usr/libexec/getty std.9600" dialup off secure
+ttyd2 "/usr/libexec/getty std.9600" dialup off secure
+ttyd3 "/usr/libexec/getty std.9600" dialup off secure
+# Pseudo terminals
+ttyp0 none network
+ttyp1 none network
+ttyp2 none network
+ttyp3 none network
+ttyp4 none network
+ttyp5 none network
+ttyp6 none network
+ttyp7 none network
+ttyp8 none network
+ttyp9 none network
+ttypa none network
+ttypb none network
+ttypc none network
+ttypd none network
+ttype none network
+ttypf none network
+ttypg none network
+ttyph none network
+ttypi none network
+ttypj none network
+ttypk none network
+ttypl none network
+ttypm none network
+ttypn none network
+ttypo none network
+ttypp none network
+ttypq none network
+ttypr none network
+ttyps none network
+ttypt none network
+ttypu none network
+ttypv none network
+ttyq0 none network
+ttyq1 none network
+ttyq2 none network
+ttyq3 none network
+ttyq4 none network
+ttyq5 none network
+ttyq6 none network
+ttyq7 none network
+ttyq8 none network
+ttyq9 none network
+ttyqa none network
+ttyqb none network
+ttyqc none network
+ttyqd none network
+ttyqe none network
+ttyqf none network
+ttyqg none network
+ttyqh none network
+ttyqi none network
+ttyqj none network
+ttyqk none network
+ttyql none network
+ttyqm none network
+ttyqn none network
+ttyqo none network
+ttyqp none network
+ttyqq none network
+ttyqr none network
+ttyqs none network
+ttyqt none network
+ttyqu none network
+ttyqv none network
+ttyr0 none network
+ttyr1 none network
+ttyr2 none network
+ttyr3 none network
+ttyr4 none network
+ttyr5 none network
+ttyr6 none network
+ttyr7 none network
+ttyr8 none network
+ttyr9 none network
+ttyra none network
+ttyrb none network
+ttyrc none network
+ttyrd none network
+ttyre none network
+ttyrf none network
+ttyrg none network
+ttyrh none network
+ttyri none network
+ttyrj none network
+ttyrk none network
+ttyrl none network
+ttyrm none network
+ttyrn none network
+ttyro none network
+ttyrp none network
+ttyrq none network
+ttyrr none network
+ttyrs none network
+ttyrt none network
+ttyru none network
+ttyrv none network
+ttys0 none network
+ttys1 none network
+ttys2 none network
+ttys3 none network
+ttys4 none network
+ttys5 none network
+ttys6 none network
+ttys7 none network
+ttys8 none network
+ttys9 none network
+ttysa none network
+ttysb none network
+ttysc none network
+ttysd none network
+ttyse none network
+ttysf none network
+ttysg none network
+ttysh none network
+ttysi none network
+ttysj none network
+ttysk none network
+ttysl none network
+ttysm none network
+ttysn none network
+ttyso none network
+ttysp none network
+ttysq none network
+ttysr none network
+ttyss none network
+ttyst none network
+ttysu none network
+ttysv none network
+ttyP0 none network
+ttyP1 none network
+ttyP2 none network
+ttyP3 none network
+ttyP4 none network
+ttyP5 none network
+ttyP6 none network
+ttyP7 none network
+ttyP8 none network
+ttyP9 none network
+ttyPa none network
+ttyPb none network
+ttyPc none network
+ttyPd none network
+ttyPe none network
+ttyPf none network
+ttyPg none network
+ttyPh none network
+ttyPi none network
+ttyPj none network
+ttyPk none network
+ttyPl none network
+ttyPm none network
+ttyPn none network
+ttyPo none network
+ttyPp none network
+ttyPq none network
+ttyPr none network
+ttyPs none network
+ttyPt none network
+ttyPu none network
+ttyPv none network
+ttyQ0 none network
+ttyQ1 none network
+ttyQ2 none network
+ttyQ3 none network
+ttyQ4 none network
+ttyQ5 none network
+ttyQ6 none network
+ttyQ7 none network
+ttyQ8 none network
+ttyQ9 none network
+ttyQa none network
+ttyQb none network
+ttyQc none network
+ttyQd none network
+ttyQe none network
+ttyQf none network
+ttyQg none network
+ttyQh none network
+ttyQi none network
+ttyQj none network
+ttyQk none network
+ttyQl none network
+ttyQm none network
+ttyQn none network
+ttyQo none network
+ttyQp none network
+ttyQq none network
+ttyQr none network
+ttyQs none network
+ttyQt none network
+ttyQu none network
+ttyQv none network
+ttyR0 none network
+ttyR1 none network
+ttyR2 none network
+ttyR3 none network
+ttyR4 none network
+ttyR5 none network
+ttyR6 none network
+ttyR7 none network
+ttyR8 none network
+ttyR9 none network
+ttyRa none network
+ttyRb none network
+ttyRc none network
+ttyRd none network
+ttyRe none network
+ttyRf none network
+ttyRg none network
+ttyRh none network
+ttyRi none network
+ttyRj none network
+ttyRk none network
+ttyRl none network
+ttyRm none network
+ttyRn none network
+ttyRo none network
+ttyRp none network
+ttyRq none network
+ttyRr none network
+ttyRs none network
+ttyRt none network
+ttyRu none network
+ttyRv none network
+ttyS0 none network
+ttyS1 none network
+ttyS2 none network
+ttyS3 none network
+ttyS4 none network
+ttyS5 none network
+ttyS6 none network
+ttyS7 none network
+ttyS8 none network
+ttyS9 none network
+ttySa none network
+ttySb none network
+ttySc none network
+ttySd none network
+ttySe none network
+ttySf none network
+ttySg none network
+ttySh none network
+ttySi none network
+ttySj none network
+ttySk none network
+ttySl none network
+ttySm none network
+ttySn none network
+ttySo none network
+ttySp none network
+ttySq none network
+ttySr none network
+ttySs none network
+ttySt none network
+ttySu none network
+ttySv none network
Index: contrib/bsdinstaller/root_skels/installer/etc/defaults/pfi.conf
===================================================================
RCS file: contrib/bsdinstaller/root_skels/installer/etc/defaults/pfi.conf
diff -N contrib/bsdinstaller/root_skels/installer/etc/defaults/pfi.conf
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/root_skels/installer/etc/defaults/pfi.conf 29 Jul 2006 18:02:50 -0000
@@ -0,0 +1,143 @@
+#######################################################################
+# $Id: pfi.conf,v 1.11 2006/07/29 18:02:50 cpressey Exp $
+# Defaults for pfi.conf.
+
+# A space-separated list of what services to restart when we are done
+# changing options. The services are the base names of RCNG scripts
+# (i.e. without the "/etc/rc.d/" prefix.) Note that these must be
+# given explicitly in the same order they would normally be started
+# by rcorder during RCNG (e.g. "netif dhclient sshd"); they are not
+# automatically ordered by their dependencies here.
+
+pfi_rc_actions=""
+
+# Determines which installer frontend to use. Defaults to "curses";
+# other legal options are "cgi" and "none".
+
+pfi_frontend="curses"
+
+# Determines which installer backend to use. The standard backend
+# is now the Lua backend, but this can be changed, to start an
+# alternate backend. (See example #4, below.)
+
+pfi_backend="/usr/local/bin/lua50c51 -l/usr/local/share/dfuibe_lua/lib /usr/local/share/dfuibe_lua/main.lua"
+pfi_backend="$pfi_backend option.booted_from_install_media=true"
+
+# Determines how options are passed to the installer backend's
+# command line.
+
+pfi_transport_option="ui.transport="
+pfi_rendezvous_option="ui.rendezvous="
+
+# When using the curses frontend:
+# Set the amount of time, in milliseconds, which must pass after
+# the 'ESC' key is pressed, in order for it to be recognized
+# as a plain 'ESC' keystroke, and not part of an escape code.
+
+pfi_curses_escdelay="150"
+
+# A password to set as the root password on the LiveCD, if any.
+
+pfi_set_root_password=""
+
+# Control corresponding sshd options. To make sure sshd restarts with
+# these options, add "sshd" to pfi_rc_actions.
+
+pfi_sshd_permit_root_login="NO"
+pfi_sshd_permit_empty_passwords="NO"
+
+# An script to run before the installer. It is assumed this script is
+# located on the pfi media. While it is run, the media's root directory
+# is mounted on /mnt.
+
+pfi_script=""
+
+# A program to run before the installer. It is assumed to reside on
+# the LiveCD; /mnt is not mounted.
+
+pfi_run=""
+
+# What transport layer the DFUI in the installer should use. Valid
+# values are currently "caps", "npipe", and "tcp".
+
+pfi_dfui_transport="tcp"
+
+# User to automatically log in as, or "NONE".
+
+pfi_autologin="NONE"
+
+# Command to use to reboot. "shutdown -h now" is typically used
+# interactively, to give the user a chance to eject the disk, but
+# "shutdown -r now" can be used for headless operation.
+
+pfi_shutdown_command="shutdown -h now"
+
+#######################################################################
+# EXAMPLES
+# To use one of these examples, extract it to a text file and remove the
+# leading pound-signs. Copy this text file to the file "/pfi.conf"
+# on a floppy disk or USB pen drive (hereinafter referred to as "the pfi
+# media") and have that media inserted or attached to the computer while
+# you boot from the installer CD-ROM. The installer will attempt to
+# locate this file and, if found, will use the variables present within it
+# to configure the installer boot process.
+
+# This file has the same syntax as /etc/rc.conf, and it can contain any
+# setting which is meaningful in /etc/rc.conf as well. Any rc.conf
+# setting which is given will only be obeyed, however, if the RCNG script
+# to which that setting applies is named in pfi_rc_actions.
+
+# EXAMPLE 1:
+# Boot the installer headless, configure the network interface dc0,
+# and start the CGI frontend.
+#
+# ifconfig_dc0="DHCP"
+# pfi_rc_actions="netif dhclient"
+# pfi_frontend="cgi"
+# pfi_autologin="installer"
+# pfi_shutdown_command="shutdown -r now"
+
+# EXAMPLE 2:
+# Boot the installer headless, configure the network interface rl0,
+# and allow ssh'ing into the box as root with the password "sekrit".
+#
+# ifconfig_rl0="DHCP"
+# pfi_sshd_permit_root_login="YES"
+# pfi_set_root_password="sekrit"
+# pfi_rc_actions="netif dhclient sshd"
+# pfi_frontend="none"
+# pfi_autologin="installer"
+# pfi_shutdown_command="shutdown -r now"
+
+# EXAMPLE 3:
+# Boot the cd and setup a PXE/TFTP/DCHPD server environment
+# so that clients can boot from the network and enter the installer
+#
+# Enable tftp and NFS services with pxeboot and a kernel available via
+# tftp and the CD's root mount available via NFS.
+#
+# pfi_boot_tftp_server="YES"
+# pfi_boot_nfs_server="YES"
+# pfi_boot_pxeserver="YES"
+# pfi_boot_ipserver="YES"
+# pfi_option_subnet-mask="255.255.255.0"
+# pfi_option_routers="10.0.250.1"
+# pfi_filename="pxeboot"
+# pfi_ddns-update-style="none"
+# pfi_option_domain-name="domain.com"
+# pfi_option_broadcast-address="10.0.250.255"
+# pfi_option_domain-name-servers="192.168.64.3"
+# pfi_server-name="DHCPServer"
+# pfi_server-identifier="10.0.250.50"
+# pfi_default-lease-time="7200"
+# pfi_max-lease-time="7200"
+# pfi_subnet="10.0.250.0 netmask 255.255.255.0"
+# pfi_next-server="10.0.250.50"
+# pfi_range="10.0.250.29 10.0.250.250"
+
+# EXAMPLE 4:
+# Revert to the traditional, C language backend.
+#
+# pfi_backend="/usr/local/sbin/dfuibe_installer"
+# pfi_transport_option="-t "
+# pfi_rendezvous_option="-r "
Index: contrib/bsdinstaller/root_skels/installer/etc/rc.d/pfi
===================================================================
RCS file: contrib/bsdinstaller/root_skels/installer/etc/rc.d/pfi
diff -N contrib/bsdinstaller/root_skels/installer/etc/rc.d/pfi
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/root_skels/installer/etc/rc.d/pfi 7 Mar 2005 06:18:21 -0000
@@ -0,0 +1,201 @@
+#!/bin/sh
+
+# $Id: pfi,v 1.12 2005/03/07 06:18:21 cpressey Exp $
+# $DragonFly$
+
+# PROVIDE: pfi
+# REQUIRE: mountoptional
+# KEYWORD: DragonFly
+
+. /etc/rc.subr
+
+name=pfi
+start_cmd="pfi_start"
+stop_cmd=":"
+
+get_pfi_config()
+{
+ [ -r /etc/pfi.conf ] && return 0
+
+ if [ -r $1/pfi.conf ]; then
+ echo " found!"
+ tr -d "\r" < $1/pfi.conf > /etc/pfi.conf
+ echo "pfi_found_on_device='$2'" >> /etc/pfi.conf
+
+ # If the pfi.conf says to run a custom script from the pfi
+ # media, run it now, so that it has access to the pfi media.
+
+ if [ -r /etc/defaults/pfi.conf ]; then
+ . /etc/defaults/pfi.conf
+ fi
+ . /etc/pfi.conf
+ if [ "$pfi_script" != "" -a -x "$1/$pfi_script" ]; then
+ $1/$pfi_script
+ fi
+ return 0
+ else
+ return 1
+ fi
+}
+
+get_authorized_hosts()
+{
+ [ -r /root/.ssh/authorized_hosts ] && return 0
+ if [ -r $1/authorized_hosts ]; then
+ echo "authorized_hosts found!"
+ mkdir -p /root/.ssh/
+ tr -d "\r" < $1/authorized_hosts > /root/.ssh/authorized_hosts
+ fi
+}
+
+look_for_pfi_config_msdos()
+{
+ [ -r /etc/pfi.conf ] && return 0
+
+ for try_device in da0s1 da1s1 fd0 fd1; do
+ echo -n "Looking for pfi.conf on /dev/${try_device}..."
+ if [ ! -e /dev/${try_device} ]; then
+ ( cd /dev && ./MAKEDEV ${try_device} )
+ fi
+ if mount_msdos -o rdonly /dev/$try_device /mnt ; then
+ echo -n " /dev/$try_device ok..."
+ if get_pfi_config /mnt /dev/$try_device; then
+ get_authorized_hosts /mnt
+ umount /mnt
+ return 0
+ fi
+ umount /mnt
+ fi
+ echo " not found"
+ done
+ return 1
+}
+
+look_for_pfi_config_cd9660()
+{
+ [ -r /etc/pfi.conf ] && return 0
+
+ for try_device in acd0c; do
+ echo -n "Looking for pfi.conf on /dev/${try_device}..."
+ if [ ! -e /dev/${try_device} ]; then
+ ( cd /dev && ./MAKEDEV ${try_device} )
+ fi
+ if mount_cd9660 /dev/$try_device /mnt ; then
+ echo -n " /dev/$try_device ok..."
+ if get_pfi_config /mnt /dev/$try_device; then
+ get_authorized_hosts /mnt
+ umount /mnt
+ return 0
+ fi
+ umount /mnt
+ fi
+ echo " not found"
+ done
+ return 1
+}
+
+pfi_start()
+{
+ echo "Starting pfi..."
+
+ # Get the pfi.conf file off the pfi media and into /etc/pfi.conf.
+
+ look_for_pfi_config_cd9660
+ look_for_pfi_config_msdos
+
+ # If the search was not successful, stub out a dummy pfi.conf.
+
+ if [ ! -r /etc/pfi.conf ]; then
+ echo '' >/etc/pfi.conf
+ fi
+
+ # Append the contents of pfi.conf onto rc.conf, so that settings
+ # (such as ifconfig_dc0="DHCP") will be picked up by pfi_rc_actions.
+
+ cp /etc/rc.conf /etc/rc.conf.orig
+ cat /etc/pfi.conf >>/etc/rc.conf
+
+ # Read in the pfi.conf we either found or created for ourselves.
+
+ if [ -r /etc/defaults/pfi.conf ]; then
+ . /etc/defaults/pfi.conf
+ fi
+ . /etc/pfi.conf
+
+ # We can perform any pre-install tasks here by
+ # examining the contents of pfi_* variables.
+
+ # Interpret pfi_sshd_* options. These basically add settings
+ # to /etc/ssh/sshd_config; it is assumed "sshd" will appear
+ # in pfi_rc_actions to restart sshd.
+
+ case ${pfi_sshd_permit_root_login} in
+ YES)
+ echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
+ ;;
+ without-password)
+ echo "PermitRootLogin without-password" >> /etc/ssh/sshd_config
+ ;;
+ forced-commands-only)
+ echo "PermitRootLogin forced-commands-only" >> /etc/ssh/sshd_config
+ ;;
+ *)
+ ;;
+ esac
+
+ case ${pfi_sshd_permit_empty_passwords} in
+ YES)
+ echo "PermitEmptyPasswords yes" >> /etc/ssh/sshd_config
+ ;;
+ *)
+ ;;
+ esac
+
+ # Interpret pfi_set_root_password. If it is not empty, use
+ # it to set root's LiveCD password.
+
+ if [ "X$pfi_set_root_password" != "X" ]; then
+ echo "$pfi_set_root_password" | \
+ /usr/sbin/pw usermod root -h 0
+ fi
+
+ # The most important pre-install task is to restart
+ # any RCNG scripts listed in pfi_rc_actions with any new
+ # settings that might have been set up by pfi.conf.
+
+ if [ "X$pfi_rc_actions" != "X" ]; then
+ rev_actions=`reverse_list $pfi_rc_actions`
+
+ for _rc_elem in ${rev_actions}; do
+ echo "Stopping ${_rc_elem}..."
+ rcstop ${_rc_elem}
+ done
+ for _rc_elem in ${pfi_rc_actions}; do
+ echo "Starting ${_rc_elem}..."
+ rcstart ${_rc_elem}
+ done
+ fi
+
+ # Now restore the original pfi.conf.
+
+ mv /etc/rc.conf.orig /etc/rc.conf
+
+ # Set up auto-login if requested.
+
+ if [ "X$pfi_autologin" != "XNONE" ]; then
+ echo 'AL.pfi:\' >> /etc/gettytab
+ echo " :al=${pfi_autologin}:tc=Pc:" >> /etc/gettytab
+ sed -i '' 's|^ttyv0.*|ttyv0 "/usr/libexec/getty AL.pfi" cons25 on secure|' /etc/ttys
+ fi
+
+ # Finally, start thttpd if the user wants to use
+ # the cgi frontend.
+
+ if [ "X$pfi_frontend" = "Xcgi" ]; then
+ echo "Starting thttpd..."
+ /usr/local/sbin/thttpd_wrapper &
+ fi
+}
+
+load_rc_config $name
+run_rc_command "$1"
Index: contrib/bsdinstaller/root_skels/installer/usr/local/bin/installer
===================================================================
RCS file: contrib/bsdinstaller/root_skels/installer/usr/local/bin/installer
diff -N contrib/bsdinstaller/root_skels/installer/usr/local/bin/installer
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/root_skels/installer/usr/local/bin/installer 29 Jul 2006 18:02:50 -0000
@@ -0,0 +1,159 @@
+#!/bin/sh
+
+# installer - start installer frontend and backend as per pfi config.
+# $Id: installer,v 1.22 2006/07/29 18:02:50 cpressey Exp $
+# $DragonFly: src/nrelease/installer/usr/local/bin/installer,v 1.5 2004/07/11 19:36:03 dillon Exp $
+
+### SUBS ###
+
+background_backend()
+{
+ RENDEZVOUS=$1
+ TRANSPORT=$2
+ $pfi_backend \
+ ${pfi_rendezvous_option}$RENDEZVOUS \
+ ${pfi_transport_option}$TRANSPORT \
+ >/dev/null 2>/tmp/backend.err
+ RESULT=$?
+ case "$RESULT" in
+ 0)
+ ;;
+ 5)
+ $pfi_shutdown_command
+ ;;
+ *)
+ ;;
+ esac
+}
+
+installer_start()
+{
+ # Console start sequence:
+ # - Backend (and all other logging) goes to console (ttyv0)
+ # - curses frontend starts on ttyv1.
+ # - Uses vidcontrol -s 2 to switch to ttyv1 once the frontend is up.
+
+ echo -n "Starting installer. "
+
+ if [ -r /etc/defaults/pfi.conf ]; then
+ . /etc/defaults/pfi.conf
+ fi
+
+ if [ -r /etc/pfi.conf ]; then
+ echo "Reading /etc/pfi.conf ..."
+ . /etc/pfi.conf
+ else
+ echo "/etc/pfi.conf not found, starting interactive install."
+ fi
+
+ # We can set up any install variables and such
+ # here by examining pfi_* variables.
+
+ if [ "X$pfi_run" != "X" ]; then
+ pfi_frontend=none
+ $pfi_run
+ fi
+
+ case "X$pfi_dfui_transport" in
+ Xcaps)
+ sysctl kern.caps_enabled=1
+ RENDEZVOUS="installer"
+ ;;
+ Xnpipe)
+ RENDEZVOUS="installer"
+ ;;
+ Xtcp)
+ RENDEZVOUS="9999"
+ ;;
+ *)
+ echo "Unsupported DFUI transport '$pfi_dfui_transport'."
+ return
+ ;;
+ esac
+
+ if [ "X$SERIAL" = "XYES" ]; then
+ background_backend $RENDEZVOUS $pfi_dfui_transport &
+ sleep 1
+ ESCDELAY=$pfi_curses_escdelay \
+ /usr/local/sbin/dfuife_curses \
+ -r $RENDEZVOUS \
+ -t $pfi_dfui_transport \
+ -b /usr/local/share/dfuife_curses/fred.txt \
+ 2>/dev/null
+ pfi_frontend=none
+ fi
+
+ case "X$pfi_frontend" in
+ Xqt)
+ $pfi_backend -r $RENDEZVOUS -t $pfi_dfui_transport \
+ 2>/tmp/backend.err
+ RESULT=$?
+ ;;
+ Xcgi)
+ $pfi_backend -r $RENDEZVOUS -t $pfi_dfui_transport \
+ 2>/tmp/backend.err
+ RESULT=$?
+ ;;
+ Xcurses)
+ ps auwwwxxx > /tmp/ps.txt
+ if grep -q dfuife_curses /tmp/ps.txt; then
+ # Frontend is already running.
+ else
+ ESCDELAY=$pfi_curses_escdelay \
+ /usr/local/sbin/dfuife_curses \
+ -r $RENDEZVOUS \
+ -t $pfi_dfui_transport \
+ -b /usr/local/share/dfuife_curses/fred.txt \
+ 2>/dev/ttyv0 /dev/ttyv1 &
+ fi
+ rm -f /tmp/ps.txt
+ sleep 1
+ vidcontrol -s 2
+ $pfi_backend -r $RENDEZVOUS -t $pfi_dfui_transport \
+ 2>/tmp/backend.err
+ RESULT=$?
+ sleep 1
+ killall dfuife_curses
+ vidcontrol -s 1
+ ;;
+ Xnone)
+ RESULT=0
+ ;;
+ *)
+ echo "Unknown installer frontend '$pfi_frontend'."
+ return
+ ;;
+ esac
+
+ case "$RESULT" in
+ 0)
+ ;;
+ 5)
+ $pfi_shutdown_command
+ ;;
+ *)
+ ;;
+ esac
+}
+
+### MAIN ###
+
+if [ "X$1" = "Xserial" ]; then
+ SERIAL=YES
+fi
+
+TTY=`w | awk '{ print $2 }' | tail -n1`
+if [ "tty$TTY" = "ttyd0" ]; then
+ SERIAL=YES
+fi
+
+ps auwwwxxx > /tmp/ps.txt
+if grep -q dfuibe_installer /tmp/ps.txt; then
+ # Installer is already running. Log in normally.
+ rm -f /tmp/ps.txt
+else
+ rm -f /tmp/ps.txt
+ installer_start
+fi
+
+### END of installer ###
Index: contrib/bsdinstaller/root_skels/installer/usr/local/bin/xinstaller
===================================================================
RCS file: contrib/bsdinstaller/root_skels/installer/usr/local/bin/xinstaller
diff -N contrib/bsdinstaller/root_skels/installer/usr/local/bin/xinstaller
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/root_skels/installer/usr/local/bin/xinstaller 19 Apr 2005 00:26:43 -0000
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+# xinstaller - start X11 & force use of Qt f/e before main installer script
+# $Id: xinstaller,v 1.7 2005/04/19 00:26:43 cpressey Exp $
+
+echo 'pfi_frontend="qt"' >> /etc/defaults/pfi.conf
+rcrun forcestart moused
+if [ ! -r /etc/X11/xorg.conf ]; then
+ X -configure
+ sed -i '' 's/^.*HorizSync.*$/HorizSync 31.5 - 35.1/' /root/xorg.conf.new
+ sed -i '' 's/^.*VertRefresh.*$/VertRefresh 50.0 - 70.0/' /root/xorg.conf.new
+ mv /root/xorg.conf.new /etc/X11/xorg.conf
+fi
+
+# Create a .fonts.conf file which prevents fontconfig from wasting space by
+# caching fonts into root's (MFS-mounted) home directory:
+
+echo '' > /root/.fonts.conf
+echo '' >> /root/.fonts.conf
+echo '/dev/null' >> /root/.fonts.conf
+
+# Create an .xinitrc which starts up the backend (in a terminal window)
+# and the frontend.
+
+echo 'rxvt -geometry +0-0 -e /usr/local/bin/installer &' > /root/.xinitrc
+echo '/usr/local/sbin/dfuife_qt' >> /root/.xinitrc
+
+xinit
Index: contrib/bsdinstaller/root_skels/installer/usr/local/etc/dhcpd.conf
===================================================================
RCS file: contrib/bsdinstaller/root_skels/installer/usr/local/etc/dhcpd.conf
diff -N contrib/bsdinstaller/root_skels/installer/usr/local/etc/dhcpd.conf
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/root_skels/installer/usr/local/etc/dhcpd.conf 14 Oct 2004 17:46:44 -0000
@@ -0,0 +1,25 @@
+# /usr/local/etc/dhcpd.conf
+#
+ddns-update-style none;
+
+class "pxeboot-class" {
+ match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
+}
+
+class "etherboot-class" {
+ match if substring (option vendor-class-identifier, 0, 9) = "Etherboot";
+}
+
+subnet 10.1.0.0 netmask 255.255.0.0 {
+ pool {
+ allow members of "pxeboot-class";
+ allow members of "etherboot-class";
+ range 10.1.0.128 10.1.0.254;
+ option subnet-mask 255.255.255.0;
+ option broadcast-address 10.1.0.255;
+ filename "pxeboot";
+ option root-path "10.1.0.1:/cdrom";
+ next-server 10.1.0.1;
+ }
+}
+
Index: contrib/bsdinstaller/root_skels/installer/usr/local/etc/thttpd.conf
===================================================================
RCS file: contrib/bsdinstaller/root_skels/installer/usr/local/etc/thttpd.conf
diff -N contrib/bsdinstaller/root_skels/installer/usr/local/etc/thttpd.conf
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/root_skels/installer/usr/local/etc/thttpd.conf 9 Jan 2005 00:11:27 -0000
@@ -0,0 +1,8 @@
+# $DragonFly: src/nrelease/installer/usr/local/etc/thttpd.conf,v 1.1 2004/07/10 22:26:20 dillon Exp $
+# $Id: thttpd.conf,v 1.2 2005/01/09 00:11:27 cpressey Exp $
+#
+dir=/usr/local/www
+user=root
+cgipat=*.cgi
+logfile=/var/log/thttpd.log
+pidfile=/var/run/thttpd.pid
Index: contrib/bsdinstaller/scripts/build/build.conf.defaults
===================================================================
RCS file: contrib/bsdinstaller/scripts/build/build.conf.defaults
diff -N contrib/bsdinstaller/scripts/build/build.conf.defaults
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/scripts/build/build.conf.defaults 29 Aug 2005 18:21:24 -0000
@@ -0,0 +1,33 @@
+# $Id: build.conf.defaults,v 1.10 2005/08/29 18:21:24 cpressey Exp $
+
+# Defaults settings for the build scripts.
+# NOTE: There should be NO NEED to edit this file directly!
+# Instead, create a file build.conf with your own overrides.
+
+CVSDIR=${CVSDIR:-${HOME}/projects} # local cvs checkout dir
+CVSMODULE=${CVSMODULE:-installer} # cvs module name
+
+TMPDIR=${TMPDIR:-/tmp} # dir for temp files
+NRELEASEDIR=${NRELEASEDIR:-/usr/src/nrelease} # where 'nrelease' lives
+PORTSDIR=${PORTSDIR:-/usr/ports} # system ports dir
+DISTFILESDIR=${DISTFILESDIR:-${PORTSDIR}/distfiles} # distfiles dir
+PACKAGESDIR=${PACKAGESDIR:-${PORTSDIR}/packages/All} # pkgs dir
+ISOROOT=${ISOROOT:-/usr/release/root} # root of ISO-to-be tree
+PORTS_FLAGS=${PORTS_FLAGS:-} # additional flags/vars
+
+REMOVEOLDPKGS=${REMOVEOLDPKGS:-YES} # Remove old non-RELEASEBUILD
+REMOVEOLDDISTFILES=${REMOVEOLDDISTFILES:-YES} # pkgs/dstfls when making new
+RELEASEBUILD=${RELEASEBUILD:-NO} # NO = tack date on pkg vers
+ROOTSKEL=${ROOTSKEL:-${NRELEASEDIR}/installer} # default installer skeleton
+EXTRA_ROOTSKELS=${EXTRA_ROOTSKELS:-} # extra root skeletons
+
+INSTALL_DFUIFE_QT=${INSTALL_DFUIFE_QT:-NO} # build & install Qt frontend
+INSTALL_DFUIBE_LUA=${INSTALL_DFUIBE_LUA:-NO} # build & install Lua backend
+INSTALL_DFUIBE_INSTALLER=${INSTALL_DFUIBE_INSTALLER:-YES} # ditto C backend
+
+WITH_NLS=${WITH_NLS:-NO} # build pkgs with i18n
+WITH_X11=${WITH_X11:-NO} # build X11 support pkgs
+WITH_DEBUG_INFO=${WITH_DEBUG_INFO:-NO} # leave debug info in binaries
+WITH_DEBUG=${WITH_DEBUG:-NO} # build debug-enabled pkgs
+
+ONE_BIG_PKG=${ONE_BIG_PKG:-NO} # build & install one big pkg?
Index: contrib/bsdinstaller/scripts/build/build_installer_packages.sh
===================================================================
RCS file: contrib/bsdinstaller/scripts/build/build_installer_packages.sh
diff -N contrib/bsdinstaller/scripts/build/build_installer_packages.sh
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/scripts/build/build_installer_packages.sh 27 Aug 2005 04:01:26 -0000
@@ -0,0 +1,119 @@
+#!/bin/sh -x
+
+# $Id: build_installer_packages.sh,v 1.40 2005/08/27 04:01:26 cpressey Exp $
+# Build packages for BSD Installer components.
+# This script will "su root" to remove old packages from the system.
+# copy_ports_to_portsdir.sh should generally be run first.
+
+SCRIPT=`realpath $0`
+SCRIPTDIR=`dirname $SCRIPT`
+
+[ -r $SCRIPTDIR/build.conf ] && . $SCRIPTDIR/build.conf
+. $SCRIPTDIR/build.conf.defaults
+. $SCRIPTDIR/pver.conf
+
+PVERSUFFIX=""
+if [ "X$RELEASEBUILD" != "XYES" ]; then
+ PVERSUFFIX=.`date "+%Y.%m%d"`
+fi
+
+INSTALL_DFUIFE_QT=${INSTALL_DFUIFE_QT:-NO} # build & install Qt frontend
+INSTALL_DFUIBE_LUA=${INSTALL_DFUIBE_LUA:-NO} # build & install Lua backend
+INSTALL_DFUIBE_INSTALLER=${INSTALL_DFUIBE_INSTALLER:-YES} # ditto C backend
+
+WITH_NLS=${WITH_NLS:-NO} # build pkgs with i18n
+WITH_X11=${WITH_X11:-NO} # build X11 support pkgs
+
+WITH_CURSES_DEF="WITH_CURSES=YES"
+
+WITH_CGI_DEF="WITH_CGI=YES"
+
+WITH_QT_DEF=""
+if [ "X$INSTALL_DFUIFE_QT" = "XYES" ]; then
+ WITH_QT_DEF="WITH_QT=YES"
+fi
+
+WITH_LUA_BACKEND_DEF=""
+if [ "X$INSTALL_DFUIBE_LUA" = "XYES" ]; then
+ WITH_LUA_BACKEND_DEF="WITH_LUA_BACKEND=YES"
+fi
+
+WITH_C_BACKEND_DEF=""
+if [ "X$INSTALL_DFUIBE_INSTALLER" = "XYES" ]; then
+ WITH_C_BACKEND_DEF="WITH_C_BACKEND=YES"
+fi
+
+WITH_NLS_DEF=""
+if [ "X$WITH_NLS" = "XYES" ]; then
+ WITH_NLS_DEF="WITH_NLS=YES"
+fi
+
+WITH_DEBUG_DEF=""
+if [ "X$WITH_DEBUG" = "XYES" ]; then
+ WITH_DEBUG_DEF="EXTRA_CFLAGS='-g -DDEBUG'"
+fi
+
+WITH_DEBUG_INFO_DEF=""
+if [ "X$WITH_DEBUG_INFO" = "XYES" ]; then
+ WITH_DEBUG_DEF="EXTRA_CFLAGS='-g'"
+fi
+
+rebuild_port()
+{
+ cd $PORTSDIR/$1/$2/ && \
+ rm -rf work distinfo && \
+ make makesum && \
+ make patch && \
+ chmod -R 777 work && \
+ make $WITH_NLS_DEF $WITH_CURSES_DEF $WITH_CGI_DEF $WITH_QT_DEF \
+ $WITH_LUA_BACKEND_DEF $WITH_C_BACKEND_DEF $WITH_DEBUG_DEF \
+ $PORTS_FLAGS package && \
+ rm -rf work
+}
+
+su root -c \
+ "pkg_delete -f 'libaura-*'
+ pkg_delete -f 'libinstaller-*'
+ pkg_delete -f '*dfui*'
+ pkg_delete -f 'thttpd-notimeout-*'
+ pkg_delete -f 'lua50-*'
+ pkg_delete -f 'bsdinstaller-*'"
+
+if [ "X$REMOVEOLDPKGS" = "XYES" ]; then
+ rm -rf $PACKAGESDIR/libaura-*.????.????.t?z
+ rm -rf $PACKAGESDIR/libinstaller-*.????.????.t?z
+ rm -rf $PACKAGESDIR/*dfui*.????.????.t?z
+ rm -rf $PACKAGESDIR/lua50-*.????.????.t?z
+ rm -rf $PACKAGESDIR/bsdinstaller-*.????.????.t?z
+fi
+
+# Now, rebuild all the ports, making packages in the process.
+
+if [ "X$ONE_BIG_PKG" = "XYES" ]; then
+ rebuild_port sysutils bsdinstaller
+else
+ rebuild_port devel libaura && \
+ rebuild_port sysutils libdfui && \
+ if [ "X$INSTALL_DFUIBE_INSTALLER" = "XYES" ]; then
+ rebuild_port sysutils libinstaller && \
+ rebuild_port sysutils dfuibe_installer
+ fi && \
+ rebuild_port sysutils dfuife_curses && \
+ rebuild_port sysutils dfuife_cgi && \
+ rebuild_port www thttpd-notimeout && \
+ if [ "X$INSTALL_DFUIFE_QT" = "XYES" ]; then
+ rebuild_port sysutils dfuife_qt
+ fi && \
+ if [ "X$INSTALL_DFUIBE_LUA" = "XYES" ]; then
+ rebuild_port lang lua50 && \
+ rebuild_port devel lua50-compat51 && \
+ rebuild_port devel lua50-posix && \
+ rebuild_port devel lua50-pty && \
+ rebuild_port devel lua50-gettext && \
+ rebuild_port devel lua50-dfui && \
+ rebuild_port devel lua50-filename && \
+ rebuild_port devel lua50-app && \
+ rebuild_port net lua50-socket && \
+ rebuild_port sysutils dfuibe_lua
+ fi
+fi
Index: contrib/bsdinstaller/scripts/build/copy_ports_to_portsdir.sh
===================================================================
RCS file: contrib/bsdinstaller/scripts/build/copy_ports_to_portsdir.sh
diff -N contrib/bsdinstaller/scripts/build/copy_ports_to_portsdir.sh
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/scripts/build/copy_ports_to_portsdir.sh 25 Aug 2005 23:51:40 -0000
@@ -0,0 +1,34 @@
+#!/bin/sh -x
+
+# $Id: copy_ports_to_portsdir.sh,v 1.4 2005/08/25 23:51:40 cpressey Exp $
+# Copy the ports in our CVS tree to the system-wide ports directory.
+# This script generally requires root privledges.
+# create_installer_tarballs.sh should generally be run first.
+
+SCRIPT=`realpath $0`
+SCRIPTDIR=`dirname $SCRIPT`
+
+[ -r $SCRIPTDIR/build.conf ] && . $SCRIPTDIR/build.conf
+. $SCRIPTDIR/build.conf.defaults
+. $SCRIPTDIR/pver.conf
+
+PVERSUFFIX=""
+if [ "X$RELEASEBUILD" != "XYES" ]; then
+ PVERSUFFIX=.`date "+%Y.%m%d"`
+fi
+
+cd $CVSDIR/$CVSMODULE/ports && \
+rm -rf */*/work && \
+for CATEGORY in *; do
+ mkdir -p $PORTSDIR/$CATEGORY
+ for PORT in $CATEGORY/*; do
+ if [ "X$CATEGORY" != "XCVS" -a "X$PORT" != "X$CATEGORY/CVS" ]; then
+ rm -rf $PORTSDIR/$PORT
+ cp -Rp $PORT $PORTSDIR/$PORT
+ if grep -q '^INTERNAL[[:space:]]*=[[:space:]]*YES[[:space:]]*$' $PORT/Makefile; then
+ sed -i '' "s/PORTVERSION=[[:space:]]*\([^[:space:]]*\)[[:space:]]*$/PORTVERSION=\1${PVERSUFFIX}/" \
+ $PORTSDIR/$PORT/Makefile
+ fi
+ fi
+ done
+done
Index: contrib/bsdinstaller/scripts/build/create_installer_tarballs.sh
===================================================================
RCS file: contrib/bsdinstaller/scripts/build/create_installer_tarballs.sh
diff -N contrib/bsdinstaller/scripts/build/create_installer_tarballs.sh
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/scripts/build/create_installer_tarballs.sh 18 Aug 2005 04:11:33 -0000
@@ -0,0 +1,57 @@
+#!/bin/sh -x
+
+# $Id: create_installer_tarballs.sh,v 1.35 2005/08/18 04:11:33 cpressey Exp $
+# Create tarballs from the contents of the CVS repo.
+
+SCRIPT=`realpath $0`
+SCRIPTDIR=`dirname $SCRIPT`
+
+[ -r $SCRIPTDIR/build.conf ] && . $SCRIPTDIR/build.conf
+. $SCRIPTDIR/build.conf.defaults
+. $SCRIPTDIR/pver.conf
+
+PVERSUFFIX=""
+if [ "X$RELEASEBUILD" != "XYES" ]; then
+ PVERSUFFIX=.`date "+%Y.%m%d"`
+fi
+
+# Remove old distfiles.
+if [ "X$REMOVEOLDDISTFILES" = "XYES" ]; then
+ rm -rf $DISTFILESDIR/libaura-*.????.????.tar.gz
+ rm -rf $DISTFILESDIR/libinstaller-*.????.????.tar.gz
+ rm -rf $DISTFILESDIR/*dfui*.????.????.tar.gz
+ rm -rf $DISTFILESDIR/lua50-*.????.????.tar.gz
+ rm -rf $DISTFILESDIR/luaapp-*.????.????.tar.gz
+ rm -rf $DISTFILESDIR/luagettext-*.????.????.tar.gz
+ rm -rf $DISTFILESDIR/luafilename-*.????.????.tar.gz
+ rm -rf $DISTFILESDIR/luapty-*.????.????.tar.gz
+ rm -rf $DISTFILESDIR/bsdinstaller-*.????.????.tar.gz
+fi
+
+test -d $DISTFILESDIR || mkdir $DISTFILESDIR
+
+cd $CVSDIR/$CVSMODULE/src && \
+ make clean && \
+(find $CVSDIR/$CVSMODULE -name '*.core' -print0 | xargs -0 rm -f) && \
+(find $CVSDIR/$CVSMODULE -name '.#*' -print0 | xargs -0 rm -f) && \
+cd $CVSDIR/$CVSMODULE/ports && \
+ rm -rf `find . -name 'work' -print` && \
+cd $CVSDIR && \
+ tar zcvf $DISTFILESDIR/bsdinstaller-${INSTALLER_VER}${PVERSUFFIX}.tar.gz --exclude CVS installer && \
+cd $CVSDIR/$CVSMODULE/src/lib && \
+ tar zcvf $DISTFILESDIR/libaura-${LIBAURA_VER}${PVERSUFFIX}.tar.gz --exclude CVS libaura && \
+ tar zcvf $DISTFILESDIR/libdfui-${LIBDFUI_VER}${PVERSUFFIX}.tar.gz --exclude CVS libdfui && \
+ tar zcvf $DISTFILESDIR/libinstaller-${LIBINSTALLER_VER}${PVERSUFFIX}.tar.gz --exclude CVS libinstaller && \
+cd $CVSDIR/$CVSMODULE/src/lib/lua && \
+ tar zcvf $DISTFILESDIR/luapty-${LUA50_PTY_VER}${PVERSUFFIX}.tar.gz --exclude CVS pty && \
+ tar zcvf $DISTFILESDIR/luagettext-${LUA50_GETTEXT_VER}${PVERSUFFIX}.tar.gz --exclude CVS gettext && \
+ tar zcvf $DISTFILESDIR/luadfui-${LUA50_DFUI_VER}${PVERSUFFIX}.tar.gz --exclude CVS dfui && \
+ tar zcvf $DISTFILESDIR/luafilename-${LUA50_FILENAME_VER}${PVERSUFFIX}.tar.gz --exclude CVS filename && \
+ tar zcvf $DISTFILESDIR/luaapp-${LUA50_APP_VER}${PVERSUFFIX}.tar.gz --exclude CVS app && \
+cd $CVSDIR/$CVSMODULE/src/frontends && \
+ tar zcvf $DISTFILESDIR/dfuife_curses-${DFUIFE_CURSES_VER}${PVERSUFFIX}.tar.gz --exclude CVS ncurses && \
+ tar zcvf $DISTFILESDIR/dfuife_cgi-${DFUIFE_CGI_VER}${PVERSUFFIX}.tar.gz --exclude CVS cgi && \
+ tar zcvf $DISTFILESDIR/dfuife_qt-${DFUIFE_QT_VER}${PVERSUFFIX}.tar.gz --exclude CVS qt && \
+cd $CVSDIR/$CVSMODULE/src/backend && \
+ tar zcvf $DISTFILESDIR/dfuibe_installer-${DFUIBE_INSTALLER_VER}${PVERSUFFIX}.tar.gz --exclude CVS installer && \
+ tar zcvf $DISTFILESDIR/dfuibe_lua-${DFUIBE_LUA_VER}${PVERSUFFIX}.tar.gz --exclude CVS lua
Index: contrib/bsdinstaller/scripts/build/install_installer_packages.sh
===================================================================
RCS file: contrib/bsdinstaller/scripts/build/install_installer_packages.sh
diff -N contrib/bsdinstaller/scripts/build/install_installer_packages.sh
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/scripts/build/install_installer_packages.sh 29 Aug 2005 18:21:24 -0000
@@ -0,0 +1,107 @@
+#!/bin/sh -x
+
+# $Id: install_installer_packages.sh,v 1.43 2005/08/29 18:21:24 cpressey Exp $
+# Install packages for the installer into the ISO-to-be, using
+# DragonFly's src/nrelease/Makefile. This assumes a release (or
+# quickrel etc) has already been built; it simply (re)installs pkgs.
+# Note that this will "su root" for you at the right moment.
+
+SCRIPT=`realpath $0`
+SCRIPTDIR=`dirname $SCRIPT`
+
+[ -r $SCRIPTDIR/build.conf ] && . $SCRIPTDIR/build.conf
+. $SCRIPTDIR/build.conf.defaults
+. $SCRIPTDIR/pver.conf
+
+PVERSUFFIX=""
+if [ "X$RELEASEBUILD" != "XYES" ]; then
+ PVERSUFFIX=.`date "+%Y.%m%d"`
+fi
+
+# Build list of packages to install on ISO-to-be.
+
+if [ "X$ONE_BIG_PKG" = "XYES" ]; then
+ INSTALLER_PACKAGES="bsdinstaller-${INSTALLER_VER}${PVERSUFFIX}"
+else
+ INSTALLER_PACKAGES="libaura-${LIBAURA_VER}${PVERSUFFIX}
+ libdfui-${LIBDFUI_VER}${PVERSUFFIX}"
+
+ # dfuibe_installer might not be installed anymore (moving to Lua.)
+ if [ "X$INSTALL_DFUIBE_INSTALLER" = "XYES" ]; then
+ INSTALLER_PACKAGES="${INSTALLER_PACKAGES}
+ libinstaller-${LIBINSTALLER_VER}${PVERSUFFIX}
+ dfuibe_installer-${DFUIBE_INSTALLER_VER}${PVERSUFFIX}"
+ fi
+
+ INSTALLER_PACKAGES="${INSTALLER_PACKAGES}
+ dfuife_curses-${DFUIFE_CURSES_VER}${PVERSUFFIX}
+ dfuife_cgi-${DFUIFE_CGI_VER}${PVERSUFFIX}
+ thttpd-notimeout-${THTTPD_NOTIMEOUT_VER}"
+fi
+
+# dfuife_qt is not installed by default, since it requires X11.
+if [ "X$INSTALL_DFUIFE_QT" = "XYES" ]; then
+ INSTALLER_PACKAGES="$INSTALLER_PACKAGES
+ jpeg-${JPEG_VER}
+ lcms-${LCMS_VER}
+ libmng-${LIBMNG_VER}
+ qt-${QT_VER}
+ dfuife_qt-${DFUIFE_QT_VER}${PVERSUFFIX}"
+ WITH_X11="YES"
+fi
+
+if [ "X$WITH_X11" = "XYES" ]; then
+ # Call the seperate script to install the X11 packages
+ # if they are not already there on the ISO-to-be.
+ sh $SCRIPTDIR/install_x11_packages.sh
+fi
+
+if [ "X$WITH_NLS" = "XYES" ]; then
+ INSTALLER_PACKAGES="libiconv-${LIBICONV_VER}
+ gettext-${GETTEXT_VER}
+ $INSTALLER_PACKAGES"
+ if [ "X$WITH_X11" != "XYES" ]; then
+ INSTALLER_PACKAGES="expat-${EXPAT_VER}
+ $INSTALLER_PACKAGES"
+ fi
+fi
+
+if [ "X$ONE_BIG_PKG" != "XYES" ]; then
+ if [ "X$INSTALL_DFUIBE_LUA" = "XYES" ]; then
+ INSTALLER_PACKAGES="$INSTALLER_PACKAGES
+ lua50-${LUA50_VER}
+ lua50-compat51-${LUA50_COMPAT51_VER}
+ lua50-posix-${LUA50_POSIX_VER}
+ lua50-pty-${LUA50_PTY_VER}${PVERSUFFIX}
+ lua50-filename-${LUA50_FILENAME_VER}${PVERSUFFIX}
+ lua50-app-${LUA50_APP_VER}${PVERSUFFIX}
+ lua50-dfui-${LUA50_DFUI_VER}${PVERSUFFIX}
+ lua50-socket-${LUA50_SOCKET_VER}"
+ if [ "X$WITH_NLS" = "XYES" ]; then
+ INSTALLER_PACKAGES="$INSTALLER_PACKAGES
+ lua50-gettext-${LUA50_GETTEXT_VER}${PVERSUFFIX}"
+ fi
+ INSTALLER_PACKAGES="$INSTALLER_PACKAGES
+ dfuibe_lua-${DFUIBE_LUA_VER}${PVERSUFFIX}"
+ fi
+fi
+
+# Remove old versions of internal packages from the ISO-to-be.
+CLEAN_PACKAGES=""
+for PKG in $INSTALLER_PACKAGES; do
+ if echo $PKG | grep -q $PVERSUFFIX; then
+ ANYPKG=`echo "$PKG" | sed 's/\\-.*$/\\-\\*/'`
+ CLEAN_PACKAGES="$CLEAN_PACKAGES '$ANYPKG'"
+ fi
+done
+
+# remove extraneous spacery.
+CLEAN_PACKAGES=`echo $CLEAN_PACKAGES`
+INSTALLER_PACKAGES=`echo $INSTALLER_PACKAGES`
+EXTRA_ROOTSKELS=`echo $EXTRA_ROOTSKELS`
+
+cd $NRELEASEDIR && \
+su root -c \
+ "make pkgcleaniso EXTRA_PACKAGES=\"$CLEAN_PACKAGES\" && \
+ make pkgaddiso EXTRA_PACKAGES=\"$INSTALLER_PACKAGES\" && \
+ make customizeiso EXTRA_ROOTSKELS=\"$ROOTSKEL $EXTRA_ROOTSKELS\""
Index: contrib/bsdinstaller/scripts/build/install_x11_packages.sh
===================================================================
RCS file: contrib/bsdinstaller/scripts/build/install_x11_packages.sh
diff -N contrib/bsdinstaller/scripts/build/install_x11_packages.sh
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/scripts/build/install_x11_packages.sh 29 Aug 2005 18:21:24 -0000
@@ -0,0 +1,44 @@
+#!/bin/sh -x
+
+# $Id: install_x11_packages.sh,v 1.6 2005/08/29 18:21:24 cpressey Exp $
+# Install X11 (X.org) packages onto the ISO-to-be using DragonFly's
+# src/nrelease/Makefile. This assumes a release (or quickrel etc)
+# has already been built; it simply (re)installs packages.
+# This is seperate from the install_installer_packages script since
+# it takes a long time and only needs to be done once (per rel.)
+# Note that this generally requires root privledges.
+
+SCRIPT=`realpath $0`
+SCRIPTDIR=`dirname $SCRIPT`
+
+[ -r $SCRIPTDIR/build.conf ] && . $SCRIPTDIR/build.conf
+. $SCRIPTDIR/build.conf.defaults
+. $SCRIPTDIR/pver.conf
+
+cd $NRELEASEDIR && \
+make pkgaddiso EXTRA_PACKAGES="expat-${EXPAT_VER}
+ pkgconfig-${PKGCONFIG_VER}
+ freetype2-${FREETYPE2_VER}
+ fontconfig-${FONTCONFIG_VER}
+ bitstream-vera-${BITSTREAM_VERA_VER}
+ png-${PNG_VER}
+
+ xorg-libraries-${XORG_LIBRARIES_VER}
+ libXft-${LIBXFT_VER}
+ xorg-vfbserver-${XORG_VFBSERVER_VER}
+ xorg-server-${XORG_SERVER_VER}
+ xorg-printserver-${XORG_PRINTSERVER_VER}
+ xorg-fonts-encodings-${XORG_FONTS_ENCODINGS_VER}
+ xorg-fonts-miscbitmaps-${XORG_FONTS_MISCBITMAPS_VER}
+ xorg-fonts-cyrillic-${XORG_FONTS_CYRILLIC_VER}
+ xorg-fonts-75dpi-${XORG_FONTS_75DPI_VER}
+ xorg-fonts-100dpi-${XORG_FONTS_100DPI_VER}
+ xorg-fonts-type1-${XORG_FONTS_TYPE1_VER}
+ xorg-fonts-truetype-${XORG_FONTS_TRUETYPE_VER}
+ xorg-documents-${XORG_DOCUMENTS_VER}
+ xorg-nestserver-${XORG_NESTSERVER_VER}
+ xorg-fontserver-${XORG_FONTSERVER_VER}
+ xorg-clients-${XORG_CLIENTS_VER}
+ rxvt-${RXVT_VER}
+ dri-${DRI_VER}
+ xorg-${XORG_VER}"
Index: contrib/bsdinstaller/scripts/build/make_installer_image.sh
===================================================================
RCS file: contrib/bsdinstaller/scripts/build/make_installer_image.sh
diff -N contrib/bsdinstaller/scripts/build/make_installer_image.sh
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/scripts/build/make_installer_image.sh 27 Aug 2005 04:01:26 -0000
@@ -0,0 +1,27 @@
+#!/bin/sh -x
+
+# $Id: make_installer_image.sh,v 1.6 2005/08/27 04:01:26 cpressey Exp $
+# Trivial driver script for the other four scripts.
+# Generally requires root privledges.
+# Assumes a 'cd /usr/src/nrelease && make realquickrel'
+# (or equivalent) has recently been done.
+# Can be run multiple times thereafter.
+
+SCRIPT=`realpath $0`
+SCRIPTDIR=`dirname $SCRIPT`
+
+[ -r $SCRIPTDIR/build.conf ] && . $SCRIPTDIR/build.conf
+. $SCRIPTDIR/build.conf.defaults
+
+# For the following to work, the directories in which the
+# ports, distfiles, and packages are placed must be writable by
+# the user running the script. This is generally not the case
+# for /usr/ports. There are two general options:
+# - run as root (NOT RECOMMENDED unless maybe you're in a jail)
+# - chown -R user /usr/ports
+# The last step needs to be root anyway, but will "su root" for you.
+
+$SCRIPTDIR/create_installer_tarballs.sh && \
+$SCRIPTDIR/copy_ports_to_portsdir.sh && \
+$SCRIPTDIR/build_installer_packages.sh && \
+$SCRIPTDIR/install_installer_packages.sh
Index: contrib/bsdinstaller/scripts/build/pver.conf
===================================================================
RCS file: contrib/bsdinstaller/scripts/build/pver.conf
diff -N contrib/bsdinstaller/scripts/build/pver.conf
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/scripts/build/pver.conf 22 Dec 2005 20:15:51 -0000
@@ -0,0 +1,82 @@
+# $Id: pver.conf,v 1.30 2005/12/22 20:15:51 cpressey Exp $
+# Current package versions configuration file, shared by all build scripts.
+
+# Version of the project as a whole
+# (used for the source tarball of the entire repo only:)
+
+INSTALLER_VER=2.0
+
+# Versions of all the individual installer packages:
+
+LIBAURA_VER=3.1
+LIBDFUI_VER=4.1
+LIBINSTALLER_VER=5.1
+DFUIFE_CURSES_VER=1.5.1
+DFUIFE_CGI_VER=1.4.1
+DFUIFE_QT_VER=1.2.1
+DFUIBE_INSTALLER_VER=1.1.7
+DFUIBE_LUA_VER=1.0
+
+# Versions of support packages:
+
+#------ Lua backend support packages ------#
+
+LUA50_VER=5.0.2
+LUA50_COMPAT51_VER=5.1.r2
+LUA50_PTY_VER=0.1
+LUA50_GETTEXT_VER=0.1
+LUA50_DFUI_VER=0.1
+LUA50_APP_VER=0.1
+LUA50_FILENAME_VER=0.1
+LUA50_SOCKET_VER=2.0.b3
+LUA50_POSIX_VER=2005.0327
+
+#------ CGI frontend support packages ------#
+
+THTTPD_NOTIMEOUT_VER=2.24
+
+#------ NLS support packages ------#
+
+LIBICONV_VER=1.9.2_1
+EXPAT_VER=1.95.8_3 # NB: this is also a requirement for X.org and Qt
+GETTEXT_VER=0.14.5
+
+#------ X.org common packages ------#
+
+PKGCONFIG_VER=0.15.0_1
+FREETYPE2_VER=2.1.9
+FONTCONFIG_VER=2.2.3,1
+PNG_VER=1.2.8_1
+BITSTREAM_VERA_VER=1.10_1
+LIBXFT_VER=2.1.6_1
+
+#------ X.org specific packages ------#
+
+XORG_LIBRARIES_VER=6.8.1
+XORG_VFBSERVER_VER=6.8.1
+XORG_SERVER_VER=6.8.1
+XORG_PRINTSERVER_VER=6.8.1
+XORG_FONTS_ENCODINGS_VER=6.8.1
+XORG_FONTS_MISCBITMAPS_VER=6.8.1
+XORG_FONTS_CYRILLIC_VER=6.8.1
+XORG_FONTS_75DPI_VER=6.8.1
+XORG_FONTS_100DPI_VER=6.8.1
+XORG_FONTS_TYPE1_VER=6.8.1
+XORG_FONTS_TRUETYPE_VER=6.8.1
+XORG_DOCUMENTS_VER=6.8.1
+XORG_NESTSERVER_VER=6.8.1
+XORG_FONTSERVER_VER=6.8.1
+XORG_CLIENTS_VER=6.8.1
+DRI_VER=6.2_1,2
+
+XORG_VER=6.8.2
+
+#------ Qt frontend support packages ------#
+
+RXVT_VER=2.6.4_1
+
+JPEG_VER=6b_3
+LCMS_VER=1.14,1
+LIBMNG_VER=1.0.8
+
+QT_VER=3.3.4
Index: contrib/bsdinstaller/scripts/build/remove_installer_packages.sh
===================================================================
RCS file: contrib/bsdinstaller/scripts/build/remove_installer_packages.sh
diff -N contrib/bsdinstaller/scripts/build/remove_installer_packages.sh
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/scripts/build/remove_installer_packages.sh 30 Jul 2005 07:07:06 -0000
@@ -0,0 +1,31 @@
+#!/bin/sh -x
+
+# $Id: remove_installer_packages.sh,v 1.4 2005/07/30 07:07:06 cpressey Exp $
+# Remove all BSD Installer packages from the running system.
+# Note that this generally requires root privledges.
+
+SCRIPT=`realpath $0`
+SCRIPTDIR=`dirname $SCRIPT`
+
+[ -r $SCRIPTDIR/build.conf ] && . $SCRIPTDIR/build.conf
+. $SCRIPTDIR/build.conf.defaults
+. $SCRIPTDIR/pver.conf
+
+PVERSUFFIX=""
+if [ "X$RELEASEBUILD" != "XYES" ]; then
+ PVERSUFFIX=.`date "+%Y.%m%d"`
+fi
+
+INSTALLER_PACKAGES='libaura-*
+ libdfui-*
+ libinstaller-*
+ dfuibe_*
+ dfuife_*
+ thttpd-notimeout-*
+ lua50-*
+ bsdinstaller-*'
+
+for PKG in $INSTALLER_PACKAGES; do
+ pkg_delete -f $PKG || true
+done
+
Index: contrib/bsdinstaller/scripts/report/gen_rel_notes.lua
===================================================================
RCS file: contrib/bsdinstaller/scripts/report/gen_rel_notes.lua
diff -N contrib/bsdinstaller/scripts/report/gen_rel_notes.lua
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/scripts/report/gen_rel_notes.lua 3 Mar 2005 20:29:03 -0000
@@ -0,0 +1,56 @@
+-- $Id: gen_rel_notes.lua,v 1.1 2005/03/03 20:29:03 cpressey Exp $
+-- Lua script to generate release notes.
+-- Usage: lua gen_rel_notes.lua prev_release_tag this_release_tag
+-- e.g.: lua gen_rel_notes.lua RELENG_1_1_4 RELENG_1_1_5
+
+local cvsdir = "/home/catseye/projects/installer"
+local tmpdir = "/tmp"
+local tmpfn = tmpdir .. "/gen_rel_notes.txt"
+local old_tag, new_tag = arg[1], arg[2]
+local cmd = "cd " .. cvsdir .. " && cvs log -r" .. old_tag .. ":" .. new_tag ..
+ " >" .. tmpfn .. " 2>&1"
+os.execute(cmd)
+local file = io.open(tmpfn)
+
+local line
+local lines, logs
+
+logs = {}
+while true do
+ lines = {}
+ line = file:read("*l")
+ if not line then break end
+ while not string.find(line, "^===================") do
+ line = file:read("*l")
+ if not line then break end
+ table.insert(lines, line)
+ end
+ if not line then break end
+ table.insert(logs, lines)
+end
+file:close()
+
+for logno, logtab in logs do
+ local found, len, cap
+ local old_rev, new_rev
+ if string.find(logtab[1], "^cvs log: warning: no revision") then
+ logs[logno] = nil
+ else
+ for k, v in logtab do
+ found, len, cap = string.find(logtab[k], "^\t" .. old_tag .. ": (.+)$")
+ if found then old_rev = cap end
+ found, len, cap = string.find(logtab[k], "^\t" .. new_tag .. ": (.+)$")
+ if found then new_rev = cap end
+ end
+ if new_rev == old_rev then
+ logs[logno] = nil
+ end
+ end
+end
+
+for logno, logtab in logs do
+ for k, v in logtab do
+ print(logno, v)
+ end
+ print("")
+end
Index: contrib/bsdinstaller/src/Config
===================================================================
RCS file: contrib/bsdinstaller/src/Config
diff -N contrib/bsdinstaller/src/Config
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/src/Config 14 Jul 2007 11:12:01 -0000
@@ -0,0 +1,87 @@
+#
+# Global configuration file for BSD Installer Makefiles.
+# $Id: Config,v 1.7 2005/08/29 20:49:36 cpressey Exp $
+#
+
+# This file should be included by all other Makefiles in the following way:
+# BASE?= ../..
+# include ${BASE}/Config
+
+#
+# Locations/names of build tools.
+#
+CC?=cc
+AR?=ar
+RANLIB?=ranlib
+STRIP?=strip
+RM?=rm
+LN?=ln
+INSTALL_PROG?= install -m 555
+INSTALL_LIB?= install -m 444
+INSTALL_DATA?= install -m 644
+
+PREFIX?= /installer
+BINDIR?= ${PREFIX}/bin
+LIBDIR?= ${PREFIX}/lib
+SHAREDIR?= ${PREFIX}/share
+LUALIBDIR?= ${LIBDIR}/lua
+LUASHAREDIR?= ${SHAREDIR}/lua
+
+#
+# Standard warning flags.
+#
+WARNS= -W -Wstrict-prototypes -Wmissing-prototypes \
+ -Wpointer-arith -Wno-uninitialized -Wreturn-type -Wcast-qual \
+ -Wswitch -Wshadow -Wcast-align -Wchar-subscripts \
+ -Winline -Wnested-externs -Wredundant-decls
+
+#
+# For shared libraries
+#
+ANAME= lib${LIB}.a
+SONAME= lib${LIB}.so.${LIB_VER}
+SOLINK= lib${LIB}.so
+#DLLIB= -ldl # for Lua, uncomment on systems that need it
+
+LUA?= ${BASE}/platform/lua/src
+CFLAGS+= -I${LUA}
+LDFLAGS+=-L${LUA}
+
+#
+# Determine what components to build.
+# Note that these should either be 'true' or 'false'.
+#
+SKIP_C_BACKEND?=true
+SKIP_LUA_BACKEND?=false
+
+SKIP_NCURSES_FRONTEND?=false
+SKIP_CGI_FRONTEND?=false
+SKIP_QT_FRONTEND?=true
+
+#
+# For 'make distribution'
+#
+DESTDIR?=/tmp/bsdinstaller/
+
+#
+# NLS settings. If not using NLS, you can comment out the following lines.
+#
+LOCALEDIR?= ${SHAREDIR}/locale
+NLS_CFLAGS?= -DLOCALEDIR=\"${LOCALEDIR}\" -DPACKAGE=\"${PACKAGE}\" -DENABLE_NLS
+
+#
+# If your system's NLS is built-in, you might not need these.
+#
+NLS_CFLAGS+= -I/usr/local/include -I/usr/pkg/include
+NLS_LDFLAGS?= -L/usr/local/lib -L/usr/pkg/lib -lintl
+
+#
+# For systems that don't support strlcpy:
+#
+#CFLAGS+=-Dstrlcpy=strncpy
+
+#
+# For systems that don't define (or even support) __unused:
+#
+#CFLAGS+=-D__unused="__attribute__((__unused__))"
+#CFLAGS+=-D__unused=''
Index: contrib/bsdinstaller/src/Config.orig
===================================================================
RCS file: contrib/bsdinstaller/src/Config.orig
diff -N contrib/bsdinstaller/src/Config.orig
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/src/Config.orig 29 Aug 2005 20:49:36 -0000
@@ -0,0 +1,80 @@
+#
+# Global configuration file for BSD Installer Makefiles.
+# $Id: Config,v 1.7 2005/08/29 20:49:36 cpressey Exp $
+#
+
+# This file should be included by all other Makefiles in the following way:
+# BASE?= ../..
+# include ${BASE}/Config
+
+#
+# First, load in Lua configuration. This file can override any settings
+# in that file; see the comments in that file for settings that you might
+# want to tweak in here.
+#
+include ${BASE}/platform/lua/config
+
+#
+# Locations/names of build tools.
+#
+CC?=cc
+AR?=ar
+RANLIB?=ranlib
+STRIP?=strip
+RM?=rm
+LN?=ln
+
+#
+# Standard warning flags.
+#
+WARNS= -W -Wstrict-prototypes -Wmissing-prototypes \
+ -Wpointer-arith -Wno-uninitialized -Wreturn-type -Wcast-qual \
+ -Wswitch -Wshadow -Wcast-align -Wchar-subscripts \
+ -Winline -Wnested-externs -Wredundant-decls
+
+#
+# For shared libraries
+#
+ANAME= lib${LIB}.a
+SONAME= lib${LIB}.so.${LIB_VER}
+SOLINK= lib${LIB}.so
+#DLLIB= -ldl # for Lua, uncomment on systems that need it
+
+#
+# Determine what components to build.
+# Note that these should either be 'true' or 'false'.
+#
+SKIP_C_BACKEND?=true
+SKIP_LUA_BACKEND?=false
+
+SKIP_NCURSES_FRONTEND?=false
+SKIP_CGI_FRONTEND?=false
+SKIP_QT_FRONTEND?=true
+
+#
+# For 'make distribution'
+#
+DESTDIR?=/tmp/bsdinstaller/
+
+#
+# NLS settings. If not using NLS, you can comment out the following lines.
+#
+LOCALEDIR?= /usr/local/share/locale
+NLS_CFLAGS?= -DLOCALEDIR=\"${LOCALEDIR}\" -DPACKAGE=\"${PACKAGE}\" -DENABLE_NLS
+
+#
+# If your system's NLS is built-in, you might not need these.
+#
+NLS_CFLAGS+= -I/usr/local/include -I/usr/pkg/include
+NLS_LDFLAGS?= -L/usr/local/lib -L/usr/pkg/lib -lintl
+
+#
+# For systems that don't support strlcpy:
+#
+#CFLAGS+=-Dstrlcpy=strncpy
+
+#
+# For systems that don't define (or even support) __unused:
+#
+#CFLAGS+=-D__unused="__attribute__((__unused__))"
+#CFLAGS+=-D__unused=''
Index: contrib/bsdinstaller/src/Makefile
===================================================================
RCS file: contrib/bsdinstaller/src/Makefile
diff -N contrib/bsdinstaller/src/Makefile
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/src/Makefile 14 Jul 2007 11:12:01 -0000
@@ -0,0 +1,34 @@
+# Make everything.
+# $Id: Makefile,v 1.11 2005/08/29 20:41:52 cpressey Exp $
+
+BASE=.
+include $(BASE)/Config
+
+# Order matters here.
+
+all:
+ (cd platform && ${MAKE} all) && \
+ (cd lib && ${MAKE} all) && \
+ (cd backend && ${MAKE} all) && \
+ cd frontends && ${MAKE} all
+
+nls:
+ (cd platform && ${MAKE} all) && \
+ (cd lib && ${MAKE} nls) && \
+ (cd backend && ${MAKE} nls) && \
+ cd frontends && ${MAKE} nls
+
+clean:
+ (cd platform && ${MAKE} clean) && \
+ (cd lib && ${MAKE} clean) && \
+ (cd backend && ${MAKE} clean) && \
+ cd frontends && ${MAKE} clean
+
+distribution: destdirs
+ (cd platform && ${MAKE} distribution) && \
+ (cd lib && ${MAKE} distribution) && \
+ (cd backend && ${MAKE} distribution) && \
+ cd frontends && ${MAKE} distribution
+
+destdirs:
+ mkdir -p ${DESTDIR}${LIBDIR} ${DESTDIR}${BINDIR} ${DESTDIR}${SHAREDIR}
Index: contrib/bsdinstaller/src/Makefile.orig
===================================================================
RCS file: contrib/bsdinstaller/src/Makefile.orig
diff -N contrib/bsdinstaller/src/Makefile.orig
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/src/Makefile.orig 29 Aug 2005 20:41:52 -0000
@@ -0,0 +1,31 @@
+# Make everything.
+# $Id: Makefile,v 1.11 2005/08/29 20:41:52 cpressey Exp $
+
+BASE=.
+include $(BASE)/Config
+
+# Order matters here.
+
+all:
+ (cd platform && ${MAKE} all) && \
+ (cd lib && ${MAKE} all) && \
+ (cd backend && ${MAKE} all) && \
+ cd frontends && ${MAKE} all
+
+nls:
+ (cd platform && ${MAKE} all) && \
+ (cd lib && ${MAKE} nls) && \
+ (cd backend && ${MAKE} nls) && \
+ cd frontends && ${MAKE} nls
+
+clean:
+ (cd platform && ${MAKE} clean) && \
+ (cd lib && ${MAKE} clean) && \
+ (cd backend && ${MAKE} clean) && \
+ cd frontends && ${MAKE} clean
+
+distribution:
+ (cd platform && ${MAKE} distribution) && \
+ (cd lib && ${MAKE} distribution) && \
+ (cd backend && ${MAKE} distribution) && \
+ cd frontends && ${MAKE} distribution
Index: contrib/bsdinstaller/src/backend/Makefile
===================================================================
RCS file: contrib/bsdinstaller/src/backend/Makefile
diff -N contrib/bsdinstaller/src/backend/Makefile
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/src/backend/Makefile 29 Aug 2005 20:41:52 -0000
@@ -0,0 +1,24 @@
+# Build all backends.
+# $Id: Makefile,v 1.14 2005/08/29 20:41:52 cpressey Exp $
+
+BASE=..
+include $(BASE)/Config
+
+all:
+ (cd lua && ${SKIP_LUA_BACKEND} || ${MAKE} all) && \
+ (cd installer && ${SKIP_C_BACKEND} || ${MAKE} all) && \
+ cd test && ${MAKE} all
+
+nls:
+ (cd lua && ${SKIP_LUA_BACKEND} || ${MAKE} nls) && \
+ (cd installer && ${SKIP_C_BACKEND} || ${MAKE} nls) && \
+ cd test && ${MAKE} nls
+
+clean:
+ (cd lua && ${SKIP_LUA_BACKEND} || ${MAKE} clean) && \
+ (cd installer && ${SKIP_C_BACKEND} || ${MAKE} clean) && \
+ cd test && ${MAKE} clean
+
+distribution:
+ (cd lua && ${SKIP_LUA_BACKEND} || ${MAKE} distribution) && \
+ (cd installer && ${SKIP_C_BACKEND} || ${MAKE} distribution)
Index: contrib/bsdinstaller/src/backend/installer/Makefile
===================================================================
RCS file: contrib/bsdinstaller/src/backend/installer/Makefile
diff -N contrib/bsdinstaller/src/backend/installer/Makefile
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/src/backend/installer/Makefile 29 Aug 2005 19:19:13 -0000
@@ -0,0 +1,83 @@
+# Makefile for dfuibe_installer.
+# $Id: Makefile,v 1.38 2005/08/29 19:19:13 cpressey Exp $
+
+BASE?=../..
+include ${BASE}/Config
+
+PACKAGE=dfuibe_installer
+
+PROG= dfuibe_installer
+OBJS= fn_disk.o fn_configure.o fn_diagnostic.o fn_subpart.o fn_install.o \
+ flow.o main.o
+
+MEDIAROOT?=/usr/release/root/
+
+CFLAGS+= ${WARNS}
+CFLAGS+= -I../../lib/libaura -I../../lib/libdfui -I../../lib/libinstaller
+CFLAGS+= ${NLS_CFLAGS}
+CFLAGS+= ${EXTRA_CFLAGS}
+
+LDFLAGS+= -L../../lib/libaura -L../../lib/libdfui -L../../lib/libinstaller
+LDFLAGS+= -laura -ldfui -linstaller
+LDFLAGS+= ${NLS_LDFLAGS}
+
+LANGUAGES= ru
+
+# Default target:
+
+all: ${PROG}
+
+# Main target:
+
+${PROG}: ${OBJS}
+ ${CC} ${OBJS} ${LDFLAGS} -o ${PROG}
+
+# NLS (translated text) compilations:
+
+nls: all mo
+
+mo:
+ for _language in ${LANGUAGES}; do \
+ msgfmt -o po/$${_language}.mo po/$${_language}; \
+ done
+
+# Translator templates:
+
+pot:
+ xgettext -s --no-location --keyword=_ -o po/${PROG}.pot *.c
+
+# Creating stripped-down version:
+
+strip: ${PROG}
+ ${STRIP} ${PROG}
+
+# Cleaning up after ourselves:
+
+clean:
+ rm -rf ${PROG} *.o po/*.mo *.core
+
+# Testing from within the CVS checkout.
+# (This is a little gory because the location of the configuration
+# files is hardcoded in libinstaller.)
+
+test:
+ su root -c "\
+ mkdir -p ${MEDIAROOT}/usr/local/share/dfuibe_installer/ && \
+ cp conf/*.conf ${MEDIAROOT}/usr/local/share/dfuibe_installer/ && \
+ env LD_LIBRARY_PATH='../../lib/libaura:../../lib/libdfui:../../lib/libinstaller' \
+ ./${PROG} -o ${MEDIAROOT}"
+
+# Create directory layout for binary distribution.
+
+distribution: all
+ mkdir -p ${DESTDIR}/sbin
+ cp dfuibe_installer ${DESTDIR}/sbin/
+ mkdir -p ${DESTDIR}/share/dfuibe_installer
+ cp conf/cmdnames.conf ${DESTDIR}/share/dfuibe_installer
+
+distribution_nls: nls
+ for _language in ${LANGUAGES}; do \
+ mkdir -p ${DESTDIR}/share/locale/$${_language}/LC_MESSAGES; \
+ cp po/$${_language}.mo \
+ ${LOCALEDIR}/$${_language}/LC_MESSAGES/${PROG}.mo; \
+ done
Index: contrib/bsdinstaller/src/backend/installer/flow.c
===================================================================
RCS file: contrib/bsdinstaller/src/backend/installer/flow.c
diff -N contrib/bsdinstaller/src/backend/installer/flow.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/src/backend/installer/flow.c 1 Sep 2005 19:22:15 -0000
@@ -0,0 +1,1516 @@
+/*
+ * Copyright (c)2004 The DragonFly Project. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the DragonFly Project nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * flow.c
+ * Workflow logic for installer.
+ * $Id: flow.c,v 1.70 2005/09/01 19:22:15 cpressey Exp $
+ */
+
+#include
+#include
+#include
+#include
+
+#ifdef ENABLE_NLS
+#include
+#include
+#ifdef SYSTEM_DFUI
+#include
+#else
+#include "lang.h"
+#endif
+#define _(String) gettext (String)
+extern int _nl_msg_cat_cntr;
+#else
+#define _(String) (String)
+#endif
+
+#ifdef SYSTEM_AURA
+#include
+#include
+#include
+#else
+#include "mem.h"
+#include "dict.h"
+#include "fspred.h"
+#endif
+
+#ifdef SYSTEM_DFUI
+#include
+#ifdef DEBUG
+#include
+#endif
+#include
+#else
+#include "dfui.h"
+#ifdef DEBUG
+#include "dump.h"
+#endif
+#include "system.h"
+#endif
+
+#ifdef SYSTEM_LIBINSTALLER
+#include
+#include
+#include
+#include
+#include
+#include
+#else
+#include "commands.h"
+#include "confed.h"
+#include "diskutil.h"
+#include "functions.h"
+#include "package.h"
+#include "uiutil.h"
+#endif
+
+
+#include "flow.h"
+#include "fn.h"
+#include "pathnames.h"
+
+/*** GLOBALS ***/
+
+void (*state)(struct i_fn_args *) = NULL;
+int do_reboot;
+
+/*** STATES ***/
+
+/*
+ * The installer works like a big state machine. Each major form is
+ * a state. When the user has filled out the form satisfactorily,
+ * and selects "OK", there is a transition to the next state, in a
+ * mostly-linear order towards the final, "successfully installed"
+ * state. The user may also "Cancel", which generally causes a
+ * transition to the previous state (but may also take them back to
+ * the very first state in some cases.)
+ *
+ * Installer States:
+ * - Select localization optional
+ * - Welcome to DragonFly required
+ * - Begin Installation required
+ * - Select Disk required
+ * - Format Disk optional dd, fdisk
+ * - Select Partition required dd, disklabel
+ * - Create Subpartitions required disklabel, newfs
+ * - Install DragonFly required swapon, mkdir, mount, cpdup
+ * - Install Bootstrap optional boot0cfg
+ * - Reboot optional reboot
+ */
+
+#ifdef ENABLE_NLS
+void
+state_lang_menu(struct i_fn_args *a)
+{
+ struct dfui_form *f;
+ struct dfui_response *r;
+ int done = 0;
+ char *id;
+ int cancelled = 0;
+
+ while (!done) {
+ f = dfui_form_create(
+ "main_menu",
+ _("Select Language"),
+ _("Please select the language you wish you use."),
+ "",
+
+ "p", "role", "menu",
+
+ "a", "default", "default",
+ "Do not choose any language", "",
+ "a", "ru", "Russian",
+ "Russian KOI8-R", "",
+ NULL
+ );
+
+ if (!dfui_be_present(a->c, f, &r))
+ abort_backend();
+
+ id = aura_strdup(dfui_response_get_action_id(r));
+
+ if (strcmp(id, "default") == 0) {
+ state = state_welcome;
+ return;
+ } else {
+ state = state_welcome;
+ done = 1;
+ }
+
+ dfui_form_free(f);
+ dfui_response_free(r);
+ }
+
+ /* set keymap, scrnmap, fonts */
+ if (!set_lang_syscons(id))
+ return;
+
+ /* set envars */
+ if (!set_lang_envars(id))
+ return;
+
+ dfui_be_set_global_setting(a->c, "lang", id, &cancelled);
+
+ /* XXX if (!cancelled) ... ? */
+
+ /* let gettext know about changes */
+ ++_nl_msg_cat_cntr;
+}
+#endif
+
+/*
+ * state_welcome_livecd: the start state of the installer state machine,
+ * when run from the Live CD. Briefly describe DragonFly to the user,
+ * and present them with a set of reasonable options of how to proceed.
+ */
+void
+state_welcome(struct i_fn_args *a)
+{
+ struct dfui_form *f;
+ struct dfui_action *k;
+ struct dfui_response *r;
+ char msg_buf[2][1024];
+
+ snprintf(msg_buf[0], sizeof(msg_buf[0]),
+ _("Welcome to %s"), OPERATING_SYSTEM_NAME);
+
+ snprintf(msg_buf[1], sizeof(msg_buf[1]),
+ _("Welcome to the %s Live CD."
+ "\n\n"
+ "%s is an efficient and elegant BSD "
+ "Unix-derived operating system. For more information, see %s"
+ "\n\n"
+ "From this CD, you can boot into %s ``live'' "
+ "(without installing it) to evaluate it, to install it "
+ "manually, or to troubleshoot problems with an "
+ "existing installation, using either a command prompt "
+ "or menu-driven utilities."
+ "\n\n"
+ "Also, you can use this automated application to assist "
+ "you in installing %s on this computer and "
+ "configuring it once it is installed."
+ ""),
+ OPERATING_SYSTEM_NAME, OPERATING_SYSTEM_NAME, OPERATING_SYSTEM_URL,
+ OPERATING_SYSTEM_NAME, OPERATING_SYSTEM_NAME);
+
+ if (!a->booted_from_livecd) {
+ state = state_welcome_system;
+ return;
+ }
+
+ f = dfui_form_create(
+ "welcome",
+ msg_buf[0],
+
+ msg_buf[1],
+
+ "",
+
+ "p", "special", "dfinstaller_welcome",
+
+ NULL
+ );
+
+ if (a->upgrade_menu_toggle) {
+ snprintf(msg_buf[0], sizeof(msg_buf[0]),
+ _("Upgrade a FreeBSD 4.X system to %s"),
+ OPERATING_SYSTEM_NAME);
+ dfui_form_action_add(f, "upgrade",
+ dfui_info_new(_("Upgrade"),
+ msg_buf[0], ""));
+ } else {
+ snprintf(msg_buf[0], sizeof(msg_buf[0]),
+ _("Install %s"), OPERATING_SYSTEM_NAME);
+ snprintf(msg_buf[1], sizeof(msg_buf[1]),
+ _("Install %s on a HDD or HDD partition on this computer"),
+ OPERATING_SYSTEM_NAME);
+ dfui_form_action_add(f, "install",
+ dfui_info_new(msg_buf[0],
+ msg_buf[1], ""));
+ }
+
+ snprintf(msg_buf[0], sizeof(msg_buf[0]),
+ _("Configure a %s system once it has been installed on HDD"),
+ OPERATING_SYSTEM_NAME);
+ dfui_form_action_add(f, "configure",
+ dfui_info_new(_("Configure an Installed System"),
+ msg_buf[0], ""));
+
+ dfui_form_action_add(f, "utilities",
+ dfui_info_new(_("Live CD Utilities"),
+ _("Utilities to work with disks, diagnostics, and the LiveCD Environment"), ""));
+
+ k = dfui_form_action_add(f, "exit",
+ dfui_info_new(_("Exit to Live CD"),
+ _("Exit this program to a login prompt with access to the LiveCD"), ""));
+
+ dfui_form_action_add(f, "reboot",
+ dfui_info_new(_("Reboot this Computer"),
+ _("Reboot this computer (e.g. to boot into a newly installed system)"), ""));
+
+ dfui_form_action_add(f, "configure_netboot",
+ dfui_info_new(_("Setup NetBoot Install Services"),
+ _("Setup machine as remote installation server"), ""));
+
+ if (!dfui_be_present(a->c, f, &r))
+ abort_backend();
+
+ if (strcmp(dfui_response_get_action_id(r), "install") == 0) {
+ state = state_begin_install;
+ } else if (strcmp(dfui_response_get_action_id(r), "upgrade") == 0) {
+ state = state_begin_upgrade;
+ } else if (strcmp(dfui_response_get_action_id(r), "configure") == 0) {
+ storage_set_selected_disk(a->s, NULL);
+ storage_set_selected_slice(a->s, NULL);
+ state = state_configure_menu;
+ } else if (strcmp(dfui_response_get_action_id(r), "utilities") == 0) {
+ state = state_utilities_menu;
+ } else if (strcmp(dfui_response_get_action_id(r), "exit") == 0) {
+ state = NULL;
+ } else if (strcmp(dfui_response_get_action_id(r), "configure_netboot") == 0) {
+ state = state_setup_remote_installation_server;
+ } else if (strcmp(dfui_response_get_action_id(r), "reboot") == 0) {
+ state = state_reboot;
+ }
+
+ dfui_form_free(f);
+ dfui_response_free(r);
+}
+
+/*
+ * state_welcome_system: the start state of the installer state machine,
+ * when run from the installed system. Allow the user to configure the
+ * system.
+ */
+void
+state_welcome_system(struct i_fn_args *a)
+{
+ struct dfui_form *f;
+ struct dfui_response *r;
+ char msg_buf[2][1024];
+
+ snprintf(msg_buf[0], sizeof(msg_buf[0]),
+ _("Configure this %s System"), OPERATING_SYSTEM_NAME);
+
+ snprintf(msg_buf[1], sizeof(msg_buf[1]),
+ _("Thank you for choosing %s."
+ "\n\n"
+ "For up-to-date news and information on %s, "
+ "make sure to check out"
+ "\n\n"
+ "%s"
+ "\n\n"
+ "You can use this automated application to assist "
+ "you in setting up this %s system."
+ ""),
+ OPERATING_SYSTEM_NAME, OPERATING_SYSTEM_NAME,
+ OPERATING_SYSTEM_URL, OPERATING_SYSTEM_NAME);
+
+
+ f = dfui_form_create(
+ "welcome",
+ msg_buf[0],
+
+ msg_buf[1],
+
+ "",
+
+ "p", "special", "dfinstaller_welcome",
+
+ NULL
+ );
+
+ snprintf(msg_buf[0], sizeof(msg_buf[0]),
+ _("Configure this %s system"), OPERATING_SYSTEM_NAME);
+
+ dfui_form_action_add(f, "environment",
+ dfui_info_new(_("Configure this System"),
+ msg_buf[0], ""));
+
+ dfui_form_action_add(f, "utilities",
+ dfui_info_new(_("Utilities"),
+ _("Utilities to work with and diagnose disks and other subsystems"), ""));
+
+ dfui_form_action_add(f, "exit",
+ dfui_info_new(_("Exit Installer"),
+ _("Exit this program and return to the system"), ""));
+
+ if (!dfui_be_present(a->c, f, &r))
+ abort_backend();
+
+ if (strcmp(dfui_response_get_action_id(r), "environment") == 0) {
+ state = state_environment_menu;
+ } else if (strcmp(dfui_response_get_action_id(r), "utilities") == 0) {
+ state = state_utilities_menu;
+ } else if (strcmp(dfui_response_get_action_id(r), "exit") == 0) {
+ state = NULL;
+ } else if (strcmp(dfui_response_get_action_id(r), "reboot") == 0) {
+ state = state_reboot;
+ }
+
+ dfui_form_free(f);
+ dfui_response_free(r);
+}
+
+void
+state_configure_menu(struct i_fn_args *a)
+{
+ struct dfui_form *f = NULL;
+ struct dfui_response *r = NULL;
+ struct commands *cmds;
+ int done = 0;
+ char msg_buf[2][1024];
+
+ if (storage_get_selected_disk(a->s) == NULL || storage_get_selected_slice(a->s) == NULL) {
+ if (!survey_storage(a)) {
+ inform(a->c, _("Errors occurred while probing "
+ "the system for its storage capabilities."));
+ }
+
+ a->short_desc = _("Select the disk containing the installation.");
+ a->cancel_desc = _("Return to Welcome Menu");
+ fn_select_disk(a);
+ if (!a->result || storage_get_selected_disk(a->s) == NULL) {
+ state = state_welcome;
+ return;
+ }
+
+ a->short_desc = _("Select the primary partition containing the installation.");
+ a->cancel_desc = _("Return to Welcome Menu");
+ fn_select_slice(a);
+
+ if (!a->result || storage_get_selected_slice(a->s) == NULL) {
+ state = state_welcome;
+ return;
+ }
+ }
+
+ a->cfg_root = "mnt";
+ if (!mount_target_system(a)) {
+ inform(a->c, _("Target system could not be mounted."));
+ state = state_welcome;
+ return;
+ }
+
+ snprintf(msg_buf[0], sizeof(msg_buf[0]),
+ _("The options on this menu allow you to configure a "
+ "%s system after it has already been "
+ "installed."), OPERATING_SYSTEM_NAME);
+
+ while (!done) {
+ f = dfui_form_create(
+ "configure_menu",
+ _("Configure an Installed System"),
+ msg_buf[0],
+ "",
+ "p", "role", "menu",
+
+ "a", "set_timezone",
+ _("Select timezone"),
+ _("Set the Time Zone of your physical location"), "",
+ "a", "set_datetime",
+ _("Set date and time"),
+ _("Set the Time and Date of your machine"), "",
+
+ "a", "root_passwd", _("Set root password"),
+ _("Set the password that the root (superuser) account will use"), "",
+ "a", "add_user", _("Add a user"),
+ _("Add a user to the system"), "",
+ /*
+ "a", "cvsup_sources","Synchronize system sources", "", "",
+ */
+ "a", "assign_ip", _("Configure network interfaces"),
+ _("Set up network interfaces (NICs, ethernet, TCP/IP, etc)"), "",
+ "a", "assign_hostname_domain",
+ _("Configure hostname and domain"),
+ _("Configure the hostname and domain for this system"), "",
+ /*
+ "a", "select_services", "Select Services",
+ "Enable/Disable system services (servers, daemons, etc.)", "",
+ */
+ "a", "set_kbdmap",
+ _("Set keyboard map"),
+ _("Set what kind of keyboard layout you have"), "",
+ "a", "set_vidfont",
+ _("Set console font"),
+ _("Set how the characters on your video console look"), "",
+ "a", "set_scrnmap",
+ _("Set screen map"),
+ _("Set how characters are translated before console display"), "",
+
+ "a", "install_pkgs", _("Install extra software packages"),
+ _("Install third-party software packages from the LiveCD"), "",
+ "a", "remove_pkgs", _("Remove software packages"),
+ _("Remove third-party software packages from the installed system"), "",
+
+ "a", "cancel", _("Return to Welcome Menu"), "", "",
+ "p", "accelerator", "ESC",
+
+ NULL
+ );
+
+ if (!dfui_be_present(a->c, f, &r))
+ abort_backend();
+
+ /* XXX set up a */
+ a->cfg_root = "mnt/";
+ if (strcmp(dfui_response_get_action_id(r), "root_passwd") == 0) {
+ fn_root_passwd(a);
+ } else if (strcmp(dfui_response_get_action_id(r), "add_user") == 0) {
+ fn_add_user(a);
+ } else if (strcmp(dfui_response_get_action_id(r), "cvsup_sources") == 0) {
+ fn_cvsup_sources(a);
+ } else if (strcmp(dfui_response_get_action_id(r), "install_pkgs") == 0) {
+ fn_install_packages(a);
+ } else if (strcmp(dfui_response_get_action_id(r), "remove_pkgs") == 0) {
+ fn_remove_packages(a);
+ } else if (strcmp(dfui_response_get_action_id(r), "assign_ip") == 0) {
+ fn_assign_ip(a);
+ } else if (strcmp(dfui_response_get_action_id(r), "assign_hostname_domain") == 0) {
+ fn_assign_hostname_domain(a);
+ } else if (strcmp(dfui_response_get_action_id(r), "select_services") == 0) {
+ fn_select_services(a);
+ } else if (strcmp(dfui_response_get_action_id(r), "set_kbdmap") == 0) {
+ fn_set_kbdmap(a);
+ } else if (strcmp(dfui_response_get_action_id(r), "set_vidfont") == 0) {
+ fn_set_vidfont(a);
+ } else if (strcmp(dfui_response_get_action_id(r), "set_scrnmap") == 0) {
+ fn_set_scrnmap(a);
+ } else if (strcmp(dfui_response_get_action_id(r), "set_timezone") == 0) {
+ fn_set_timezone(a);
+ } else if (strcmp(dfui_response_get_action_id(r), "set_datetime") == 0) {
+ fn_assign_datetime(a);
+ } else if (strcmp(dfui_response_get_action_id(r), "cancel") == 0) {
+ state = state_welcome;
+ done = 1;
+ }
+
+ dfui_form_free(f);
+ dfui_response_free(r);
+ }
+
+ /*
+ * Before unmounting the system, write out any changes to rc.conf.
+ */
+ config_vars_write(rc_conf, CONFIG_TYPE_SH,
+ "%s%setc/rc.conf", a->os_root, a->cfg_root);
+
+ /*
+ * Clear out configuration variable table in memory.
+ */
+ config_vars_free(rc_conf);
+ rc_conf = config_vars_new();
+
+ /*
+ * Finally, unmount the system we mounted on /mnt.
+ */
+ cmds = commands_new();
+ unmount_all_under(a, cmds, "%smnt", a->os_root);
+ commands_execute(a, cmds);
+ commands_free(cmds);
+}
+
+void
+state_utilities_menu(struct i_fn_args *a)
+{
+ struct dfui_form *f;
+ struct dfui_response *r;
+
+ if (!survey_storage(a)) {
+ inform(a->c, _("Errors occurred while probing "
+ "the system for its storage capabilities."));
+ }
+
+ f = dfui_form_create(
+ "utilities_menu",
+ _("Live CD Utilities Menu"),
+ _("On these submenus you will find utilities to help "
+ "you set up your Live CD environment, diagnose "
+ "and analyse this system, and work with "
+ "the devices attached to this computer."),
+ "",
+ "p", "role", "menu",
+ "a", "environment", _("LiveCD Environment"),
+ _("Configure the LiveCD Environment"), "",
+ "a", "diagnostics", _("System Diagnostics"),
+ _("Probe and display detailed information about this system"), "",
+ "a", "diskutil", _("Disk Utilities"),
+ _("Format and check hard drives and floppy disks"), "",
+ "a", "livecd", _("Exit to Live CD"),
+ _("Exit this program to a login prompt with access to the LiveCD"), "",
+ "a", "reboot",
+ _("Reboot this Computer"), "", "",
+ "a", "cancel",
+ _("Return to Welcome Menu"), "", "",
+ "p", "accelerator", "ESC",
+ NULL
+ );
+
+ if (!dfui_be_present(a->c, f, &r))
+ abort_backend();
+
+ if (strcmp(dfui_response_get_action_id(r), "environment") == 0)
+ state = state_environment_menu;
+ else if (strcmp(dfui_response_get_action_id(r), "diagnostics") == 0)
+ state = state_diagnostics_menu;
+ else if (strcmp(dfui_response_get_action_id(r), "diskutil") == 0)
+ state = state_diskutil_menu;
+ else if (strcmp(dfui_response_get_action_id(r), "livecd") == 0)
+ state = NULL;
+ else if (strcmp(dfui_response_get_action_id(r), "reboot") == 0)
+ state = state_reboot;
+ else if (strcmp(dfui_response_get_action_id(r), "cancel") == 0)
+ state = state_welcome;
+
+ dfui_form_free(f);
+ dfui_response_free(r);
+}
+
+void
+state_environment_menu(struct i_fn_args *a)
+{
+ struct dfui_form *f;
+ struct dfui_response *r;
+ int done = 0;
+ char msg_buf[2][1024];
+
+ snprintf(msg_buf[0], sizeof(msg_buf[0]),
+ _("On this menu you will find utilities to help you "
+ "set up your Live CD environment.\n\nNote "
+ "that these functions affect only the LiveCD "
+ "environment you are currently using, and they will "
+ "not affect any system that may be installed on "
+ "this computer UNLESS you subsequently choose to "
+ "install %s from this environment, in which "
+ "case they will be copied to the newly installed "
+ "system."), OPERATING_SYSTEM_NAME);
+
+ while (!done) {
+ f = dfui_form_create(
+ "environment_menu",
+ _("Live CD Environment Menu"),
+ msg_buf[0],
+ "",
+ "p", "role", "menu",
+
+ "a", "set_timezone",
+ _("Select timezone"),
+ _("Set the Time Zone of your physical location"), "",
+ "a", "set_datetime",
+ _("Set date and time"),
+ _("Set the Time and Date of your machine"), "",
+
+ "a", "set_kbdmap",
+ _("Set keyboard map"),
+ _("Set what kind of keyboard layout you have"), "",
+ "a", "set_vidfont",
+ _("Set console font"),
+ _("Set how the characters on your video console look"), "",
+ "a", "set_scrnmap",
+ _("Set screen map"),
+ _("Set how characters are translated before console display"), "",
+
+ "a", "assign_hostname_domain",
+ _("Configure hostname and domain"),
+ _("Configure the hostname and domain for this system"), "",
+ "a", "assign_ip",
+ _("Configure network interfaces"),
+ _("Set up network interfaces (NICs, ethernet, TCP/IP, etc)"), "",
+
+ "a", "cancel",
+ _("Return to Utilities Menu"), "", "",
+ "p", "accelerator", "ESC",
+
+ NULL
+ );
+
+ if (!dfui_be_present(a->c, f, &r))
+ abort_backend();
+
+ /* Set up a */
+ a->cfg_root = "";
+ if (strcmp(dfui_response_get_action_id(r), "set_kbdmap") == 0) {
+ fn_set_kbdmap(a);
+ } else if (strcmp(dfui_response_get_action_id(r), "set_vidfont") == 0) {
+ fn_set_vidfont(a);
+ } else if (strcmp(dfui_response_get_action_id(r), "set_scrnmap") == 0) {
+ fn_set_scrnmap(a);
+ } else if (strcmp(dfui_response_get_action_id(r), "assign_hostname_domain") == 0) {
+ fn_assign_hostname_domain(a);
+ } else if (strcmp(dfui_response_get_action_id(r), "assign_ip") == 0) {
+ fn_assign_ip(a);
+ } else if (strcmp(dfui_response_get_action_id(r), "set_timezone") == 0) {
+ fn_set_timezone(a);
+ } else if (strcmp(dfui_response_get_action_id(r), "set_datetime") == 0) {
+ fn_assign_datetime(a);
+ } else if (strcmp(dfui_response_get_action_id(r), "cancel") == 0) {
+ state = state_utilities_menu;
+ done = 1;
+ }
+
+ dfui_form_free(f);
+ dfui_response_free(r);
+ }
+}
+
+void
+state_diagnostics_menu(struct i_fn_args *a)
+{
+ struct dfui_form *f;
+ struct dfui_action *k;
+ struct dfui_response *r;
+ int done = 0;
+
+ while (!done) {
+ f = dfui_form_create(
+ "utilities_menu",
+ _("Live CD Diagnostics Menu"),
+ _("These functions can help you diagnose this system."),
+ "",
+ "p", "role", "menu",
+
+ "a", "show_dmesg",
+ _("Display system startup messages"),
+ _("Display system startup messages (dmesg)"), "",
+ "a", "pciconf",
+ _("Display PCI devices"),
+ _("Display PCI devices (pciconf)"), "",
+ "a", "pnpinfo",
+ _("Display Plug'n'Play ISA devices"),
+ _("Display Plug'n'Play ISA devices (pnpinfo)"), "",
+ "a", "atacontrol",
+ _("Display ATA devices"),
+ _("Display ATA devices (atactl)"), "",
+ NULL
+ );
+
+ if (is_file("%sboot/memtest86.flp.bz2", a->os_root)) {
+ dfui_form_action_add(f, "memtest86",
+ dfui_info_new(_("Create memtest86 Floppy"),
+ _("Create a floppy which boots into a dedicated memory-test"),
+ ""));
+ }
+
+ if (is_program("%susr/local/bin/memtest", a->os_root)) {
+ dfui_form_action_add(f, "memtest",
+ dfui_info_new(_("Run On-Line Memory Test"),
+ _("Test the memory in the machine while running"),
+ ""));
+ }
+
+ k = dfui_form_action_add(f, "cancel",
+ dfui_info_new(_("Return to Utilities Menu"), "", ""));
+ dfui_action_property_set(k, "accelerator", "ESC");
+
+ if (!dfui_be_present(a->c, f, &r))
+ abort_backend();
+
+ /* XXX set up a */
+ if (strcmp(dfui_response_get_action_id(r), "show_dmesg") == 0) {
+ fn_show_dmesg(a);
+ } else if (strcmp(dfui_response_get_action_id(r), "pciconf") == 0) {
+ fn_show_pciconf(a);
+ } else if (strcmp(dfui_response_get_action_id(r), "pnpinfo") == 0) {
+ fn_show_pnpinfo(a);
+ } else if (strcmp(dfui_response_get_action_id(r), "atacontrol") == 0) {
+ fn_show_atacontrol(a);
+ } else if (strcmp(dfui_response_get_action_id(r), "memtest") == 0) {
+ fn_memtest(a);
+ } else if (strcmp(dfui_response_get_action_id(r), "memtest86") == 0) {
+ fn_create_memtest86_floppy(a);
+ } else if (strcmp(dfui_response_get_action_id(r), "cancel") == 0) {
+ state = state_utilities_menu;
+ done = 1;
+ }
+
+ dfui_form_free(f);
+ dfui_response_free(r);
+ }
+}
+
+void
+state_diskutil_menu(struct i_fn_args *a)
+{
+ struct dfui_form *f;
+ struct dfui_action *k;
+ struct dfui_response *r;
+ int done = 0;
+
+ while (!done) {
+ f = dfui_form_create(
+ "utilities_menu",
+ _("Disk Utilities Menu"),
+ _("These functions let you manipulate the storage devices "
+ "attached to this computer."),
+ "",
+
+ "p", "role", "menu",
+
+ "a", "format_hdd",
+ _("Format a hard disk drive"), "", "",
+ "a", "wipe_start_of_disk",
+ _("Wipe out the start of a disk"), "", "",
+ "a", "wipe_start_of_slice",
+ _("Wipe out the start of a primary partition"), "", "",
+ "a", "install_bootblocks",
+ _("Install bootblocks on disks"), "", "",
+ "a", "format_msdos_floppy",
+ _("Format an MSDOS floppy"), "", "",
+ NULL
+ );
+
+ if (is_file("%sboot/cdboot.flp.bz2", a->os_root)) {
+ dfui_form_action_add(f, "create_cdboot_floppy",
+ dfui_info_new(_("Create a CDBoot floppy"),
+ "",
+ ""));
+ }
+
+ k = dfui_form_action_add(f, "cancel",
+ dfui_info_new(_("Return to Utilities Menu"), "", ""));
+ dfui_action_property_set(k, "accelerator", "ESC");
+
+ if (!dfui_be_present(a->c, f, &r))
+ abort_backend();
+
+ /* XXX set up a */
+ if (strcmp(dfui_response_get_action_id(r), "format_hdd") == 0) {
+ storage_set_selected_disk(a->s, NULL);
+ storage_set_selected_slice(a->s, NULL);
+ fn_format_disk(a);
+ } else if (strcmp(dfui_response_get_action_id(r), "wipe_start_of_disk") == 0) {
+ fn_wipe_start_of_disk(a);
+ } else if (strcmp(dfui_response_get_action_id(r), "wipe_start_of_slice") == 0) {
+ fn_wipe_start_of_slice(a);
+ } else if (strcmp(dfui_response_get_action_id(r), "install_bootblocks") == 0) {
+ a->short_desc = _("Select the disks on which "
+ "you wish to install bootblocks.");
+ a->cancel_desc = _("Return to Utilities Menu");
+ fn_install_bootblocks(a);
+ } else if (strcmp(dfui_response_get_action_id(r), "format_msdos_floppy") == 0) {
+ fn_format_msdos_floppy(a);
+ } else if (strcmp(dfui_response_get_action_id(r), "create_cdboot_floppy") == 0) {
+ fn_create_cdboot_floppy(a);
+ } else if (strcmp(dfui_response_get_action_id(r), "cancel") == 0) {
+ state = state_utilities_menu;
+ done = 1;
+ }
+
+ dfui_form_free(f);
+ dfui_response_free(r);
+ }
+}
+
+/** INSTALLER STATES **/
+
+/*
+ * state_begin_upgrade: Ask the user where the freebsd
+ * 4.X install is and make sure its safe to proceed.
+ *
+ */
+void
+state_begin_upgrade(struct i_fn_args *a)
+{
+ //struct dfui_form *f = NULL;
+ //struct dfui_response *r = NULL;
+ //int done = 0;
+
+ if (storage_get_selected_disk(a->s) == NULL || storage_get_selected_slice(a->s) == NULL) {
+ if (!survey_storage(a)) {
+ inform(a->c, _("Errors occurred while probing "
+ "the system for its storage capabilities."));
+ }
+
+ a->short_desc = _("Select the disk containing the installation that you would like to upgrade.");
+ a->cancel_desc = _("Return to Welcome Menu");
+ fn_select_disk(a);
+ if (!a->result || storage_get_selected_disk(a->s) == NULL) {
+ state = state_welcome;
+ return;
+ }
+
+ a->short_desc = _("Select the primary partition containing the installation you would like to upgrade.");
+ a->cancel_desc = _("Return to Welcome Menu");
+ fn_select_slice(a);
+
+ if (!a->result || storage_get_selected_slice(a->s) == NULL) {
+ state = state_welcome;
+ return;
+ }
+ }
+
+ a->cfg_root = "mnt";
+ if (!mount_target_system(a)) {
+ inform(a->c, _("Target system could not be mounted."));
+ state = state_welcome;
+ return;
+ }
+}
+
+/*
+ * state_begin_install: Briefly describe the install process
+ * to the user, and let them proceed (or not.)
+ */
+void
+state_begin_install(struct i_fn_args *a)
+{
+ struct dfui_form *f;
+ struct dfui_response *r;
+ char msg_buf[3][1024];
+
+ snprintf(msg_buf[0], sizeof(msg_buf[0]),
+ _("This experimental application will install %s"
+ " on one of the hard disk drives attached to this computer. "
+ "It has been designed to make it easy to install "
+ "%s in the typical case. "
+ "If you have special requirements that are not addressed "
+ "by this installer, or if you have problems using it, you "
+ "are welcome to install %s manually. "
+ "To do so select Exit to Live CD, login as root, and follow "
+ "the instructions given in the file /README ."
+ "\n\n"
+ "NOTE! As with any installation process, YOU ARE "
+ "STRONGLY ENCOURAGED TO BACK UP ANY IMPORTANT DATA ON THIS "
+ "COMPUTER BEFORE PROCEEDING!"
+ ""),
+ OPERATING_SYSTEM_NAME, OPERATING_SYSTEM_NAME,
+ OPERATING_SYSTEM_NAME);
+
+ snprintf(msg_buf[1], sizeof(msg_buf[1]),
+ _("Some situations in which you might not wish to use this "
+ "installer are:\n\n"
+ "- you want to install %s onto a "
+ "logical/extended partition;\n"
+ "- you want to install %s "
+ "onto a ``dangerously dedicated'' disk; or\n"
+ "- you want full and utter control over the install process."
+ ""),
+ OPERATING_SYSTEM_NAME, OPERATING_SYSTEM_NAME);
+
+ snprintf(msg_buf[2], sizeof(msg_buf[2]),
+ _("Install %s"), OPERATING_SYSTEM_NAME);
+
+ f = dfui_form_create(
+ "begin_install",
+ _("Begin Installation"),
+ msg_buf[0],
+
+ msg_buf[1],
+ "p", "special", "dfinstaller_begin_install",
+ "p", "minimum_width", "76",
+
+ "a", "proceed", msg_buf[2],
+ "", "",
+ "a", "cancel", _("Return to Welcome Menu"),
+ "", "",
+ "p", "accelerator", "ESC",
+ "a", "livecd", _("Exit to Live CD"),
+ "", "",
+ NULL
+ );
+
+ if (!dfui_be_present(a->c, f, &r))
+ abort_backend();
+
+ if (strcmp(dfui_response_get_action_id(r), "proceed") == 0) {
+ if (!survey_storage(a)) {
+ inform(a->c, _("Errors occurred while probing "
+ "the system for its storage capabilities."));
+ }
+ state = state_select_disk;
+ } else if (strcmp(dfui_response_get_action_id(r), "livecd") == 0) {
+ state = NULL;
+ } else if (strcmp(dfui_response_get_action_id(r), "cancel") == 0) {
+ state = state_welcome;
+ }
+
+ dfui_form_free(f);
+ dfui_response_free(r);
+}
+
+/*
+ * state_select_disk: ask the user on which physical disk they wish
+ * to install DragonFly.
+ */
+void
+state_select_disk(struct i_fn_args *a)
+{
+ struct disk *d;
+ int num_disks = 0;
+ char msg_buf[1][1024];
+
+ for (d = storage_disk_first(a->s); d != NULL; d = disk_next(d))
+ num_disks++;
+
+ if (num_disks == 0) {
+ inform(a->c, _("The installer could not find any disks suitable "
+ "for installation (IDE or SCSI) attached to this "
+ "computer. If you wish to install %s"
+ " on an unorthodox storage device, you will have to "
+ "exit to a LiveCD command prompt and install it "
+ "manually, using the file /README as a guide."),
+ OPERATING_SYSTEM_NAME);
+ state = state_welcome;
+ return;
+ }
+
+ snprintf(msg_buf[0], sizeof(msg_buf[0]),
+ _("Select a disk on which to install %s"),
+ OPERATING_SYSTEM_NAME);
+ a->short_desc = msg_buf[0];
+ a->cancel_desc = _("Return to Begin Installation");
+ fn_select_disk(a);
+ if (!a->result || storage_get_selected_disk(a->s) == NULL) {
+ state = state_begin_install;
+ } else {
+#if 0
+ if (disk_get_capacity(storage_get_selected_disk(a->s)) < DISK_MIN) {
+ inform(a->c, _("WARNING: you should have a disk "
+ "at least %dM in size, or "
+ "you may encounter problems trying to "
+ "install %s."), DISK_MIN, OPERATING_SYSTEM_NAME);
+ }
+#endif
+ state = state_format_disk;
+ }
+}
+
+/*
+ * state_format_disk: ask the user if they wish to format the disk they
+ * selected.
+ */
+void
+state_format_disk(struct i_fn_args *a)
+{
+
+ switch (dfui_be_present_dialog(a->c, _("How Much Disk?"),
+ _("Use Entire Disk|Use Part of Disk|Return to Select Disk"),
+ _("Select how much of this disk you want to use for %s.\n\n%s"),
+ OPERATING_SYSTEM_NAME,
+ disk_get_desc(storage_get_selected_disk(a->s)))) {
+ case 1:
+ /* Entire Disk */
+ if (measure_activated_swap_from_disk(a, storage_get_selected_disk(a->s)) > 0) {
+ switch(dfui_be_present_dialog(a->c,
+ _("Swap already active"),
+ _("Reboot|Return to Select Disk"),
+ _("Some subpartitions on the primary partition "
+ "of this disk are already activated as swap. "
+ "Since there is no way to deactivate swap in "
+ "%s once it is activated, in order "
+ "to edit the subpartition layout of this "
+ "primary partition, you must first reboot."),
+ OPERATING_SYSTEM_NAME)) {
+ case 1:
+ state = state_reboot;
+ return;
+ case 2:
+ state = state_select_disk;
+ return;
+ default:
+ abort_backend();
+ }
+ }
+
+ fn_format_disk(a);
+ if (a->result)
+ state = state_create_subpartitions;
+ else
+ state = state_format_disk;
+ break;
+ case 2:
+ /* Part of Disk */
+ state = state_select_slice;
+ break;
+ case 3:
+ /* Return */
+ state = state_select_disk;
+ break;
+ default:
+ abort_backend();
+ break;
+ }
+}
+
+/*
+ * state_select_slice: ask the user which slice they wish to install
+ * DragonFly on. In order to avoid confusing them, refer to it as
+ * a primary partition, but tell them what BSD has traditionally called
+ * it, too.
+ */
+void
+state_select_slice(struct i_fn_args *a)
+{
+ char msg_buf[1][1024];
+
+ snprintf(msg_buf[0], sizeof(msg_buf[0]),
+ _("Select the existing primary partition (also "
+ "known as a `slice' in the BSD tradition) on "
+ "which to install %s.\n\n"
+ "Note that if you do not have any existing "
+ "primary partitions on this disk, you must "
+ "first create some. This installer does not "
+ "currently have the ability to do this, so "
+ "you will have to exit and run fdisk (in "
+ "DOS or *BSD) or parted (in Linux) to do so."),
+ OPERATING_SYSTEM_NAME);
+
+ a->short_desc = msg_buf[0];
+ a->cancel_desc = _("Return to Select Disk");
+ fn_select_slice(a);
+ if (!a->result || storage_get_selected_slice(a->s) == NULL) {
+ state = state_select_disk;
+ } else {
+ if (measure_activated_swap_from_slice(a, storage_get_selected_disk(a->s),
+ storage_get_selected_slice(a->s)) > 0) {
+ switch(dfui_be_present_dialog(a->c,
+ _("Swap already active"),
+ _("Reboot|Return to Select Primary Partition"),
+ _("Some subpartitions on the selected primary "
+ "partition are already activated as swap. "
+ "Since there is no way to deactivate swap in "
+ "%s once it is activated, in order "
+ "to edit the subpartition layout of this "
+ "primary partition, you must first reboot."),
+ OPERATING_SYSTEM_NAME)) {
+ case 1:
+ state = state_reboot;
+ return;
+ case 2:
+ state = state_select_slice;
+ return;
+ default:
+ abort_backend();
+ }
+ }
+
+ if (slice_get_capacity(storage_get_selected_slice(a->s)) < DISK_MIN) {
+ inform(a->c, _("WARNING: you should have a primary "
+ "partition at least %dM in size, or "
+ "you may encounter problems trying to "
+ "install %s."), DISK_MIN, OPERATING_SYSTEM_NAME);
+ }
+
+ if (confirm_dangerous_action(a->c,
+ _("WARNING! ALL data in primary partition #%d,\n\n%s\n\non the "
+ "disk\n\n%s\n\n will be IRREVOCABLY ERASED!\n\nAre you "
+ "ABSOLUTELY SURE you wish to take this action? This is "
+ "your LAST CHANCE to cancel!"),
+ slice_get_number(storage_get_selected_slice(a->s)),
+ slice_get_desc(storage_get_selected_slice(a->s)),
+ disk_get_desc(storage_get_selected_disk(a->s)))) {
+ if (!format_slice(a)) {
+ inform(a->c, _("Primary partition #%d was "
+ "not correctly formatted, and may "
+ "now be in an inconsistent state. "
+ "We recommend re-formatting it "
+ "before proceeding."),
+ slice_get_number(storage_get_selected_slice(a->s)));
+ } else {
+ inform(a->c, _("Primary partition #%d was formatted."),
+ slice_get_number(storage_get_selected_slice(a->s)));
+ state = state_create_subpartitions;
+ }
+ } else {
+ inform(a->c, _("Action cancelled - no primary partitions were formatted."));
+ state = state_select_slice;
+ }
+ }
+}
+
+/*
+ * state_create_subpartitions: let the user specify what subpartitions they
+ * want on the disk, how large each should be, and where it should be mounted.
+ */
+void
+state_create_subpartitions(struct i_fn_args *a)
+{
+ char msg_buf[1][1024];
+
+ if (measure_activated_swap_from_slice(a, storage_get_selected_disk(a->s),
+ storage_get_selected_slice(a->s)) > 0) {
+ snprintf(msg_buf[0], sizeof(msg_buf[0]),
+ _("Some subpartitions on the selected primary "
+ "partition are already activated as swap. "
+ "Since there is no way to deactivate swap in "
+ "%s once it is activated, in order "
+ "to edit the subpartition layout of this "
+ "primary partition, you must first reboot."),
+ OPERATING_SYSTEM_NAME);
+ switch(dfui_be_present_dialog(a->c, _("Swap already active"),
+ disk_get_formatted(storage_get_selected_disk(a->s)) ?
+ _("Reboot|Return to Select Disk") :
+ _("Reboot|Return to Select Primary Partition"),
+ msg_buf[0])) {
+ case 1:
+ state = state_reboot;
+ return;
+ case 2:
+ state = disk_get_formatted(storage_get_selected_disk(a->s)) ?
+ state_select_disk : state_select_slice;
+ return;
+ default:
+ abort_backend();
+ }
+ }
+
+ fn_create_subpartitions(a);
+ if (a->result) {
+ state = state_install_os;
+ } else {
+ state = disk_get_formatted(storage_get_selected_disk(a->s)) ?
+ state_select_disk : state_select_slice;
+ }
+}
+
+/*
+ * state_install_os: actually put DragonFly on the disk.
+ */
+void
+state_install_os(struct i_fn_args *a)
+{
+ struct dfui_form *f;
+ struct dfui_response *r;
+ char msg_buf[1][1024];
+
+ snprintf(msg_buf[0], sizeof(msg_buf[0]),
+ _("Everything is now ready to install the actual files which "
+ "comprise the %s operating system "
+ "on the selected partition of the selected disk.\n\n"
+ "Note that this process will take quite a while to finish. "
+ "You may wish to take a break now and come back to the "
+ "computer in a short while."),
+ OPERATING_SYSTEM_NAME);
+
+ f = dfui_form_create(
+ "install_os",
+ _("Install OS"),
+ msg_buf[0],
+
+ "",
+
+ "p", "role", "confirm",
+ "p", "special", "dfinstaller_install_os",
+
+ "a", "ok", _("Begin Installing Files"), "", "",
+ "a", "cancel", _("Return to Create Subpartitions"), "", "",
+ "p", "accelerator", "ESC",
+
+ NULL
+ );
+
+ if (!dfui_be_present(a->c, f, &r))
+ abort_backend();
+
+ if (strcmp(dfui_response_get_action_id(r), "cancel") == 0) {
+ state = state_create_subpartitions;
+ } else {
+ fn_install_os(a);
+ if (a->result)
+ state = state_install_bootstrap;
+ }
+
+ dfui_form_free(f);
+ dfui_response_free(r);
+}
+
+/*
+ * state_install_bootstrap: put boot0 bootblocks on selected disks.
+ */
+void
+state_install_bootstrap(struct i_fn_args *a)
+{
+ char msg_buf[1][1024];
+
+ snprintf(msg_buf[0], sizeof(msg_buf[0]),
+ _("You may now wish to install bootblocks on one or more disks. "
+ "If you already have a boot manager installed, you can skip "
+ "this step (but you may have to configure your boot manager "
+ "separately.) If you installed %s on a disk other "
+ "than your first disk, you will need to put the bootblock "
+ "on at least your first disk and the %s disk."),
+ OPERATING_SYSTEM_NAME, OPERATING_SYSTEM_NAME);
+
+ a->short_desc = msg_buf[0];
+ a->cancel_desc = _("Skip this Step");
+ fn_install_bootblocks(a);
+ state = state_finish_install;
+}
+
+/*
+ * Finish up the install.
+ */
+void
+state_finish_install(struct i_fn_args *a)
+{
+ char msg_buf[1][1024];
+
+ snprintf(msg_buf[0], sizeof(msg_buf[0]),
+ "%s is Installed!",
+ OPERATING_SYSTEM_NAME);
+
+ switch (dfui_be_present_dialog(a->c, msg_buf[0],
+ _("Configure this System|Reboot|Return to Welcome Menu"),
+ _("Congratulations!\n\n"
+ "%s has successfully been installed on "
+ "this computer. You may now proceed to configure "
+ "the installation. Alternately, you may wish to "
+ "reboot the computer and boot into the installed "
+ "system to confirm that it works."),
+ OPERATING_SYSTEM_NAME)) {
+ case 1:
+ state = state_configure_menu;
+ break;
+ case 2:
+ state = state_reboot;
+ break;
+ case 3:
+ state = state_welcome;
+ break;
+ default:
+ abort_backend();
+ }
+}
+
+/*
+ * state_reboot: reboot the machine.
+ */
+void
+state_reboot(struct i_fn_args *a)
+{
+ struct dfui_form *f;
+ struct dfui_response *r;
+
+ f = dfui_form_create(
+ "reboot",
+ _("Reboot"),
+ _("This machine is about to be shut down. "
+ "After the machine has reached its shutdown state, "
+ "you may remove the CD from the CD-ROM drive tray "
+ "and press Enter to reboot from the HDD."),
+
+ "",
+
+ "p", "role", "confirm",
+
+ "a", "ok", _("Reboot"), "", "",
+ "a", "cancel", _("Return to Welcome Menu"), "", "",
+ "p", "accelerator", "ESC",
+ NULL
+ );
+
+ if (!dfui_be_present(a->c, f, &r))
+ abort_backend();
+
+ if (strcmp(dfui_response_get_action_id(r), "cancel") == 0) {
+ state = state_welcome;
+ } else {
+ do_reboot = 1;
+ state = NULL;
+ }
+
+ dfui_form_free(f);
+ dfui_response_free(r);
+}
+
+/*
+ *
+ * state_setup_remote_installation_server:
+ * Setup a remote boot installation environment where a machine
+ * can boot via DHCP/TFTP/NFS and have a running environment
+ * where the installer can setup the machine.
+ *
+ */
+void
+state_setup_remote_installation_server(struct i_fn_args *a)
+{
+ FILE *p;
+ struct commands *cmds;
+ struct dfui_form *f;
+ struct dfui_action *k;
+ struct dfui_response *r;
+ char *word;
+ char interface[256];
+ char line[256];
+
+ switch (dfui_be_present_dialog(a->c, _("Enable Netboot Installation Services?"),
+ _("Enable NetBoot Installation Services|No thanks"),
+ _("NetBoot Installation Services allows this machine to become "
+ "a Installation Server that will allow the clients to boot over the network "
+ "via PXE and start the Installation Environment."
+ "\n\n*NOTE!* This will assign the IP Address of 10.1.0.1/24 to the selected interface."
+ "\n\nWould you like to provision this machine to serve up the LiveCD/Installer?"))) {
+ case 1:
+ /*
+ * Get interface list.
+ */
+ p = popen("/sbin/ifconfig -l", "r");
+ /* XXX it's possible (though extremely unlikely) this will fail. */
+ while (fgets(line, 255, p) != NULL)
+ line[strlen(line) - 1] = '\0';
+ pclose(p);
+
+ f = dfui_form_create(
+ "assign_ip",
+ _("Setup NetBoot Installation Environment"),
+ _("Please select which interface you would like to configure:"),
+ "",
+ "p", "role", "menu",
+ NULL
+ );
+
+ /* Loop through array. */
+ word = strtok(line, " \t");
+ while (word != NULL) {
+ dfui_form_action_add(f, word,
+ dfui_info_new(word, "", ""));
+ word = strtok(NULL, " ");
+ }
+
+ k = dfui_form_action_add(f, "cancel",
+ dfui_info_new("Cancel", "", ""));
+ dfui_action_property_set(k, "accelerator", "ESC");
+
+ if (!dfui_be_present(a->c, f, &r))
+ abort_backend();
+
+ strlcpy(interface, dfui_response_get_action_id(r), 256);
+
+ if (strcmp(dfui_response_get_action_id(r), "cancel") == 0) {
+ dfui_form_free(f);
+ dfui_response_free(r);
+ return;
+ }
+
+ /*
+ *
+ * Issues the necessary commands to setup the remote boot environment
+ *
+ */
+ cmds = commands_new();
+ command_add(cmds, "%s%s %s 10.1.0.1 netmask 255.255.255.0",
+ a->os_root, cmd_name(a, "IFCONFIG"), interface);
+ command_add(cmds, "%s%s -p %stftpdroot",
+ a->os_root, cmd_name(a, "MKDIR"), a->tmp);
+ command_add(cmds, "%s%s %sboot/pxeboot %stftpdroot",
+ a->os_root, cmd_name(a, "CP"), a->os_root, a->tmp);
+ command_add(cmds, "%s%s %s -ro -alldirs -maproot=root: -network 10.1.0.0 -mask 255.255.255.0 >> %setc/exports",
+ a->os_root, cmd_name(a, "ECHO"), a->os_root, a->os_root);
+ command_add(cmds, "%s%s tftp dgram udp wait root %s%s tftpd -l -s %stftpdroot >> %setc/inetd.conf",
+ a->os_root, cmd_name(a, "ECHO"),
+ a->os_root, cmd_name(a, "TFTPD"),
+ a->tmp, a->os_root);
+ command_add(cmds, "%s%s",
+ a->os_root, cmd_name(a, "INETD"));
+ command_add(cmds, "%s%s %svar/db/dhcpd.leases",
+ a->os_root, cmd_name(a, "TOUCH"), a->os_root);
+ command_add(cmds, "%s%s >%sdev/null 2>&1",
+ a->os_root, cmd_name(a, "DHCPD"), a->os_root);
+ command_add(cmds, "%s%s >%sdev/null 2>&1",
+ a->os_root, cmd_name(a, "RPCBIND"), a->os_root);
+ command_add(cmds, "%s%s -ln >%sdev/null 2>&1",
+ a->os_root, cmd_name(a, "MOUNTD"), a->os_root);
+ command_add(cmds, "%s%s -u -t -n 6 >%sdev/null 2>&1",
+ a->os_root, cmd_name(a, "NFSD"), a->os_root);
+
+ if (commands_execute(a, cmds)) {
+ inform(a->c, _("NetBoot installation services are now started."));
+ } else {
+ inform(a->c, _("A failure occured while provisioning the NetBoot environment. Please check the logs."));
+ }
+
+ commands_free(cmds);
+ dfui_form_free(f);
+ dfui_response_free(r);
+
+ break;
+ case 2:
+
+ break;
+
+ };
+
+ state = state_welcome;
+
+}
+
+/*** MAIN ***/
+
+int
+flow(int transport, char *rendezvous, char *os_root,
+ int booted_from_livecd __unused, int upgrade_menu_toggle __unused)
+{
+ struct i_fn_args *a;
+
+ rc_conf = config_vars_new();
+
+ if ((a = i_fn_args_new(os_root, DEFAULT_INSTALLER_TEMP,
+ transport, rendezvous)) == NULL) {
+ fprintf(stderr, "Error: couldn't create i_fn_args "
+ "(root=%s, transport=%d, rendezvous=%s)\n",
+ os_root, transport, rendezvous);
+ exit(1);
+ }
+
+ /*
+ * XXX We can't handle this yet.
+ *
+ a->booted_from_livecd = booted_from_livecd;
+ a->upgrade_menu_toggle = upgrade_menu_toggle;
+ */
+ a->booted_from_livecd = 1;
+ a->upgrade_menu_toggle = 0;
+
+ /*
+ * Execute the state machine here. The global function pointer
+ * variable `state' points to the next state_* function to execute.
+ * Before it exits, this function should set `state' to the next
+ * state to make a transition to, or NULL to indicate that the
+ * state machine is finished.
+ */
+#ifdef ENABLE_NLS
+ state = state_lang_menu;
+#else
+ state = state_welcome;
+#endif
+ for (; state != NULL; )
+ state(a);
+
+ config_vars_free(rc_conf);
+
+ i_fn_args_free(a);
+
+ return(do_reboot);
+}
Index: contrib/bsdinstaller/src/backend/installer/flow.h
===================================================================
RCS file: contrib/bsdinstaller/src/backend/installer/flow.h
diff -N contrib/bsdinstaller/src/backend/installer/flow.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/src/backend/installer/flow.h 20 Mar 2005 18:40:40 -0000
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c)2004 The DragonFly Project. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the DragonFly Project nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * flow.h
+ * $Id: flow.h,v 1.10 2005/03/20 18:40:40 den Exp $
+ */
+
+#ifndef __FLOW_H_
+#define __FLOW_H_
+
+#define DISK_MIN 340
+#define INSTALL_USR_LOCAL
+#define INSTALL_USR_X11R6
+
+#define MTPT_ROOT 0
+#define MTPT_SWAP 1
+#define MTPT_VAR 2
+#define MTPT_TMP 3
+#define MTPT_USR 4
+#define MTPT_HOME 5
+
+struct i_fn_args;
+
+/*** PROTOTYPES ***/
+
+/* Menus */
+
+#ifdef ENABLE_NLS
+void state_lang_menu(struct i_fn_args *);
+#endif
+void state_welcome(struct i_fn_args *);
+void state_welcome_system(struct i_fn_args *);
+void state_configure_menu(struct i_fn_args *);
+void state_utilities_menu(struct i_fn_args *);
+
+void state_environment_menu(struct i_fn_args *);
+void state_diagnostics_menu(struct i_fn_args *);
+void state_diskutil_menu(struct i_fn_args *);
+
+/* Install */
+
+void state_begin_install(struct i_fn_args *);
+void state_begin_upgrade(struct i_fn_args *);
+void state_select_disk(struct i_fn_args *);
+void state_format_disk(struct i_fn_args *);
+void state_select_slice(struct i_fn_args *);
+void state_create_subpartitions(struct i_fn_args *);
+void state_install_os(struct i_fn_args *);
+void state_install_bootstrap(struct i_fn_args *);
+void state_finish_install(struct i_fn_args *);
+void state_reboot(struct i_fn_args *);
+void state_setup_remote_installation_server(struct i_fn_args *);
+
+/* Entry Point */
+
+int flow(int, char *, char *, int livecd_configuration, int upgrade_menu_toggle);
+
+#endif /* !__FLOW_H_ */
Index: contrib/bsdinstaller/src/backend/installer/fn.h
===================================================================
RCS file: contrib/bsdinstaller/src/backend/installer/fn.h
diff -N contrib/bsdinstaller/src/backend/installer/fn.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/src/backend/installer/fn.h 26 Aug 2005 22:44:36 -0000
@@ -0,0 +1,109 @@
+/*
+ * Copyright (c)2004 The DragonFly Project. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the DragonFly Project nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * fn.h
+ * $Id: fn.h,v 1.4 2005/08/26 22:44:36 cpressey Exp $
+ */
+
+#ifndef __FN_H_
+#define __FN_H_
+
+struct aura_dict;
+struct dfui_connection;
+struct i_fn_args;
+
+/*** PROTOTYPES ***/
+
+/* General fn_ functions */
+
+void fn_select_disk(struct i_fn_args *);
+void fn_select_slice(struct i_fn_args *);
+
+/* Configure an Installed System (only) */
+
+void fn_root_passwd(struct i_fn_args *);
+void fn_add_user(struct i_fn_args *);
+void fn_cvsup_sources(struct i_fn_args *);
+void fn_install_packages(struct i_fn_args *);
+void fn_remove_packages(struct i_fn_args *);
+void fn_select_services(struct i_fn_args *);
+
+int mount_target_system(struct i_fn_args *);
+
+/* Configure the LiveCD Environment -or- an Installed System */
+
+void fn_assign_datetime(struct i_fn_args *);
+void fn_set_timezone(struct i_fn_args *);
+void fn_set_kbdmap(struct i_fn_args *);
+void fn_set_vidfont(struct i_fn_args *);
+void fn_set_scrnmap(struct i_fn_args *);
+void fn_assign_hostname_domain(struct i_fn_args *);
+void fn_assign_ip(struct i_fn_args *);
+
+/* LiveCD Utilities: Diagnostics */
+
+void fn_show_dmesg(struct i_fn_args *);
+void fn_show_pciconf(struct i_fn_args *);
+void fn_show_pnpinfo(struct i_fn_args *);
+void fn_show_atacontrol(struct i_fn_args *);
+void fn_memtest(struct i_fn_args *);
+
+void view_memtest_log(struct i_fn_args *);
+void show_ifconfig(struct dfui_connection *, char *);
+
+/* LiveCD Utilties: Disk Utilities */
+
+char *fn_select_file(const char *, const char *, const char *,
+ const char *, const char *, const char *,
+ const struct i_fn_args *);
+
+void fn_format_disk(struct i_fn_args *);
+void fn_install_bootblocks(struct i_fn_args *);
+void fn_wipe_start_of_disk(struct i_fn_args *);
+void fn_wipe_start_of_slice(struct i_fn_args *);
+void fn_format_msdos_floppy(struct i_fn_args *);
+void fn_create_cdboot_floppy(struct i_fn_args *);
+void fn_create_memtest86_floppy(struct i_fn_args *);
+
+int format_slice(struct i_fn_args *);
+int autopacket(struct disk *);
+
+void fn_create_subpartitions(struct i_fn_args *);
+void fn_install_os(struct i_fn_args *);
+
+/* Global variables */
+
+struct config_vars *rc_conf;
+
+#endif /* !__FN_H_ */
Index: contrib/bsdinstaller/src/backend/installer/fn_configure.c
===================================================================
RCS file: contrib/bsdinstaller/src/backend/installer/fn_configure.c
diff -N contrib/bsdinstaller/src/backend/installer/fn_configure.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/src/backend/installer/fn_configure.c 14 Jul 2007 14:21:18 -0000
@@ -0,0 +1,1418 @@
+/*
+ * Copyright (c)2004 The DragonFly Project. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the DragonFly Project nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * fn_configure.c
+ * Configuration functions for installer.
+ * This includes both Configure the LiveCD Environment, and
+ * Configure an Installed System (there is considerable overlap.)
+ * $Id: fn_configure.c,v 1.83 2005/08/26 22:44:36 cpressey Exp $
+ */
+
+#include
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#ifdef ENABLE_NLS
+#include
+#define _(String) gettext (String)
+#else
+#define _(String) (String)
+#endif
+
+#ifdef SYSTEM_AURA
+#include
+#include
+#include
+#else
+#include "mem.h"
+#include "dict.h"
+#include "fspred.h"
+#endif
+
+#ifdef SYSTEM_DFUI
+#include
+#include
+#else
+#include "dfui.h"
+#include "system.h"
+#endif
+
+#ifdef SYSTEM_LIBINSTALLER
+#include
+#include
+#include
+#include
+#include
+#include
+#else
+#include "commands.h"
+#include "confed.h"
+#include "diskutil.h"
+#include "functions.h"
+#include "package.h"
+#include "uiutil.h"
+#endif
+
+#include "fn.h"
+#include "pathnames.h"
+
+static const char *yes_to_y(const char *);
+static char *convert_swap_options(char *);
+
+/** CONFIGURE FUNCTIONS **/
+
+/*LabThug 2007-07-14: Everything in PW_NOT_ALLOWED CAN be used by passwd*/
+/*
+ * Original Line
+ * #define PW_NOT_ALLOWED ":;,`~!@#$%^&*()+={}[]\\|/?<>'\" "
+ * New Change : */
+#define PW_NOT_ALLOWED ""
+/*LabThug 2007-07-14: End Edit*/
+#define GECOS_NOT_ALLOWED ":,\\\""
+#define FILENAME_NOT_ALLOWED ":;`~!#$^&*()={}[]\\|?<>'\" "
+#define MEMBERSHIPS_NOT_ALLOWED ":;`~!@#$%^&*()+={}[]\\|/?<>'\" "
+
+void
+fn_add_user(struct i_fn_args *a)
+{
+ struct dfui_dataset *ds, *new_ds;
+ struct dfui_form *f;
+ struct dfui_response *r;
+ struct commands *cmds;
+ struct command *cmd;
+ const char *username, *home, *passwd_1, *passwd_2, *gecos;
+ const char *shell, *uid, *group, *groups;
+ int done = 0;
+
+ f = dfui_form_create(
+ "add_user",
+ _("Add user"),
+ _("Here you can add a user to an installed system.\n\n"
+ "You can leave the Home Directory, User ID, and Login Group "
+ "fields empty if you want these items to be automatically "
+ "allocated by the system.\n\n"
+ "Note: this user's password will appear in the install log. "
+ "If this is a problem, please add the user manually after "
+ "rebooting into the installed system instead."),
+ "",
+ "f", "username", _("Username"),
+ _("Enter the username the user will log in as"), "",
+ "f", "gecos", _("Real Name"),
+ _("Enter the real name (or GECOS field) of this user"), "",
+ "f", "passwd_1", _("Password"),
+ _("Enter the user's password (will not be displayed)"), "",
+ "p", "obscured", "true",
+ "f", "passwd_2", _("Password (Again)"),
+ _("Re-enter the user's password to confirm"), "",
+ "p", "obscured", "true",
+ "f", "shell", _("Shell"),
+ _("Enter the full path to the user's shell program"), "",
+ "f", "home", _("Home Directory"),
+ _("Enter the full path to the user's home directory, or leave blank"), "",
+ "f", "uid", _("User ID"),
+ _("Enter this account's numeric user id, or leave blank"), "",
+ "f", "group", _("Login Group"),
+ _("Enter the primary group for this account, or leave blank"), "",
+ "f", "groups", _("Other Group Memberships"),
+ _("Enter a comma-separated list of other groups "
+ "that this user should belong to"), "",
+ "a", "ok", _("Accept and Add"), "", "",
+ "a", "cancel", _("Return to Configure Menu"), "", "",
+ "p", "accelerator", "ESC",
+ NULL
+ );
+
+ ds = dfui_dataset_new();
+ dfui_dataset_celldata_add(ds, "username", "");
+ dfui_dataset_celldata_add(ds, "gecos", "");
+ dfui_dataset_celldata_add(ds, "passwd_1", "");
+ dfui_dataset_celldata_add(ds, "passwd_2", "");
+ dfui_dataset_celldata_add(ds, "shell", "/bin/tcsh");
+ dfui_dataset_celldata_add(ds, "home", "");
+ dfui_dataset_celldata_add(ds, "uid", "");
+ dfui_dataset_celldata_add(ds, "group", "");
+ dfui_dataset_celldata_add(ds, "groups", "");
+ dfui_form_dataset_add(f, ds);
+
+ while (!done) {
+ if (!dfui_be_present(a->c, f, &r))
+ abort_backend();
+
+ if (strcmp(dfui_response_get_action_id(r), "cancel") == 0) {
+ done = 1;
+ dfui_response_free(r);
+ break;
+ }
+
+ new_ds = dfui_dataset_dup(dfui_response_dataset_get_first(r));
+ dfui_form_datasets_free(f);
+ dfui_form_dataset_add(f, new_ds);
+
+ /* Fetch form field values. */
+
+ username = dfui_dataset_get_value(new_ds, "username");
+ home = dfui_dataset_get_value(new_ds, "home");
+ gecos = dfui_dataset_get_value(new_ds, "gecos");
+ shell = dfui_dataset_get_value(new_ds, "shell");
+ passwd_1 = dfui_dataset_get_value(new_ds, "passwd_1");
+ passwd_2 = dfui_dataset_get_value(new_ds, "passwd_2");
+ uid = dfui_dataset_get_value(new_ds, "uid");
+ group = dfui_dataset_get_value(new_ds, "group");
+ groups = dfui_dataset_get_value(new_ds, "groups");
+
+ if (strlen(username) == 0) {
+ inform(a->c, _("You must enter a username."));
+ done = 0;
+ } else if (strcmp(passwd_1, passwd_2) != 0) {
+ /* Passwords don't match; tell the user. */
+ inform(a->c, _("The passwords do not match."));
+ done = 0;
+ } else if (!assert_clean(a->c, _("Username"), username, PW_NOT_ALLOWED) ||
+ !assert_clean(a->c, _("Real Name"), gecos, GECOS_NOT_ALLOWED) ||
+ !assert_clean(a->c, _("Password"), passwd_1, PW_NOT_ALLOWED) ||
+ !assert_clean(a->c, _("Shell"), shell, FILENAME_NOT_ALLOWED) ||
+ !assert_clean(a->c, _("Home Directory"), home, FILENAME_NOT_ALLOWED) ||
+ !assert_clean(a->c, _("User ID"), uid, PW_NOT_ALLOWED) ||
+ !assert_clean(a->c, _("Login Group"), group, PW_NOT_ALLOWED) ||
+ !assert_clean(a->c, _("Group Memberships"), groups, MEMBERSHIPS_NOT_ALLOWED)) {
+ done = 0;
+ } else if (!is_program("%s%s", a->os_root, shell) &&
+ strcmp(shell, "/nonexistent") != 0) {
+ inform(a->c, _("Chosen shell does not exist on the system."));
+ done = 0;
+ } else {
+ cmds = commands_new();
+
+ command_add(cmds, "%s%s %smnt/ /%s useradd "
+ "'%s' %s%s %s%s -c \"%s\" %s%s -s %s %s%s %s",
+ a->os_root, cmd_name(a, "CHROOT"),
+ a->os_root, cmd_name(a, "PW"),
+ username,
+ strlen(uid) == 0 ? "" : "-u ", uid,
+ strlen(group) == 0 ? "" : "-g ", group,
+ gecos,
+ strlen(home) == 0 ? "" : "-d ", home,
+ shell,
+ strlen(groups) == 0 ? "" : "-G ", groups,
+ (strlen(home) == 0 || !is_dir(home)) ?
+ "-m -k /usr/share/skel" : "");
+
+ cmd = command_add(cmds, "%s%s '%s' | "
+ "%s%s %smnt/ /%s usermod '%s' -h 0",
+ a->os_root, cmd_name(a, "ECHO"),
+ passwd_1,
+ a->os_root, cmd_name(a, "CHROOT"),
+ a->os_root, cmd_name(a, "PW"),
+ username);
+ command_set_desc(cmd, _("Setting password..."));
+
+ if (commands_execute(a, cmds)) {
+ inform(a->c, _("User `%s' was added."), username);
+ done = 1;
+ } else {
+ inform(a->c, _("User was not successfully added."));
+ done = 0;
+ }
+
+ commands_free(cmds);
+ }
+
+ dfui_response_free(r);
+ }
+
+ dfui_form_free(f);
+}
+
+void
+fn_root_passwd(struct i_fn_args *a)
+{
+ struct dfui_dataset *ds, *new_ds;
+ struct dfui_form *f;
+ struct dfui_response *r;
+ struct commands *cmds;
+ struct command *cmd;
+ const char *root_passwd_1, *root_passwd_2;
+ int done = 0;
+
+ f = dfui_form_create(
+ "root_passwd",
+ _("Set Root Password"),
+ _("Here you can set the super-user (root) password.\n\n"
+ "Note: root's new password will appear in the install log. "
+ "If this is a problem, please set root's password manually "
+ "after rebooting into the installed system instead."),
+ "",
+
+ "f", "root_passwd_1", _("Root password"),
+ _("Enter the root password you would like to use"), "",
+ "p", "obscured", "true",
+ "f", "root_passwd_2", _("Root password again"),
+ _("Enter the root password again to confirm"), "",
+ "p", "obscured", "true",
+
+ "a", "ok", _("Accept and Set Password"), "", "",
+ "a", "cancel", _("Return to Configure Menu"), "", "",
+ "p", "accelerator", "ESC",
+
+ NULL
+ );
+
+ ds = dfui_dataset_new();
+ dfui_dataset_celldata_add(ds, "root_passwd_1", "");
+ dfui_dataset_celldata_add(ds, "root_passwd_2", "");
+ dfui_form_dataset_add(f, ds);
+
+ while (!done) {
+ if (!dfui_be_present(a->c, f, &r))
+ abort_backend();
+
+ if (strcmp(dfui_response_get_action_id(r), "ok") == 0) {
+ new_ds = dfui_dataset_dup(dfui_response_dataset_get_first(r));
+ dfui_form_datasets_free(f);
+ dfui_form_dataset_add(f, new_ds);
+
+ /*
+ * Fetch form field values.
+ */
+
+ root_passwd_1 = dfui_dataset_get_value(new_ds, "root_passwd_1");
+ root_passwd_2 = dfui_dataset_get_value(new_ds, "root_passwd_2");
+
+ if (!assert_clean(a->c, _("Root password"), root_passwd_1, PW_NOT_ALLOWED)) {
+ done = 0;
+ } else if (strlen(root_passwd_1) == 0 && strlen(root_passwd_2) == 0) {
+ done = 0;
+ } else if (strcmp(root_passwd_1, root_passwd_2) == 0) {
+ /*
+ * Passwords match, so set the root password.
+ */
+ cmds = commands_new();
+ cmd = command_add(cmds, "%s%s '%s' | "
+ "%s%s %smnt/ /%s usermod root -h 0",
+ a->os_root, cmd_name(a, "ECHO"),
+ root_passwd_1,
+ a->os_root, cmd_name(a, "CHROOT"),
+ a->os_root, cmd_name(a, "PW"));
+ command_set_desc(cmd, _("Setting password..."));
+ if (commands_execute(a, cmds)) {
+ inform(a->c, _("The root password has been changed."));
+ done = 1;
+ } else {
+ inform(a->c, _("An error occurred when "
+ "setting the root password."));
+ done = 0;
+ }
+ commands_free(cmds);
+ } else {
+ /*
+ * Passwords don't match - tell the user, let them try again.
+ */
+ inform(a->c, _("The passwords do not match."));
+ done = 0;
+ }
+ } else {
+ /*
+ * Cancelled by user
+ */
+ done = 1;
+ }
+
+ dfui_response_free(r);
+ }
+
+ dfui_form_free(f);
+}
+
+void
+fn_cvsup_sources(struct i_fn_args *a)
+{
+ struct commands *cmds;
+
+ inform(a->c, _("The system has issued a cvsup command in the background.\n\nPlease tail /tmp/cvsupdate.log if you wish to follow the progress."));
+
+ // TODO: This needs a lot more work.
+
+ cmds = commands_new();
+ command_add(cmds, "%s%s -h cvsup.dragonflybsd.com -b /usr "
+ "/usr/share/examples/cvsup/DragonFly-supfile >/tmp/cvsupdate.log",
+ a->os_root, cmd_name(a, "CVSUP"));
+ if (!commands_execute(a, cmds))
+ inform(a->c, _("Warning: could not launch cvsup"));
+
+ commands_free(cmds);
+}
+
+void
+fn_install_packages(struct i_fn_args *a)
+{
+ FILE *pipe;
+ struct commands *cmds;
+ struct dfui_celldata *cd;
+ struct dfui_dataset *ds;
+ struct dfui_field *fi;
+ struct dfui_form *f;
+ struct dfui_response *r;
+ char command[256];
+ char pkg_name[256];
+ char msg_buf[1][1024];
+ struct aura_dict *seen;
+
+ snprintf(msg_buf[0], sizeof(msg_buf[0]),
+ _("Select optional software packages that you want "
+ "installed on this system. This form lists only the "
+ "software packages installed on the LiveCD; thousands "
+ "more are available via the internet once %s "
+ "is installed."),
+ OPERATING_SYSTEM_NAME);
+
+ f = dfui_form_create(
+ "install_packages",
+ _("Install Packages"),
+ msg_buf[0],
+ "",
+
+ "p", "special", "dfinstaller_install_packages",
+
+ NULL
+ );
+
+ ds = dfui_dataset_new();
+ snprintf(command, 256, "ls %svar/db/pkg", a->os_root);
+ if ((pipe = popen(command, "r")) != NULL) {
+ while (fgets(pkg_name, 255, pipe) != NULL) {
+ while (strlen(pkg_name) > 0 &&
+ isspace(pkg_name[strlen(pkg_name) - 1])) {
+ pkg_name[strlen(pkg_name) - 1] = '\0';
+ }
+ fi = dfui_form_field_add(f, pkg_name,
+ dfui_info_new(pkg_name, "", ""));
+ dfui_field_property_set(fi, "control", "checkbox");
+ dfui_dataset_celldata_add(ds,
+ pkg_name, "Y");
+ }
+ pclose(pipe);
+ }
+ dfui_form_dataset_add(f, ds);
+
+ dfui_form_action_add(f, "ok",
+ dfui_info_new(_("Accept and Install"), "", ""));
+ dfui_form_action_add(f, "cancel",
+ dfui_info_new(_("Return to Configure Menu"), "", ""));
+
+ if (!dfui_be_present(a->c, f, &r))
+ abort_backend();
+
+ if (strcmp(dfui_response_get_action_id(r), "ok") == 0) {
+ cmds = commands_new();
+ seen = aura_dict_new(23, AURA_DICT_HASH);
+
+ cd = dfui_dataset_celldata_get_first(dfui_response_dataset_get_first(r));
+
+ while (cd != NULL) {
+ strlcpy(pkg_name, dfui_celldata_get_field_id(cd), 256);
+ if (!strcasecmp(dfui_celldata_get_value(cd), "Y")) {
+ if (!pkg_copy(a, cmds, pkg_name, seen)) {
+ inform(a->c, _("Couldn't install package `%s'."), pkg_name);
+ break;
+ }
+ }
+ cd = dfui_celldata_get_next(cd);
+ }
+
+ if (!commands_execute(a, cmds)) {
+ inform(a->c, _("Packages were not fully installed."));
+ } else {
+ inform(a->c, _("Packages were successfully installed!"));
+ }
+
+ aura_dict_free(seen);
+ commands_free(cmds);
+ }
+
+ dfui_form_free(f);
+ dfui_response_free(r);
+}
+
+void
+fn_remove_packages(struct i_fn_args *a)
+{
+ FILE *pipe;
+ struct commands *cmds;
+ struct dfui_celldata *cd;
+ struct dfui_dataset *ds;
+ struct dfui_field *fi;
+ struct dfui_form *f;
+ struct dfui_response *r;
+ char command[256];
+ char pkg_name[256];
+ struct aura_dict *seen;
+
+ f = dfui_form_create(
+ "remove_packages",
+ _("Remove Packages"),
+ _("Select the installed software packages that you want "
+ "removed from this system."),
+ "",
+
+ "p", "special", "dfinstaller_remove_packages",
+
+ NULL
+ );
+
+ ds = dfui_dataset_new();
+ snprintf(command, 256, "ls %smnt/var/db/pkg", a->os_root);
+ if ((pipe = popen(command, "r")) != NULL) {
+ while (fgets(pkg_name, 255, pipe)) {
+ pkg_name[strlen(pkg_name) - 1] = '\0';
+ fi = dfui_form_field_add(f, pkg_name,
+ dfui_info_new(pkg_name, "", ""));
+ dfui_field_property_set(fi, "control", "checkbox");
+ dfui_dataset_celldata_add(ds,
+ pkg_name, "N");
+ }
+ pclose(pipe);
+ }
+ dfui_form_dataset_add(f, ds);
+
+ dfui_form_action_add(f, "ok",
+ dfui_info_new(_("Accept and Remove"), "", ""));
+ dfui_form_action_add(f, "cancel",
+ dfui_info_new(_("Return to Configure Menu"), "", ""));
+
+ if (!dfui_be_present(a->c, f, &r))
+ abort_backend();
+
+ if (strcmp(dfui_response_get_action_id(r), "ok") == 0) {
+ cmds = commands_new();
+ seen = aura_dict_new(23, AURA_DICT_HASH);
+
+ cd = dfui_dataset_celldata_get_first(dfui_response_dataset_get_first(r));
+
+ while (cd != NULL) {
+ strlcpy(pkg_name, dfui_celldata_get_field_id(cd), 256);
+ if (!strcasecmp(dfui_celldata_get_value(cd), "Y")) {
+ if (!pkg_remove(a, cmds, pkg_name, seen)) {
+ inform(a->c, _("Couldn't remove package `%s'."), pkg_name);
+ break;
+ }
+ }
+ cd = dfui_celldata_get_next(cd);
+ }
+
+ if (!commands_execute(a, cmds)) {
+ inform(a->c, _("Packages were not fully removed."));
+ } else {
+ inform(a->c, _("Packages were successfully removed."));
+ }
+
+ aura_dict_free(seen);
+ commands_free(cmds);
+ }
+
+ dfui_form_free(f);
+ dfui_response_free(r);
+}
+
+/** LIVECD UTILITIES FUNCTIONS **/
+
+/*
+ * String returned by this function must be deallocated by the caller.
+ */
+char *
+fn_select_file(const char *title, const char *desc, const char *help, const char *cancel,
+ const char *dir, const char *ext, const struct i_fn_args *a)
+{
+ DIR *d;
+ struct dfui_form *f;
+ struct dfui_action *k;
+ struct dfui_response *r;
+ struct dirent *de;
+ char *s;
+ struct aura_dict *dict;
+ char *rk;
+ size_t rk_len;
+
+ f = dfui_form_create(
+ "select_file",
+ title, desc, help,
+ "p", "role", "menu",
+ NULL
+ );
+
+ dict = aura_dict_new(1, AURA_DICT_SORTED_LIST);
+ d = opendir(dir);
+ while ((de = readdir(d)) != NULL) {
+ if (strcmp(de->d_name, ".") == 0 ||
+ strcmp(de->d_name, "..") == 0 ||
+ strstr(de->d_name, ext) == NULL)
+ continue;
+ aura_dict_store(dict, de->d_name, strlen(de->d_name) + 1, "", 1);
+ }
+ closedir(d);
+
+ aura_dict_rewind(dict);
+ while (!aura_dict_eof(dict)) {
+ aura_dict_get_current_key(dict, (void **)&rk, &rk_len),
+ dfui_form_action_add(f, rk,
+ dfui_info_new(rk, "", ""));
+ aura_dict_next(dict);
+ }
+ aura_dict_free(dict);
+
+ k = dfui_form_action_add(f, "cancel",
+ dfui_info_new(cancel, "", ""));
+ dfui_action_property_set(k, "accelerator", "ESC");
+
+ if (!dfui_be_present(a->c, f, &r))
+ abort_backend();
+
+ s = aura_strdup(dfui_response_get_action_id(r));
+
+ dfui_form_free(f);
+ dfui_response_free(r);
+
+ return(s);
+}
+
+void
+fn_set_kbdmap(struct i_fn_args *a)
+{
+ struct commands *cmds;
+ char *s;
+ char filename[256], keymapname[256];
+
+ s = fn_select_file(_("Select Keyboard Map"),
+ _("Select a keyboard map appropriate to your keyboard layout."),
+ "", _("Return to Utilities Menu"), "/usr/share/syscons/keymaps",
+ ".kbd", a);
+
+ if (strcmp(s, "cancel") != 0) {
+ cmds = commands_new();
+ command_add(cmds, "%s%s -l "
+ "/usr/share/syscons/keymaps/%s < /dev/ttyv0",
+ a->os_root, cmd_name(a, "KBDCONTROL"),
+ s);
+ if (commands_execute(a, cmds)) {
+ snprintf(filename, 256, "/usr/share/syscons/keymaps/%s", s);
+ snprintf(keymapname, 256, filename_noext(basename(filename)));
+ config_var_set(rc_conf, "keymap", keymapname);
+ } else {
+ inform(a->c, _("Keyboard map not successfully set."));
+ }
+ commands_free(cmds);
+ }
+
+ free(s);
+}
+
+void
+fn_set_vidfont(struct i_fn_args *a)
+{
+ struct commands *cmds;
+ char *s;
+ char filename[256], variable[256], fontname[256];
+ int by = 0;
+
+
+ s = fn_select_file(_("Select Console Font"),
+ _("Select a font appropriate to your video monitor and language."),
+ "", _("Return to Utilities Menu"), "/usr/share/syscons/fonts",
+ ".fnt", a);
+
+ if (strcmp(s, "cancel") != 0) {
+ cmds = commands_new();
+ command_add(cmds, "%s%s -f "
+ "/usr/share/syscons/fonts/%s < /dev/ttyv0",
+ a->os_root, cmd_name(a, "VIDCONTROL"),
+ s);
+ if (commands_execute(a, cmds)) {
+ if (strstr(s, "8x16") != NULL)
+ by = 16;
+ else if (strstr(s, "8x14") != NULL)
+ by = 14;
+ else
+ by = 8;
+
+ snprintf(variable, 256, "font8x%d", by);
+ snprintf(filename, 256, "/usr/share/syscons/fonts/%s", s);
+ snprintf(fontname, 256, filename_noext(basename(filename)));
+ config_var_set(rc_conf, variable, fontname);
+
+ } else {
+ inform(a->c, _("Video font not successfully set."));
+ }
+ commands_free(cmds);
+ }
+
+ free(s);
+}
+
+void
+fn_set_scrnmap(struct i_fn_args *a)
+{
+ struct commands *cmds;
+ char *s;
+ char filename[256], scrnmapname[256];
+
+ s = fn_select_file(_("Select Screen Map"),
+ _("Select a mapping for translating characters as they appear "
+ "on your video console screen."),
+ "", _("Return to Utilities Menu"), "/usr/share/syscons/scrnmaps",
+ ".scm", a);
+
+ if (strcmp(s, "cancel") != 0) {
+ cmds = commands_new();
+ command_add(cmds, "%s%s -l "
+ "/usr/share/syscons/scrnmaps/%s < /dev/ttyv0",
+ a->os_root, cmd_name(a, "VIDCONTROL"),
+ s);
+ if (commands_execute(a, cmds)) {
+ snprintf(filename, 256, "/usr/share/syscons/scrnmaps/%s", s);
+ snprintf(scrnmapname, 256, filename_noext(basename(filename)));
+ config_var_set(rc_conf, "scrnmap", scrnmapname);
+ } else {
+ inform(a->c, _("Video font not successfully set."));
+ }
+ commands_free(cmds);
+ }
+ free(s);
+}
+
+void
+fn_set_timezone(struct i_fn_args *a)
+{
+ struct commands *cmds;
+ char *s = NULL;
+ char current_path[256], selection[256], temp[256];
+ int found_file = 0;
+
+ cmds = commands_new();
+
+ switch (dfui_be_present_dialog(a->c, _("Local or UTC (Greenwich Mean Time) clock"),
+ _("Yes|No"),
+ _("Is this machine's CMOS clock set to UTC?\n"),
+ _("If it is set to local time, or you don't know, please choose NO here!"))) {
+ case 1:
+ cmds = commands_new();
+ command_add(cmds, "%s%s %s%setc/wall_cmos_clock",
+ a->os_root, cmd_name(a, "TOUCH"),
+ a->os_root, a->cfg_root);
+ commands_execute(a, cmds);
+ }
+
+ snprintf(current_path, 256, "%s%susr/share/zoneinfo",
+ a->os_root, a->cfg_root);
+ while (!found_file) {
+ if (s != NULL)
+ free(s);
+ s = fn_select_file(_("Select Time Zone"),
+ _("Select a Time Zone appropriate to your physical location."),
+ "", _("Return to Utilities Menu"), current_path,
+ "", a);
+ if (is_dir("%s/%s", current_path, s)) {
+ snprintf(temp, 256, "%s/%s", current_path, s);
+ strlcpy(current_path, temp, 256);
+ } else {
+ if (is_file("%s/%s", current_path, s)) {
+ snprintf(selection, 256, "%s/%s", current_path, s);
+ found_file = 1;
+ }
+ if (strcmp(s, "cancel") == 0) {
+ strlcpy(selection, "cancel", 256);
+ found_file = 1;
+ }
+ }
+ }
+ free(s);
+
+ if (strcmp(selection, "cancel") != 0) {
+ command_add(cmds, "%s%s %s %s%setc/localtime",
+ a->os_root, cmd_name(a, "CP"),
+ selection,
+ a->os_root, a->cfg_root);
+ if (commands_execute(a, cmds))
+ inform(a->c, _("The Time Zone has been set to %s."), selection);
+ }
+ commands_free(cmds);
+}
+
+void
+fn_assign_datetime(struct i_fn_args *a)
+{
+ struct commands *cmds;
+ struct dfui_dataset *ds, *new_ds;
+ struct dfui_form *f;
+ struct dfui_response *r;
+ struct tm *tp;
+ char temp[256];
+ int year, month, dayofmonth, hour, minutes;
+ int valid = 1;
+ time_t now;
+
+ now = time(NULL);
+ tp = localtime(&now);
+
+ f = dfui_form_create(
+ "set_datetime",
+ _("Set Time/Date"),
+ _("Enter the current time and date."),
+ "",
+
+ "f", "year", _("Enter year"),
+ _("Enter the current year (e.g. `2004')"), "",
+ "f", "month", _("Month"),
+ _("Enter the current month (e.g. `07')"), "",
+ "f", "dayofmonth", "dayofmonth",
+ _("Enter the current day of month (e.g. `30')"), "",
+ "f", "hour", "hour",
+ _("Enter the current hour (e.g. `07')"), "",
+ "f", "minutes", "minutes",
+ _("Enter the current minutes (e.g. `59')"), "",
+
+ "a", "ok", _("OK"), "", "",
+ "a", "cancel", _("Cancel"), "", "",
+ "p", "accelerator", "ESC",
+
+ NULL
+ );
+
+ ds = dfui_dataset_new();
+ snprintf(temp, 256, "%i", (tp->tm_year+1900));
+ dfui_dataset_celldata_add(ds, "year", temp);
+ snprintf(temp, 256, "%i", (tp->tm_mon+1));
+ dfui_dataset_celldata_add(ds, "month", temp);
+ snprintf(temp, 256, "%i", tp->tm_mday);
+ dfui_dataset_celldata_add(ds, "dayofmonth", temp);
+ snprintf(temp, 256, "%i", tp->tm_hour);
+ dfui_dataset_celldata_add(ds, "hour", temp);
+ snprintf(temp, 256, "%i", tp->tm_min);
+ dfui_dataset_celldata_add(ds, "minutes", temp);
+ dfui_form_dataset_add(f, ds);
+
+ if (!dfui_be_present(a->c, f, &r))
+ abort_backend();
+
+ if (strcmp(dfui_response_get_action_id(r), "ok") == 0) {
+ new_ds = dfui_response_dataset_get_first(r);
+
+ if ((year = atoi(dfui_dataset_get_value(new_ds, "year"))) <= 0)
+ valid = 0;
+ month = atoi(dfui_dataset_get_value(new_ds, "month"));
+ if (month < 1 || month > 12)
+ valid = 0;
+ dayofmonth = atoi(dfui_dataset_get_value(new_ds, "dayofmonth"));
+ if (dayofmonth < 1 || dayofmonth > 31)
+ valid = 0;
+ hour = atoi(dfui_dataset_get_value(new_ds, "hour"));
+ if (hour < 0 || hour > 23)
+ valid = 0;
+ minutes = atoi(dfui_dataset_get_value(new_ds, "minutes"));
+ if (minutes < 0 || minutes > 59)
+ valid = 0;
+
+ if (valid) {
+ cmds = commands_new();
+ command_add(cmds, "%s%s -n %04d%02d%02d%02d%02d",
+ a->os_root, cmd_name(a, "DATE"),
+ year, month, dayofmonth, hour, minutes);
+ if (commands_execute(a, cmds)) {
+ inform(a->c, _("The date and time have been set."));
+ }
+ commands_free(cmds);
+ } else {
+ inform(a->c, _("Please enter numbers within acceptable ranges "
+ "for year, month, day of month, hour, and minute."));
+ }
+ }
+}
+
+void
+fn_assign_hostname_domain(struct i_fn_args *a)
+{
+ struct dfui_form *f;
+ struct dfui_response *r;
+ struct dfui_dataset *ds, *new_ds;
+ struct config_vars *resolv_conf;
+ const char *domain, *hostname;
+ char *fqdn;
+
+ f = dfui_form_create(
+ "set_hostname_domain",
+ _("Set Hostname/Domain"),
+ _("Please enter this machine's hostname and domain name."),
+ "",
+
+ "f", "hostname", _("Hostname"),
+ _("Enter the Hostname (e.g. `machine')"), "",
+ "f", "domain", _("Domain"),
+ _("Enter the Domain Name (e.g. `network.lan')"), "",
+
+ "a", "ok", _("OK"), "", "",
+ "a", "cancel", _("Cancel"), "", "",
+ "p", "accelerator", "ESC",
+
+ NULL
+ );
+
+ ds = dfui_dataset_new();
+ dfui_dataset_celldata_add(ds, "hostname", "");
+ dfui_dataset_celldata_add(ds, "domain", "");
+ dfui_form_dataset_add(f, ds);
+
+ if (!dfui_be_present(a->c, f, &r))
+ abort_backend();
+
+ if (strcmp(dfui_response_get_action_id(r), "ok") == 0) {
+ new_ds = dfui_response_dataset_get_first(r);
+
+ hostname = dfui_dataset_get_value(new_ds, "hostname");
+ domain = dfui_dataset_get_value(new_ds, "domain");
+ asprintf(&fqdn, "%s.%s", hostname, domain);
+
+ resolv_conf = config_vars_new();
+
+ config_var_set(rc_conf, "hostname", fqdn);
+ config_var_set(resolv_conf, "search", domain);
+ config_vars_write(resolv_conf, CONFIG_TYPE_RESOLV,
+ "%s%setc/resolv.conf", "/", a->cfg_root);
+
+ config_vars_free(resolv_conf);
+
+ free(fqdn);
+ }
+
+ dfui_form_free(f);
+ dfui_response_free(r);
+}
+
+void
+fn_assign_ip(struct i_fn_args *a)
+{
+ FILE *p;
+ struct commands *cmds;
+ struct command *cmd;
+ struct config_vars *resolv_conf;
+ struct dfui_dataset *ds, *new_ds;
+ struct dfui_form *f;
+ struct dfui_action *k;
+ struct dfui_response *r;
+ const char *domain, *hostname;
+ const char *interface_ip, *interface_netmask, *defaultrouter, *dns_resolver;
+ char *string, *string1;
+ char *word;
+ char interface[256];
+ char line[256];
+ int write_config = 0;
+
+ /*
+ * Get interface list.
+ */
+ p = popen("/sbin/ifconfig -l", "r");
+ /* XXX it's possible (though extremely unlikely) this will fail. */
+ while (fgets(line, 255, p) != NULL)
+ line[strlen(line) - 1] = '\0';
+
+ pclose(p);
+
+ f = dfui_form_create(
+ "assign_ip",
+ _("Assign IP Address"),
+ _("Please select which interface you would like to configure:"),
+ "",
+ "p", "role", "menu",
+ NULL
+ );
+
+ /* Loop through array. */
+ word = strtok(line, " \t");
+ while (word != NULL) {
+ dfui_form_action_add(f, word,
+ dfui_info_new(word, "", ""));
+ word = strtok(NULL, " ");
+ }
+
+ k = dfui_form_action_add(f, "cancel",
+ dfui_info_new("Cancel", "", ""));
+ dfui_action_property_set(k, "accelerator", "ESC");
+
+ if (!dfui_be_present(a->c, f, &r))
+ abort_backend();
+
+ if (strcmp(dfui_response_get_action_id(r), "cancel") == 0) {
+ dfui_form_free(f);
+ dfui_response_free(r);
+ return;
+ }
+
+ strlcpy(interface, dfui_response_get_action_id(r), 256);
+
+ resolv_conf = config_vars_new();
+
+ switch (dfui_be_present_dialog(a->c, _("Use DHCP?"),
+ _("Use DHCP|Configure Manually"),
+ _("DHCP allows the interface to automatically obtain "
+ "an IP address from a nearby DHCP server.\n\n"
+ "Would you like to enable DHCP for this interface?"))) {
+ case 1:
+ cmds = commands_new();
+ cmd = command_add(cmds, "%s%s dhclient",
+ a->os_root, cmd_name(a, "KILLALL"));
+ command_set_failure_mode(cmd, COMMAND_FAILURE_IGNORE);
+ command_add(cmds, "%s%s -1 %s",
+ a->os_root, cmd_name(a, "DHCLIENT"),
+ interface);
+ if (commands_execute(a, cmds)) {
+ /* XXX sleep(3); */
+ show_ifconfig(a->c, interface);
+ write_config = 1;
+ } else {
+ switch (dfui_be_present_dialog(a->c, _("DHCP Failure"),
+ _("Yes|No"),
+ _("Warning: could not enable dhclient for %s.\n\n"
+ "Write the corresponding settings to rc.conf "
+ "anyway?"), interface)) {
+ case 1:
+ write_config = 1;
+ break;
+ case 2:
+ write_config = 0;
+ break;
+ default:
+ abort_backend();
+ }
+ }
+ commands_free(cmds);
+ asprintf(&string, "ifconfig_%s", interface);
+ config_var_set(rc_conf, string, "DHCP");
+ free(string);
+ break;
+ case 2:
+ dfui_form_free(f);
+ dfui_response_free(r);
+ f = dfui_form_create(
+ "assign_ip",
+ _("Assign IP Address"),
+ _("Configuring Interface:"),
+ "",
+
+ "f", "interface_ip", _("IP Address"),
+ _("Enter the IP Address you would like to use"), "",
+ "f", "interface_netmask", _("Netmask"),
+ _("Enter the netmask of the IP address"), "",
+ "f", "defaultrouter", _("Default Router"),
+ _("Enter the IP address of the default router"), "",
+ "f", "dns_resolver", _("Primary DNS Server"),
+ _("Enter the IP address of primary DNS Server"), "",
+ "f", "hostname", _("Hostname"),
+ _("Enter the Hostname"), "",
+ "f", "domain", _("Domain"),
+ _("Enter the Domain Name"), "",
+
+ "a", "ok", _("Configure Interface"),
+ "", "",
+ "a", "cancel", _("Return to Utilities Menu"),
+ "", "",
+ "p", "accelerator", "ESC",
+
+ NULL
+ );
+
+ ds = dfui_dataset_new();
+ dfui_dataset_celldata_add(ds, "interface_netmask", "");
+ dfui_dataset_celldata_add(ds, "defaultrouter", "");
+ dfui_dataset_celldata_add(ds, "dns_resolver", "");
+ dfui_dataset_celldata_add(ds, "hostname", "");
+ dfui_dataset_celldata_add(ds, "domain", "");
+ dfui_dataset_celldata_add(ds, "interface_ip", "");
+ dfui_form_dataset_add(f, ds);
+
+ if (!dfui_be_present(a->c, f, &r))
+ abort_backend();
+
+ if (strcmp(dfui_response_get_action_id(r), "ok") == 0) {
+ new_ds = dfui_response_dataset_get_first(r);
+
+ interface_ip = dfui_dataset_get_value(new_ds, "interface_ip");
+ interface_netmask = dfui_dataset_get_value(new_ds, "interface_netmask");
+ defaultrouter = dfui_dataset_get_value(new_ds, "defaultrouter");
+ dns_resolver = dfui_dataset_get_value(new_ds, "dns_resolver");
+ hostname = dfui_dataset_get_value(new_ds, "hostname");
+ domain = dfui_dataset_get_value(new_ds, "domain");
+
+ cmds = commands_new();
+ command_add(cmds, "%s%s %s %s netmask %s",
+ a->os_root, cmd_name(a, "IFCONFIG"),
+ interface, interface_ip, interface_netmask);
+ command_add(cmds, "%s%s add default %s",
+ a->os_root, cmd_name(a, "ROUTE"),
+ defaultrouter);
+
+ if (commands_execute(a, cmds)) {
+ /* XXX sleep(3); */
+ show_ifconfig(a->c, interface);
+ write_config = 1;
+ } else {
+ switch (dfui_be_present_dialog(a->c,
+ _("ifconfig Failure"),
+ _("Yes|No"),
+ _("Warning: could not assign IP address "
+ "or default gateway.\n\n"
+ "Write the corresponding settings to "
+ "rc.conf anyway?"))) {
+ case 1:
+ write_config = 1;
+ break;
+ case 2:
+ write_config = 0;
+ break;
+ default:
+ abort_backend();
+ }
+ }
+ commands_free(cmds);
+
+ asprintf(&string, "ifconfig_%s", interface);
+ asprintf(&string1, "inet %s netmask %s",
+ interface_ip, interface_netmask);
+
+ config_var_set(rc_conf, string, string1);
+ config_var_set(rc_conf, "defaultrouter", defaultrouter);
+
+ free(string);
+ free(string1);
+
+ asprintf(&string, "%s.%s", hostname, domain);
+ config_var_set(rc_conf, "hostname", string);
+ free(string);
+
+ config_var_set(resolv_conf, "search", domain);
+ config_var_set(resolv_conf, "nameserver", dns_resolver);
+ }
+ break;
+ default:
+ abort_backend();
+ }
+
+ if (write_config) {
+ /*
+ * Save out changes to /etc/rc.conf and /etc/resolv.conf.
+ */
+ config_vars_write(resolv_conf, CONFIG_TYPE_RESOLV,
+ "%s%setc/resolv.conf", a->os_root, a->cfg_root);
+ }
+
+ config_vars_free(resolv_conf);
+
+ dfui_form_free(f);
+ dfui_response_free(r);
+}
+
+static const char *
+yes_to_y(const char *value)
+{
+ return(strcasecmp(value, "YES") == 0 ? "Y" : "N");
+}
+
+void
+fn_select_services(struct i_fn_args *a)
+{
+ struct dfui_dataset *ds;
+ struct dfui_form *f;
+ struct dfui_response *r;
+
+ if (!config_vars_read(a, rc_conf, CONFIG_TYPE_SH, "%setc/rc.conf", a->cfg_root)) {
+ inform(a->c, _("Couldn't read %s%setc/rc.conf."),
+ a->os_root, a->cfg_root);
+ a->result = 0;
+ return;
+ }
+
+ f = dfui_form_create(
+ "select_services",
+ _("Select Services"),
+ _("Please select which services you would like started at boot time."),
+ "",
+
+ "f", "syslogd", "syslogd",
+ _("System Logging Daemon"), "",
+ "p", "control", "checkbox",
+ "f", "inetd", "inetd",
+ _("Internet Super-Server"), "",
+ "p", "control", "checkbox",
+ "f", "named", "named",
+ _("BIND Name Server"), "",
+ "p", "control", "checkbox",
+ "f", "ntpd", "ntpd",
+ _("Network Time Protocol Daemon"), "",
+ "p", "control", "checkbox",
+ "f", "sshd", "sshd",
+ _("Secure Shell Daemon"), "",
+ "p", "control", "checkbox",
+
+ "a", "ok", _("Enable/Disable Services"),
+ "", "",
+ "a", "cancel", _("Return to Utilities Menu"),
+ "", "",
+ "p", "accelerator", "ESC",
+
+ NULL
+ );
+
+ ds = dfui_dataset_new();
+ dfui_dataset_celldata_add(ds, "syslogd",
+ yes_to_y(config_var_get(rc_conf, "syslogd_enable")));
+ dfui_dataset_celldata_add(ds, "inetd",
+ yes_to_y(config_var_get(rc_conf, "inetd_enable")));
+ dfui_dataset_celldata_add(ds, "named",
+ yes_to_y(config_var_get(rc_conf, "named_enable")));
+ dfui_dataset_celldata_add(ds, "ntpd",
+ yes_to_y(config_var_get(rc_conf, "ntpd_enable")));
+ dfui_dataset_celldata_add(ds, "sshd",
+ yes_to_y(config_var_get(rc_conf, "sshd_enable")));
+ dfui_form_dataset_add(f, ds);
+
+ if (!dfui_be_present(a->c, f, &r))
+ abort_backend();
+
+ if (strcmp(dfui_response_get_action_id(r), "cancel") == 0) {
+ dfui_form_free(f);
+ dfui_response_free(r);
+ return;
+ }
+
+ dfui_form_free(f);
+ dfui_response_free(r);
+}
+
+/*** NON-fn_ FUnCTIONS ***/
+
+/*
+ * Caller is responsible for deallocation.
+ */
+static char *
+convert_swap_options(char *line)
+{
+ char *result, *word;
+ int i;
+
+ result = malloc(256);
+ result[0] = '\0';
+
+ for (; (word = strsep(&line, ",")) != NULL; ) {
+ if (word[0] == '-') {
+ /*
+ * Don't bother trying to honour the -C
+ * option, since we can't copy files from
+ * the right place anyway.
+ */
+ if (strcmp(word, "-C") != 0) {
+ for (i = 0; word[i] != '\0'; i++) {
+ if (word[i] == '=')
+ word[i] = ' ';
+ }
+ strlcat(result, word, 256);
+ strlcat(result, " ", 256);
+ }
+ }
+ }
+
+ return(result);
+}
+
+/*
+ * Uses ss->selected_{disk,slice} as the target system.
+ */
+int
+mount_target_system(struct i_fn_args *a)
+{
+ FILE *fstab;
+ struct commands *cmds;
+ struct subpartition *a_subpart;
+ char device[256], mtpt[256], fstype[256], options[256];
+ char *filename, line[256];
+ const char *try_mtpt[5] = {"/var", "/tmp", "/usr", "/home", NULL};
+ char *word, *cvtoptions;
+ int i;
+
+ /*
+ * Mount subpartitions from this installation if they are
+ * not already mounted. Tricky, as we need to honour the
+ * installation's fstab.
+ */
+ cmds = commands_new();
+
+ /*
+ * First, unmount anything already mounted on /mnt.
+ */
+ unmount_all_under(a, cmds, "%smnt", a->os_root);
+
+ /*
+ * Reset and clear out subpartitions so that system
+ * can make a "dummy" subpart.
+ */
+ subpartitions_free(storage_get_selected_slice(a->s));
+
+ /*
+ * Create a temporary dummy subpartition - that we
+ * assume exists - for the benefit of ensure_dev et al.
+ */
+
+ a_subpart = subpartition_new(storage_get_selected_slice(a->s),
+ "/dummy", 0, 0, 0, 0, 0);
+
+ /*
+ * Ensure that the devices we'll be using exist.
+ */
+ command_add_ensure_dev(a, cmds,
+ disk_get_device_name(storage_get_selected_disk(a->s)));
+ command_add_ensure_dev(a, cmds,
+ slice_get_device_name(storage_get_selected_slice(a->s)));
+ command_add_ensure_dev(a, cmds,
+ subpartition_get_device_name(a_subpart));
+
+ /*
+ * Mount the target's / and read its /etc/fstab.
+ */
+ command_add(cmds, "%s%s %sdev/%s %s%s",
+ a->os_root, cmd_name(a, "MOUNT"),
+ a->os_root,
+ subpartition_get_device_name(a_subpart),
+ a->os_root, a->cfg_root);
+ if (!commands_execute(a, cmds)) {
+ commands_free(cmds);
+ return(0);
+ }
+ commands_free(cmds);
+
+ /*
+ * Get rid of the dummy subpartition.
+ */
+ subpartitions_free(storage_get_selected_slice(a->s));
+
+ asprintf(&filename, "%s%s/etc/fstab", a->os_root, a->cfg_root);
+ fstab = fopen(filename, "r");
+ free(filename);
+ if (fstab == NULL) {
+ inform(a->c, _("Filesystem table on installed system could not be read."));
+ cmds = commands_new();
+ command_add(cmds, "%s%s %s%s",
+ a->os_root, cmd_name(a, "UMOUNT"),
+ a->os_root, a->cfg_root);
+ if (!commands_execute(a, cmds)) {
+ inform(a->c, _("Warning: Installed system was not properly unmounted."));
+ }
+ commands_free(cmds);
+ return(0);
+ }
+
+ cmds = commands_new();
+
+ while (fgets(line, 256, fstab) != NULL) {
+ /*
+ * Parse the fstab line.
+ */
+ if (first_non_space_char_is(line, '#'))
+ continue;
+ if ((word = strtok(line, " \t")) == NULL)
+ continue;
+ strlcpy(device, word, 256);
+ if ((word = strtok(NULL, " \t")) == NULL)
+ continue;
+ strlcpy(mtpt, word, 256);
+ if ((word = strtok(NULL, " \t")) == NULL)
+ continue;
+ strlcpy(fstype, word, 256);
+ if ((word = strtok(NULL, " \t")) == NULL)
+ continue;
+ strlcpy(options, word, 256);
+
+ /*
+ * Now, if the mountpoint has /usr, /var, /tmp, or /home
+ * as a prefix, mount it under a->cfg_root.
+ */
+ for (i = 0; try_mtpt[i] != NULL; i++) {
+ if (strstr(mtpt, try_mtpt[i]) == mtpt) {
+ /*
+ * Don't mount it if it's optional.
+ */
+ if (strstr(options, "noauto") != NULL)
+ continue;
+
+ /*
+ * Don't mount it if device doesn't start
+ * with /dev/ and it isn't 'swap'.
+ */
+ if (strstr(device, "/dev/") == NULL &&
+ strcmp(device, "swap") != 0)
+ continue;
+
+ /*
+ * If the device is 'swap', mount_mfs it instead.
+ */
+ if (strcmp(device, "swap") == 0) {
+ cvtoptions = convert_swap_options(options);
+ command_add(cmds,
+ "%s%s %s swap %s%s%s",
+ a->os_root, cmd_name(a, "MOUNT_MFS"),
+ cvtoptions, a->os_root, a->cfg_root, mtpt);
+ free(cvtoptions);
+ } else {
+ command_add_ensure_dev(a, cmds, device);
+ command_add(cmds,
+ "%s%s -o %s %s%s %s%s%s",
+ a->os_root, cmd_name(a, "MOUNT"),
+ options, /* XXX */
+ a->os_root, device, a->os_root,
+ a->cfg_root, mtpt);
+ }
+ }
+ }
+ }
+ fclose(fstab);
+
+ if (!commands_execute(a, cmds)) {
+ commands_free(cmds);
+ return(0);
+ }
+ commands_free(cmds);
+
+ return(1);
+}
Index: contrib/bsdinstaller/src/backend/installer/fn_diagnostic.c
===================================================================
RCS file: contrib/bsdinstaller/src/backend/installer/fn_diagnostic.c
diff -N contrib/bsdinstaller/src/backend/installer/fn_diagnostic.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/src/backend/installer/fn_diagnostic.c 26 Aug 2005 22:44:36 -0000
@@ -0,0 +1,350 @@
+/*
+ * Copyright (c)2004 The DragonFly Project. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the DragonFly Project nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * fn_diagnostic.c
+ * Diagnostic functions for installer.
+ * $Id: fn_diagnostic.c,v 1.22 2005/08/26 22:44:36 cpressey Exp $
+ */
+
+#include
+
+#include
+#include
+#include
+#include
+#include
+
+#ifdef ENABLE_NLS
+#include
+#define _(String) gettext (String)
+#else
+#define _(String) (String)
+#endif
+
+#ifdef SYSTEM_AURA
+#include
+#include
+#else
+#include "mem.h"
+#include "buffer.h"
+#endif
+
+#ifdef SYSTEM_DFUI
+#include
+#else
+#include "dfui.h"
+#endif
+
+#ifdef SYSTEM_LIBINSTALLER
+#include
+#include
+#include
+#include
+#include
+#include
+#else
+#include "commands.h"
+#include "confed.h"
+#include "diskutil.h"
+#include "functions.h"
+#include "package.h"
+#include "uiutil.h"
+#endif
+
+
+#include "fn.h"
+#include "pathnames.h"
+
+/*** DIAGNOSTIC FUNCTIONS ***/
+
+void
+fn_memtest(struct i_fn_args *a)
+{
+ struct dfui_form *f;
+ struct dfui_response *r;
+ struct dfui_dataset *ds, *new_ds;
+ struct commands *cmds;
+ struct command *cmd;
+ const char *memtestsize;
+
+ f = dfui_form_create(
+ "memtest",
+ _("Memory test"),
+ _("Memory test - Enter the size in values such as 400M, 1G."),
+ "",
+
+ "f", "memtestsize", _("Memory test size"),
+ _("Enter the amount of memory you would like to check:"), "",
+
+ "a", "ok", _("OK"), "", "",
+ "a", "cancel", _("Cancel Memory Test"), "", "",
+ "p", "accelerator", "ESC",
+
+ NULL
+ );
+
+ ds = dfui_dataset_new();
+ dfui_dataset_celldata_add(ds, "memtestsize", "");
+ dfui_form_dataset_add(f, ds);
+
+ if (!dfui_be_present(a->c, f, &r))
+ abort_backend();
+
+ if (strcmp(dfui_response_get_action_id(r), "ok") == 0) {
+ new_ds = dfui_response_dataset_get_first(r);
+ memtestsize = dfui_dataset_get_value(new_ds, "memtestsize");
+ cmds = commands_new();
+ cmd = command_add(cmds,
+ "cd %s && %s%s %s 1 --log",
+ a->tmp,
+ a->os_root, cmd_name(a, "MEMTEST"),
+ memtestsize);
+ command_set_log_mode(cmd, COMMAND_LOG_QUIET);
+ cmd = command_add(cmds,
+ "%s%s -E -v '^Unable to malloc' %smemtest.log > %smemtest.log.new",
+ a->os_root, cmd_name(a, "GREP"),
+ a->tmp, a->tmp);
+ cmd = command_add(cmds, "%s%s %smemtest.log.new %smemtest.log",
+ a->os_root, cmd_name(a, "MV"),
+ a->tmp, a->tmp);
+ cmd = command_add(cmds,
+ "%s%s -E -v '^Allocated.*failed' %smemtest.log > %smemtest.log.new",
+ a->os_root, cmd_name(a, "GREP"),
+ a->tmp, a->tmp);
+ cmd = command_add(cmds, "%s%s %smemtest.log.new %smemtest.log",
+ a->os_root, cmd_name(a, "MV"),
+ a->tmp, a->tmp);
+ if (commands_execute(a, cmds)) {
+ commands_free(cmds);
+ view_memtest_log(a);
+ cmds = commands_new();
+ cmd = command_add(cmds, "%s%s -f %smemtest.log",
+ a->os_root, cmd_name(a, "RM"),
+ a->tmp);
+ commands_execute(a, cmds);
+ } else {
+ inform(a->c, _("Memory test could not be run."));
+ }
+ commands_free(cmds);
+ }
+
+ dfui_form_free(f);
+ dfui_response_free(r);
+}
+
+void
+view_memtest_log(struct i_fn_args *a)
+{
+ struct aura_buffer *error_log;
+ struct dfui_form *f;
+ struct dfui_response *r;
+
+ error_log = aura_buffer_new(1024);
+ aura_buffer_cat_file(error_log, "%smemtest.log", a->tmp);
+
+ f = dfui_form_create(
+ "error_log",
+ _("Error Log"),
+ aura_buffer_buf(error_log),
+ "",
+
+ "p", "role", "informative",
+ "p", "minimum_width", "72",
+ "p", "monospaced", "true",
+
+ "a", "ok", _("OK"), "", "",
+ "p", "accelerator", "ESC",
+
+ NULL
+ );
+
+ if (!dfui_be_present(a->c, f, &r))
+ abort_backend();
+
+ dfui_form_free(f);
+ dfui_response_free(r);
+
+ aura_buffer_free(error_log);
+}
+
+void
+fn_show_dmesg(struct i_fn_args *a)
+{
+ struct aura_buffer *e;
+ struct dfui_form *f;
+ struct dfui_response *r;
+
+ e = aura_buffer_new(1024);
+ aura_buffer_cat_file(e, "%s%s", a->os_root, cmd_name(a, "DMESG_BOOT"));
+
+ f = dfui_form_create(
+ "dmesg",
+ _("System Startup Messages (dmesg)"),
+ aura_buffer_buf(e),
+ "",
+
+ "p", "role", "informative",
+ "p", "minimum_width", "72",
+ "p", "monospaced", "true",
+
+ "a", "ok", _("OK"), "", "",
+ "p", "accelerator", "ESC",
+
+ NULL
+ );
+
+ if (!dfui_be_present(a->c, f, &r))
+ abort_backend();
+
+ dfui_form_free(f);
+ dfui_response_free(r);
+
+ aura_buffer_free(e);
+}
+
+void
+fn_show_pciconf(struct i_fn_args *a)
+{
+ struct aura_buffer *e;
+ struct dfui_form *f;
+ struct dfui_response *r;
+
+ e = aura_buffer_new(1024);
+ aura_buffer_cat_pipe(e, "pciconf -l -v");
+
+ f = dfui_form_create(
+ "pciconf",
+ _("PCI Devices"),
+ aura_buffer_buf(e),
+ "",
+
+ "p", "role", "informative",
+ "p", "minimum_width", "72",
+ "p", "monospaced", "true",
+
+ "a", "ok", _("OK"), "", "",
+ "p", "accelerator", "ESC",
+
+ NULL
+ );
+
+ if (!dfui_be_present(a->c, f, &r))
+ abort_backend();
+
+ dfui_form_free(f);
+ dfui_response_free(r);
+
+ aura_buffer_free(e);
+}
+
+void
+fn_show_pnpinfo(struct i_fn_args *a)
+{
+ struct aura_buffer *e;
+ struct dfui_form *f;
+ struct dfui_response *r;
+
+ e = aura_buffer_new(1024);
+ aura_buffer_cat_pipe(e, "pnpinfo");
+
+ f = dfui_form_create(
+ "pnpinfo",
+ _("ISA PnP Devices"),
+ aura_buffer_buf(e),
+ "",
+
+ "p", "role", "informative",
+ "p", "minimum_width", "72",
+ "p", "monospaced", "true",
+
+ "a", "ok", _("OK"), "", "",
+ "p", "accelerator", "ESC",
+
+ NULL
+ );
+
+ if (!dfui_be_present(a->c, f, &r))
+ abort_backend();
+
+ dfui_form_free(f);
+ dfui_response_free(r);
+
+ aura_buffer_free(e);
+}
+
+void
+fn_show_atacontrol(struct i_fn_args *a)
+{
+ struct aura_buffer *e;
+ struct dfui_form *f;
+ struct dfui_response *r;
+
+ e = aura_buffer_new(1024);
+ aura_buffer_cat_pipe(e, "atacontrol list");
+
+ f = dfui_form_create(
+ "atacontrol",
+ _("ATA Devices"),
+ aura_buffer_buf(e),
+ "",
+
+ "p", "role", "informative",
+ "p", "minimum_width", "72",
+ "p", "monospaced", "true",
+
+ "a", "ok", _("OK"), "", "",
+ "p", "accelerator", "ESC",
+
+ NULL
+ );
+
+ if (!dfui_be_present(a->c, f, &r))
+ abort_backend();
+
+ dfui_form_free(f);
+ dfui_response_free(r);
+
+ aura_buffer_free(e);
+}
+
+void
+show_ifconfig(struct dfui_connection *c, char *ifname)
+{
+ struct aura_buffer *e;
+
+ e = aura_buffer_new(1024);
+ aura_buffer_cat_pipe(e, "/sbin/ifconfig %s", ifname);
+ inform(c, aura_buffer_buf(e));
+ aura_buffer_free(e);
+}
Index: contrib/bsdinstaller/src/backend/installer/fn_disk.c
===================================================================
RCS file: contrib/bsdinstaller/src/backend/installer/fn_disk.c
diff -N contrib/bsdinstaller/src/backend/installer/fn_disk.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/src/backend/installer/fn_disk.c 26 Aug 2005 22:44:36 -0000
@@ -0,0 +1,742 @@
+/*
+ * Copyright (c)2004 The DragonFly Project. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the DragonFly Project nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * fn_disk.c
+ * Disk functions for installer.
+ * $Id: fn_disk.c,v 1.41 2005/08/26 22:44:36 cpressey Exp $
+ */
+
+#include
+#include
+
+#ifdef ENABLE_NLS
+#include
+#define _(String) gettext (String)
+#else
+#define _(String) (String)
+#endif
+
+#ifdef SYSTEM_AURA
+#include
+#include
+#else
+#include "mem.h"
+#include "fspred.h"
+#endif
+
+#ifdef SYSTEM_DFUI
+#include
+#include
+#else
+#include "dfui.h"
+#include "system.h"
+#endif
+
+#ifdef SYSTEM_LIBINSTALLER
+#include
+#include
+#include
+#include
+#else
+#include "commands.h"
+#include "diskutil.h"
+#include "functions.h"
+#include "uiutil.h"
+#endif
+
+#include "fn.h"
+#include "pathnames.h"
+
+/*** DISK-RELATED FUNCTIONS ***/
+
+/*
+ * Ask the user which physical disk they want.
+ * Changes ss->selected_disk if successful.
+ */
+void
+fn_select_disk(struct i_fn_args *a)
+{
+ struct dfui_form *f;
+ struct dfui_action *k;
+ struct dfui_response *r;
+ struct disk *d;
+
+ f = dfui_form_create(
+ "select_disk",
+ _("Select Disk"),
+ a->short_desc,
+ "",
+
+ "p", "role", "menu",
+ "p", "special", "dfinstaller_select_disk",
+
+ NULL
+ );
+
+ for (d = storage_disk_first(a->s); d != NULL; d = disk_next(d)) {
+ dfui_form_action_add(f, disk_get_device_name(d),
+ dfui_info_new(disk_get_desc(d), "", ""));
+ }
+
+ k = dfui_form_action_add(f, "cancel",
+ dfui_info_new(a->cancel_desc, "", ""));
+ dfui_action_property_set(k, "accelerator", "ESC");
+
+ if (!dfui_be_present(a->c, f, &r))
+ abort_backend();
+
+ if (strcmp(dfui_response_get_action_id(r), "cancel") == 0) {
+ a->result = 0;
+ } else {
+ d = disk_find(a->s, dfui_response_get_action_id(r));
+ if (d == NULL) {
+ inform(a->c, _("Internal error - response from frontend "
+ "should be a valid device name."));
+ a->result = 0;
+ } else {
+ storage_set_selected_disk(a->s, d);
+ a->result = 1;
+ }
+ }
+
+ dfui_form_free(f);
+ dfui_response_free(r);
+}
+
+/*
+ * Ask the user which slice on a the selected disk they want.
+ * Changes ss->selected_slice.
+ */
+void
+fn_select_slice(struct i_fn_args *a)
+{
+ struct dfui_form *f;
+ struct dfui_action *k;
+ struct dfui_response *r;
+ struct slice *s;
+ char string[16];
+
+ f = dfui_form_create(
+ "select_slice",
+ _("Select Primary Partition"),
+ a->short_desc,
+ "",
+
+ "p", "role", "menu",
+ "p", "special", "dfinstaller_select_slice",
+
+ NULL
+ );
+
+ for (s = disk_slice_first(storage_get_selected_disk(a->s));
+ s != NULL; s = slice_next(s)) {
+ snprintf(string, 16, "%d", slice_get_number(s));
+ dfui_form_action_add(f, string,
+ dfui_info_new(slice_get_desc(s), "", ""));
+ }
+
+ k = dfui_form_action_add(f, "cancel",
+ dfui_info_new(a->cancel_desc, "", ""));
+ dfui_action_property_set(k, "accelerator", "ESC");
+
+ if (!dfui_be_present(a->c, f, &r))
+ abort_backend();
+
+ if (strcmp(dfui_response_get_action_id(r), "cancel") == 0) {
+ a->result = 0;
+ } else {
+ s = slice_find(storage_get_selected_disk(a->s),
+ atoi(dfui_response_get_action_id(r)));
+ if (s == NULL) {
+ inform(a->c, _("Internal error - response from frontend "
+ "should be a valid slice number."));
+ a->result = 0;
+ } else {
+ storage_set_selected_slice(a->s, s);
+ a->result = 1;
+ }
+ }
+
+ dfui_form_free(f);
+ dfui_response_free(r);
+}
+
+/*
+ * If ss->selected_disk == NULL, user will be asked for which disk.
+ * Returns 1 if disk was formatted, 0 if it wasn't.
+ * If it was, ss->selected_disk and ss->selected_slice are set to it.
+ */
+void
+fn_format_disk(struct i_fn_args *a)
+{
+ struct commands *cmds;
+ char *selected_disk_string;
+
+ if (storage_get_selected_disk(a->s) == NULL) {
+ a->short_desc = _("Select a disk to format.");
+ a->cancel_desc = _("Return to Utilities Menu");
+ fn_select_disk(a);
+ if (!a->result || storage_get_selected_disk(a->s) == NULL) {
+ a->result = 0;
+ return;
+ }
+ }
+
+ if (confirm_dangerous_action(a->c,
+ _("WARNING! ALL data in ALL partitions on the disk\n\n"
+ "%s\n\nwill be IRREVOCABLY ERASED!\n\nAre you ABSOLUTELY "
+ "SURE you wish to take this action? This is your "
+ "LAST CHANCE to cancel!"), disk_get_desc(storage_get_selected_disk(a->s)))) {
+ cmds = commands_new();
+
+ /*
+ * Create the device node if it does not exist.
+ */
+ command_add_ensure_dev(a, cmds,
+ disk_get_device_name(storage_get_selected_disk(a->s)));
+
+ /*
+ * Currently you need to pass 'yes' to OpenBSD's fdisk to
+ * be able to do these.
+ */
+#if !defined(__OpenBSD__)
+ command_add(cmds, "%s%s -I %s",
+ a->os_root, cmd_name(a, "FDISK"),
+ disk_get_raw_device_name(storage_get_selected_disk(a->s)));
+ command_add(cmds, "%s%s | %s%s -B %s",
+ a->os_root, cmd_name(a, "YES"),
+ a->os_root, cmd_name(a, "FDISK"),
+ disk_get_raw_device_name(storage_get_selected_disk(a->s)));
+#endif
+ if (!commands_execute(a, cmds)) {
+ inform(a->c, _("The disk\n\n%s\n\nwas "
+ "not correctly formatted, and may "
+ "now be in an inconsistent state. "
+ "We recommend re-formatting it "
+ "before attempting to install "
+ "%s on it."),
+ disk_get_desc(storage_get_selected_disk(a->s)),
+ OPERATING_SYSTEM_NAME);
+ commands_free(cmds);
+ a->result = 0;
+ return;
+ }
+ commands_free(cmds);
+
+ /*
+ * Since one of the disks has now changed, we must
+ * refresh our view of them and re-select the disk
+ * since the selected_disk pointer will be invalidated.
+ */
+ selected_disk_string = aura_strdup(
+ disk_get_device_name(storage_get_selected_disk(a->s)));
+ if (!survey_storage(a)) {
+ inform(a->c, _("Errors occurred while probing "
+ "the system for its storage capabilities."));
+ }
+ storage_set_selected_disk(a->s, disk_find(a->s, selected_disk_string));
+ free(selected_disk_string);
+
+ /*
+ * Note that we formatted this disk and that we want
+ * to use the first (and only) slice of it.
+ */
+ disk_set_formatted(storage_get_selected_disk(a->s), 1);
+ storage_set_selected_slice(a->s, disk_slice_first(storage_get_selected_disk(a->s)));
+
+ if (!format_slice(a)) {
+ inform(a->c, _("The sole primary partition of "
+ "the disk\n\n%s\n\nwas "
+ "not correctly formatted, and may "
+ "now be in an inconsistent state. "
+ "We recommend re-formatting the "
+ "disk before attempting to install "
+ "%s on it."),
+ disk_get_desc(storage_get_selected_disk(a->s)),
+ OPERATING_SYSTEM_NAME);
+ a->result = 0;
+ return;
+ }
+
+ inform(a->c, _("The disk\n\n%s\n\nwas formatted."),
+ disk_get_desc(storage_get_selected_disk(a->s)));
+ a->result = 1;
+ } else {
+ inform(a->c, _("Action cancelled - no disks were formatted."));
+ a->result = 0;
+ }
+}
+
+/*
+ * Wipes the start of the selected disk.
+ */
+void
+fn_wipe_start_of_disk(struct i_fn_args *a)
+{
+ struct commands *cmds;
+
+ a->short_desc = _("If you are having problems formatting a disk, "
+ "it may be because of junk that has accumulated "
+ "in the boot block and the partition table. "
+ "A cure for this is to wipe out everything on "
+ "the first few sectors of the disk. However, this "
+ "is a rather drastic action to take, so it is not "
+ "recommended unless you are otherwise "
+ "encountering problems.");
+ a->cancel_desc = _("Return to Utilities Menu");
+ fn_select_disk(a);
+ if (!a->result)
+ return;
+
+ /* XXX check to make sure no slices on this disk are mounted first? */
+ if (storage_get_selected_disk(a->s) != NULL && confirm_dangerous_action(a->c,
+ _("WARNING! ALL data in ALL partitions on the disk\n\n"
+ "%s\n\nwill be IRREVOCABLY ERASED!\n\nAre you ABSOLUTELY "
+ "SURE you wish to take this action? This is your "
+ "LAST CHANCE to cancel!"), disk_get_desc(storage_get_selected_disk(a->s)))) {
+ cmds = commands_new();
+ command_add(cmds,
+ "%s%s if=%sdev/zero of=%sdev/%s bs=32k count=16",
+ a->os_root, cmd_name(a, "DD"),
+ a->os_root, a->os_root,
+ disk_get_raw_device_name(storage_get_selected_disk(a->s)));
+ if (commands_execute(a, cmds)) {
+ inform(a->c, _("Start of disk was successfully wiped."));
+ } else {
+ inform(a->c, _("Some errors occurred. "
+ "Start of disk was not successfully wiped."));
+ }
+ commands_free(cmds);
+ }
+}
+
+/*
+ * Wipes the start of the selected slice.
+ */
+void
+fn_wipe_start_of_slice(struct i_fn_args *a)
+{
+ struct commands *cmds;
+
+ a->short_desc =
+ _("If you are having problems formatting a primary partition, "
+ "it may be because of junk that has accumulated in the "
+ "partition's `disklabel'. A cure for this is to wipe out "
+ "everything on the first few sectors of the primary partition. "
+ "However, this is a rather drastic action to take, so it is not "
+ "recommended unless you are otherwise encountering problems.");
+ a->cancel_desc = _("Return to Utilities Menu");
+ fn_select_slice(a);
+ if (!a->result)
+ return;
+
+ if (confirm_dangerous_action(a->c,
+ _("WARNING! ALL data in primary partition #%d,\n\n%s\n\non the "
+ "disk\n\n%s\n\n will be IRREVOCABLY ERASED!\n\nAre you "
+ "ABSOLUTELY SURE you wish to take this action? This is "
+ "your LAST CHANCE to cancel!"),
+ slice_get_number(storage_get_selected_slice(a->s)),
+ slice_get_desc(storage_get_selected_slice(a->s)),
+ disk_get_desc(storage_get_selected_disk(a->s)))) {
+ /* XXX check to make sure this slice is not mounted first */
+ cmds = commands_new();
+ command_add(cmds, "%s%s if=%sdev/zero of=%sdev/%s bs=32k count=16",
+ a->os_root, cmd_name(a, "DD"),
+ a->os_root, a->os_root,
+ slice_get_raw_device_name(storage_get_selected_slice(a->s)));
+ if (commands_execute(a, cmds)) {
+ inform(a->c, _("Start of primary partition was successfully wiped."));
+ } else {
+ inform(a->c, _("Some errors occurred. "
+ "Start of primary partition was not successfully wiped."));
+ }
+ commands_free(cmds);
+ }
+}
+
+static void
+ask_to_wipe_boot_sector(struct i_fn_args *a, struct commands *fcmds)
+{
+ struct commands *cmds;
+ struct command *cmd;
+ char *disk;
+
+ for (cmd = command_get_first(fcmds); cmd != NULL;
+ cmd = command_get_next(cmd)) {
+ disk = command_get_tag(cmd);
+ if (disk != NULL &&
+ command_get_result(cmd) > 0 &&
+ command_get_result(cmd) < 256) {
+ switch (dfui_be_present_dialog(a->c,
+ _("Bootblock Install Failed"),
+ _("Re-Initialize Bootblock|Cancel"),
+ _("Warning: bootblocks were not successfully "
+ "installed on the disk `%s'. This may be "
+ "because the disk is new and not yet "
+ "formatted. If this is the case, it might "
+ "help to re-initialize the boot sector, "
+ "then try installing the bootblock again. "
+ "Note that this should not affect the "
+ "partition table of the disk."),
+ disk, disk)) {
+ case 1:
+ cmds = commands_new();
+ command_add(cmds,
+ "%s%s | %s%s -B %sdev/%s",
+ a->os_root, cmd_name(a, "YES"),
+ a->os_root, cmd_name(a, "FDISK"),
+ a->os_root, disk);
+ if (commands_execute(a, cmds)) {
+ inform(a->c, _("Boot sector successfully initialized."));
+ } else {
+ inform(a->c, _("Some errors occurred. "
+ "Boot sector was not successfully initialized."));
+ }
+ commands_free(cmds);
+ break;
+ default:
+ break;
+ }
+ }
+ }
+}
+
+void
+fn_install_bootblocks(struct i_fn_args *a)
+{
+ struct dfui_form *f;
+ struct dfui_response *r;
+ struct dfui_dataset *ds;
+ struct disk *d;
+ struct commands *cmds;
+ struct command *cmd;
+ char disk[64], boot0cfg[32], packet[32];
+ char msg_buf[1][1024];
+
+ snprintf(msg_buf[0], sizeof(msg_buf[0]),
+ "'Packet Mode' refers to using newer BIOS calls to boot "
+ "from a partition of the disk. It is generally not "
+ "required unless:\n\n"
+ "- your BIOS does not support legacy mode; or\n"
+ "- your %s primary partition resides on a "
+ "cylinder of the disk beyond cylinder 1024; or\n"
+ "- you just can't get it to boot without it.",
+ OPERATING_SYSTEM_NAME);
+
+ f = dfui_form_create(
+ "install_bootstrap",
+ _("Install Bootblock(s)"),
+ a->short_desc,
+
+ msg_buf[0],
+
+ "p", "special", "dfinstaller_install_bootstrap",
+
+ "f", "disk", _("Disk Drive"),
+ _("The disk on which you wish to install a bootblock"), "",
+ "p", "editable", "false",
+ "f", "boot0cfg", _("Install Bootblock?"),
+ _("Install a bootblock on this disk"), "",
+ "p", "control", "checkbox",
+ "f", "packet", _("Packet Mode?"),
+ _("Select this to use 'packet mode' to boot the disk"), "",
+ "p", "control", "checkbox",
+
+ "a", "ok", _("Accept and Install Bootblocks"), "", "",
+ "a", "cancel", a->cancel_desc, "", "",
+ "p", "accelerator", "ESC",
+
+ NULL
+ );
+
+ dfui_form_set_multiple(f, 1);
+
+ for (d = storage_disk_first(a->s); d != NULL; d = disk_next(d)) {
+ ds = dfui_dataset_new();
+ /* XXX need to see how this is handled in OpenBSD/NetBSD */
+ dfui_dataset_celldata_add(ds, "disk", disk_get_raw_device_name(d));
+ dfui_dataset_celldata_add(ds, "boot0cfg", "Y");
+ dfui_dataset_celldata_add(ds, "packet", autopacket(d) == 1 ? "Y" : "N");
+ dfui_form_dataset_add(f, ds);
+ }
+
+ if (!dfui_be_present(a->c, f, &r))
+ abort_backend();
+
+ a->result = 0;
+ if (strcmp(dfui_response_get_action_id(r), "ok") == 0) {
+ cmds = commands_new();
+
+ for (ds = dfui_response_dataset_get_first(r); ds != NULL;
+ ds = dfui_dataset_get_next(ds)) {
+ strlcpy(disk, dfui_dataset_get_value(ds, "disk"), 64);
+ strlcpy(boot0cfg, dfui_dataset_get_value(ds, "boot0cfg"), 32);
+ strlcpy(packet, dfui_dataset_get_value(ds, "packet"), 32);
+
+ if (strcasecmp(boot0cfg, "Y") == 0) {
+ cmd = command_add(cmds, "%s%s -B %s %s",
+ a->os_root, cmd_name(a, "BOOT0CFG"),
+ strcasecmp(packet, "Y") == 0 ? "-o packet" : "",
+ disk);
+ command_set_failure_mode(cmd, COMMAND_FAILURE_WARN);
+ command_set_tag(cmd, disk);
+ cmd = command_add(cmds, "%s%s -v %s",
+ a->os_root, cmd_name(a, "BOOT0CFG"),
+ disk);
+ command_set_failure_mode(cmd, COMMAND_FAILURE_WARN);
+ command_set_tag(cmd, disk);
+ }
+ }
+
+ if (!commands_execute(a, cmds)) {
+ ask_to_wipe_boot_sector(a, cmds);
+ } else {
+ inform(a->c, _("Bootblocks were successfully installed!"));
+ a->result = 1;
+ }
+ commands_free(cmds);
+ }
+
+ dfui_form_free(f);
+ dfui_response_free(r);
+}
+
+void
+fn_format_msdos_floppy(struct i_fn_args *a)
+{
+ struct commands *cmds;
+
+ switch (dfui_be_present_dialog(a->c, _("Format MSDOS Floppy"),
+ _("Format Floppy|Return to Utilities Menu"),
+ _("Please insert the floppy to be formatted "
+ "in unit 0 (``drive A:'')."))) {
+ case 1:
+ cmds = commands_new();
+ command_add(cmds, "%s%s -y -f 1440 /dev/fd0",
+ a->os_root, cmd_name(a, "FDFORMAT"));
+ command_add(cmds, "%s%s -f 1440 fd0",
+ a->os_root, cmd_name(a, "NEWFS_MSDOS"));
+ if (commands_execute(a, cmds))
+ inform(a->c, _("Floppy successfully formatted!"));
+ else
+ inform(a->c, _("Floppy was not successfully formatted."));
+ break;
+ case 2:
+ return;
+ default:
+ abort_backend();
+ }
+}
+
+void
+fn_create_cdboot_floppy(struct i_fn_args *a)
+{
+ struct commands *cmds;
+ char msg_buf[1][1024];
+
+ snprintf(msg_buf[0], sizeof(msg_buf[0]),
+ "%s cannot be installed from a floppy; "
+ "it must be installed from a booted CD-ROM. "
+ "However, many older systems do not support booting "
+ "from a CD-ROM. For these systems, a boot disk can be "
+ "created. This boot disk contains the Smart Boot "
+ "Manager program, which can boot a CD-ROM even "
+ "on systems with BIOSes which do not support booting "
+ "from the CD-ROM.\n\n"
+ "Smart Boot Manager is not a part of %s; "
+ "the Smart Boot Manager project can be found here:\n\n"
+ "http://btmgr.sourceforge.net/\n\n"
+ "To create a CDBoot floppy, insert a blank floppy "
+ "in unit 0 (``drive A:'') before proceeding."
+ "",
+ OPERATING_SYSTEM_NAME, OPERATING_SYSTEM_NAME);
+
+ switch (dfui_be_present_dialog(a->c, _("Create CDBoot Floppy"),
+ _("Create CDBoot Floppy|Return to Utilities Menu"),
+ msg_buf[0])) {
+ case 1:
+ cmds = commands_new();
+ command_add(cmds, "%s%s -c %sboot/cdboot.flp.bz2 | "
+ "%s%s of=%sdev/fd0 bs=32k",
+ a->os_root, cmd_name(a, "BUNZIP2"),
+ a->os_root,
+ a->os_root, cmd_name(a, "DD"),
+ a->os_root);
+ if (commands_execute(a, cmds))
+ inform(a->c, _("CDBoot floppy successfully created!"));
+ else
+ inform(a->c, _("CDBoot floppy was not successfully created."));
+ break;
+ case 2:
+ return;
+ default:
+ abort_backend();
+ }
+}
+
+void
+fn_create_memtest86_floppy(struct i_fn_args *a)
+{
+ struct commands *cmds;
+
+ switch (dfui_be_present_dialog(a->c, _("Create memtest86 Floppy"),
+ "Create memtest86 Floppy|Return to Utilities Menu",
+ "While this installer allows you to test memory "
+ "on-line, the fact that the installer and operating "
+ "system are already loaded means that the memory "
+ "test has certain limits. For a more thorough "
+ "memory test, you can create a floppy containing "
+ "the memtest86 program, which boots up independently "
+ "of any operating system, allowing it access to "
+ "almost the entire memory of the computer for testing.\n\n"
+ "memtest86 is not a part of %s; "
+ "the memtest86 project can be found here:\n\n"
+ "http://www.memtest86.com/\n\n"
+ "To create a memtest86 floppy, insert a blank floppy "
+ "in unit 0 (``drive A:'') before proceeding."
+ "", OPERATING_SYSTEM_NAME)) {
+ case 1:
+ cmds = commands_new();
+ command_add(cmds, "%s%s -c %sboot/memtest86.flp.bz2 | "
+ "%s%s of=%sdev/fd0 bs=32k",
+ a->os_root, cmd_name(a, "BUNZIP2"),
+ a->os_root,
+ a->os_root, cmd_name(a, "DD"),
+ a->os_root);
+ if (commands_execute(a, cmds))
+ inform(a->c, _("memtest86 floppy successfully created!"));
+ else
+ inform(a->c, _("memtest86 floppy was not successfully created."));
+ break;
+ case 2:
+ return;
+ default:
+ abort_backend();
+ }
+}
+
+/**** NON-fn_ FUNCTIONS ***/
+
+int
+format_slice(struct i_fn_args *a)
+{
+ struct commands *cmds;
+ int result;
+ int cyl, hd, sec;
+
+ cmds = commands_new();
+
+ /*
+ * Create the device node if it does not exist.
+ */
+ command_add_ensure_dev(a, cmds,
+ slice_get_device_name(storage_get_selected_slice(a->s)));
+
+ /*
+ * The information in a->s NEEDS to be accurate here!
+ * Presumably we just did a survey_storage() recently.
+ * XXX should we do another one here anyway just to be paranoid?
+ */
+
+ /*
+ * Set the slice's sysid to 165.
+ */
+ disk_get_geometry(storage_get_selected_disk(a->s), &cyl, &hd, &sec);
+ command_add(cmds, "%s%s 'g c%d h%d s%d' >%snew.fdisk",
+ a->os_root, cmd_name(a, "ECHO"),
+ cyl, hd, sec,
+ a->tmp);
+ command_add(cmds, "%s%s 'p %d %d %lu %lu' >>%snew.fdisk",
+ a->os_root, cmd_name(a, "ECHO"),
+ slice_get_number(storage_get_selected_slice(a->s)),
+ 165,
+ slice_get_start(storage_get_selected_slice(a->s)),
+ slice_get_size(storage_get_selected_slice(a->s)),
+ a->tmp);
+ if (slice_get_flags(storage_get_selected_slice(a->s)) & 0x80) {
+ command_add(cmds, "%s%s 'a %d' >>%snew.fdisk",
+ a->os_root, cmd_name(a, "ECHO"),
+ slice_get_number(storage_get_selected_slice(a->s)),
+ a->tmp);
+ }
+
+ command_add(cmds, "%s%s %snew.fdisk",
+ a->os_root, cmd_name(a, "CAT"), a->tmp);
+ temp_file_add(a, "new.fdisk");
+
+ /*
+ * Execute the fdisk script.
+ */
+ command_add(cmds, "%s%s -v -f %snew.fdisk %s",
+ a->os_root, cmd_name(a, "FDISK"), a->tmp,
+ disk_get_raw_device_name(storage_get_selected_disk(a->s)));
+
+ /*
+ * Auto-disklabel the slice.
+ * NB: one cannot use "/dev/adXsY" here -
+ * it must be in the form "adXsY".
+ */
+ command_add(cmds, "%s%s -B -r -w %s auto",
+ a->os_root, cmd_name(a, "DISKLABEL"),
+ slice_get_raw_device_name(storage_get_selected_slice(a->s)));
+
+ /*
+ * If there is an old 'virgin' disklabel hanging around
+ * in the temp dir, get rid of it. This won't happen
+ * from a real CD, but might happen with '-o' installs.
+ */
+ command_add(cmds, "%s%s -f %sinstall.disklabel.%s",
+ a->os_root, cmd_name(a, "RM"),
+ a->tmp,
+ slice_get_device_name(storage_get_selected_slice(a->s)));
+
+ result = commands_execute(a, cmds);
+
+ commands_free(cmds);
+
+ return(result);
+}
+
+int
+autopacket(struct disk *d) {
+ struct slice *p;
+ long tcap = 0;
+
+ for (p = disk_slice_first(d); p != NULL; p = slice_next(p)) {
+ tcap += slice_get_capacity(p);
+ if (tcap > 8 * 1024)
+ return(1);
+ }
+ return(0);
+}
Index: contrib/bsdinstaller/src/backend/installer/fn_install.c
===================================================================
RCS file: contrib/bsdinstaller/src/backend/installer/fn_install.c
diff -N contrib/bsdinstaller/src/backend/installer/fn_install.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/src/backend/installer/fn_install.c 18 Apr 2006 19:43:48 -0000
@@ -0,0 +1,566 @@
+/*
+ * Copyright (c)2004 The DragonFly Project. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the DragonFly Project nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * fn_install.c
+ * Installer Function : Install OS Files.
+ * $Id: fn_install.c,v 1.74 2006/04/18 19:43:48 joerg Exp $
+ */
+
+#include
+#include
+
+#define SOURCES_CONF_FILE "/usr/local/share/dfuibe_installer/sources.conf"
+
+#ifdef ENABLE_NLS
+#include
+#define _(String) gettext (String)
+#else
+#define _(String) (String)
+#endif
+
+#ifdef SYSTEM_AURA
+#include
+#include
+#include
+#else
+#include "mem.h"
+#include "buffer.h"
+#include "fspred.h"
+#endif
+
+#ifdef SYSTEM_DFUI
+#include
+#include
+#else
+#include "dfui.h"
+#include "system.h"
+#endif
+
+#ifdef SYSTEM_LIBINSTALLER
+#include
+#include
+#include
+#include
+#include
+#else
+#include "commands.h"
+#include "confed.h"
+#include "diskutil.h"
+#include "functions.h"
+#include "uiutil.h"
+#endif
+
+#include "flow.h"
+#include "pathnames.h"
+#include "fn.h"
+
+/*
+ * fn_install_os: actually put DragonFly on a disk.
+ */
+void
+fn_install_os(struct i_fn_args *a)
+{
+ struct subpartition *sp;
+ struct commands *cmds;
+ struct command *cmd;
+ int i, seen_it, prefix;
+ FILE *sources_conf;
+ char line[256];
+ char cp_src[64][256];
+ char file_path[256];
+ int lines = 0;
+ long mfsbacked_size;
+
+ /*
+ * If SOURCES_CONF_FILE exists, lets read in and
+ * populate our copy sources. If it does not exist
+ * simply set the list by hand.
+ */
+ if (!is_file("%s%s", a->os_root, SOURCES_CONF_FILE)) {
+ i_log(a, "Using internal copy sources table.");
+ strcpy(cp_src[0],"/COPYRIGHT");
+ strcpy(cp_src[1],"/var");
+ strcpy(cp_src[2],"/bin");
+ strcpy(cp_src[3],"/boot");
+ strcpy(cp_src[4],"/cdrom");
+ strcpy(cp_src[5],"/dev");
+ strcpy(cp_src[6],"/etc");
+ strcpy(cp_src[7],"/libexec");
+ strcpy(cp_src[8],"/lib");
+ strcpy(cp_src[9],"/kernel");
+ strcpy(cp_src[10],"/modules");
+ strcpy(cp_src[11],"/root");
+ strcpy(cp_src[12],"/sbin");
+ strcpy(cp_src[13],"/sys");
+ strcpy(cp_src[14],"/tmp");
+ strcpy(cp_src[15],"/usr/bin");
+ strcpy(cp_src[16],"/usr/games");
+ strcpy(cp_src[17],"/usr/include");
+ strcpy(cp_src[18],"/usr/lib");
+ strcpy(cp_src[19],"/usr/local");
+ strcpy(cp_src[20],"/usr/local/OpenOffice.org1.1.3");
+ strcpy(cp_src[21],"/usr/X11R6");
+ strcpy(cp_src[22],"/usr/libdata");
+ strcpy(cp_src[23],"/usr/libexec");
+ strcpy(cp_src[24],"/usr/obj");
+ strcpy(cp_src[25],"/usr/sbin");
+ strcpy(cp_src[26],"/usr/share");
+ strcpy(cp_src[27],"/usr/src");
+ strcpy(cp_src[28],"");
+ } else {
+ snprintf(file_path, 256, "%s%s", a->os_root, SOURCES_CONF_FILE);
+ sources_conf = fopen(file_path, "r");
+ i_log(a, "Reading %s%s", a->os_root, SOURCES_CONF_FILE);
+ while(fgets(line, 256, sources_conf) != NULL && lines < 63) {
+ if(strlen(line)>0)
+ line[strlen(line)-1] = '\0';
+ strlcpy(cp_src[lines], line, 256);
+ i_log(a,"Adding %s to copy source table.", cp_src[lines]);
+ lines++;
+ }
+ i_log(a,"Added %i total items to copy source table.", lines);
+ strcpy(cp_src[lines], "");
+ fclose(sources_conf);
+ }
+
+ cmds = commands_new();
+
+ /*
+ * If swap isn't mounted yet, mount it.
+ */
+ if (measure_activated_swap(a) == 0) {
+ for (sp = slice_subpartition_first(storage_get_selected_slice(a->s));
+ sp != NULL; sp = subpartition_next(sp)) {
+ if (!subpartition_is_swap(sp))
+ continue;
+ command_add(cmds, "%s%s %sdev/%s",
+ a->os_root,
+ cmd_name(a, "SWAPON"),
+ a->os_root,
+ subpartition_get_device_name(sp));
+ }
+ }
+
+ /*
+ * Unmount anything already mounted on /mnt.
+ */
+ unmount_all_under(a, cmds, "%smnt", a->os_root);
+
+ /*
+ * Create mount points and mount subpartitions on them.
+ */
+ for (sp = slice_subpartition_first(storage_get_selected_slice(a->s));
+ sp != NULL; sp = subpartition_next(sp)) {
+ if (subpartition_is_swap(sp)) {
+ /*
+ * Set this subpartition as the dump device.
+ */
+#ifdef AUTOMATICALLY_ENABLE_CRASH_DUMPS
+ if (subpartition_get_capacity(sp) < storage_get_memsize(a->s))
+ continue;
+
+ command_add(cmds, "%s%s -v %sdev/%s",
+ a->os_root, cmd_name(a, "DUMPON"),
+ a->os_root,
+ subpartition_get_device_name(sp));
+
+ asprintf(&string, "/dev/%s",
+ subpartition_get_device_name(sp));
+ config_var_set(rc_conf, "dumpdev", string);
+ free(string);
+ config_var_set(rc_conf, "dumpdir", "/var/crash");
+#endif
+ continue;
+ }
+
+ if (strcmp(subpartition_get_mountpoint(sp), "/") != 0) {
+ command_add(cmds, "%s%s -p %smnt%s",
+ a->os_root, cmd_name(a, "MKDIR"),
+ a->os_root, subpartition_get_mountpoint(sp));
+ }
+
+ /*
+ * Don't mount it if it's MFS-backed.
+ */
+
+ if (subpartition_is_mfsbacked(sp)) {
+ continue;
+ }
+
+ command_add(cmds, "%s%s %sdev/%s %smnt%s",
+ a->os_root, cmd_name(a, "MOUNT"),
+ a->os_root,
+ subpartition_get_device_name(sp),
+ a->os_root,
+ subpartition_get_mountpoint(sp));
+ }
+
+ /*
+ * Actually copy files now.
+ */
+
+ for (i = 0; cp_src[i] != NULL && cp_src[i][0] != '\0'; i++) {
+ char *src, *dest, *dn, *tmp_dest;
+
+ dest = cp_src[i];
+
+ /*
+ * If dest would be on an MFS-backed
+ * mountpoint, don't bother copying it.
+ */
+ sp = subpartition_of(storage_get_selected_slice(a->s),
+ "%s%s", a->os_root, &dest[1]);
+ if (sp != NULL && subpartition_is_mfsbacked(sp)) {
+ continue;
+ }
+
+ /*
+ * Create intermediate directories, if needed.
+ */
+ tmp_dest = aura_strdup(dest);
+ dn = dirname(tmp_dest);
+ if (is_dir("%s%s", a->os_root, &dn[1]) &&
+ !is_dir("%smnt%s", a->os_root, dn)) {
+ command_add(cmds, "%s%s -p %smnt%s",
+ a->os_root, cmd_name(a, "MKDIR"),
+ a->os_root, dn);
+ }
+ aura_free(tmp_dest, "directory name");
+
+ /*
+ * If a directory by the same name but with the suffix
+ * ".hdd" exists on the installation media, cpdup that
+ * instead. This is particularly useful with /etc, which
+ * may have significantly different behaviour on the
+ * live CD compared to a standard HDD boot.
+ */
+ if (is_dir("%s%s.hdd", a->os_root, &dest[1]))
+ asprintf(&src, "%s.hdd", &dest[1]);
+ else
+ asprintf(&src, "%s", &dest[1]);
+
+ if (is_dir("%s%s", a->os_root, src) || is_file("%s%s", a->os_root, src)) {
+ /*
+ * Cpdup the chosen file or directory onto the HDD.
+ * if it exists on the source.
+ */
+ cmd = command_add(cmds, "%s%s %s%s %smnt%s",
+ a->os_root, cmd_name(a, "CPDUP"),
+ a->os_root, src,
+ a->os_root, dest);
+ command_set_log_mode(cmd, COMMAND_LOG_QUIET);
+ }
+ }
+
+ /*
+ * Now, because cpdup does not cross mount points,
+ * we must copy anything that the user might've made a
+ * seperate mount point for (e.g. /usr/libdata/lint.)
+ */
+ for (sp = slice_subpartition_first(storage_get_selected_slice(a->s));
+ sp != NULL; sp = subpartition_next(sp)) {
+ /*
+ * If the subpartition is a swap subpartition or an
+ * MFS-backed mountpoint, don't try to copy anything
+ * into it.
+ */
+ if (subpartition_is_swap(sp) || subpartition_is_mfsbacked(sp))
+ continue;
+
+ /*
+ * If the mountpoint doesn't even exist on the installation
+ * medium, don't try to copy anything from it! We assume
+ * it's an empty subpartition for the user's needs.
+ */
+ if (!is_dir("%s%s", a->os_root, &subpartition_get_mountpoint(sp)[1]))
+ continue;
+
+ /*
+ * Don't bother copying the mountpoint IF:
+ * - we've already said to copy it, or something besides it
+ * (it's a prefix of something in cp_src); or
+ * - we haven't said to copy it
+ * (nothing in cp_src is a prefix of it.)
+ */
+ seen_it = 0;
+ prefix = 0;
+ for (i = 0; cp_src[i] != NULL && cp_src[i][0] != '\0'; i++) {
+ if (strncmp(subpartition_get_mountpoint(sp), cp_src[i],
+ strlen(subpartition_get_mountpoint(sp))) == 0) {
+ seen_it = 1;
+ break;
+ }
+ if (strncmp(cp_src[i], subpartition_get_mountpoint(sp),
+ strlen(cp_src[i])) == 0) {
+ prefix = 1;
+ }
+ }
+ if (seen_it || !prefix)
+ continue;
+
+ /*
+ * Otherwise, cpdup the subpartition.
+ *
+ * XXX check for .hdd-extended source dirs here, too,
+ * eventually - but for now, /etc.hdd will never be
+ * the kind of tricky sub-mount-within-a-mount-point
+ * that this part of the code is meant to handle.
+ */
+ cmd = command_add(cmds, "%s%s %s%s %smnt%s",
+ a->os_root, cmd_name(a, "CPDUP"),
+ a->os_root, &subpartition_get_mountpoint(sp)[1],
+ a->os_root, subpartition_get_mountpoint(sp));
+ command_set_log_mode(cmd, COMMAND_LOG_QUIET);
+ }
+
+ /*
+ * Create symlinks.
+ */
+
+ /*
+ * If the user has both /var and /tmp subparitions,
+ * symlink /var/tmp to /tmp.
+ */
+ if (subpartition_find(storage_get_selected_slice(a->s), "/tmp") != NULL &&
+ subpartition_find(storage_get_selected_slice(a->s), "/var") != NULL) {
+ command_add(cmds, "%s%s 1777 %smnt/tmp",
+ a->os_root, cmd_name(a, "CHMOD"), a->os_root);
+ command_add(cmds, "%s%s -rf %smnt/var/tmp",
+ a->os_root, cmd_name(a, "RM"), a->os_root);
+ command_add(cmds, "%s%s -s /tmp %smnt/var/tmp",
+ a->os_root, cmd_name(a, "LN"), a->os_root);
+ }
+
+ /*
+ * If the user has /var, but no /tmp,
+ * symlink /tmp to /var/tmp.
+ */
+ if (subpartition_find(storage_get_selected_slice(a->s), "/tmp") == NULL &&
+ subpartition_find(storage_get_selected_slice(a->s), "/var") != NULL) {
+ command_add(cmds, "%s%s -rf %smnt/tmp",
+ a->os_root, cmd_name(a, "RM"), a->os_root);
+ command_add(cmds, "%s%s -s /var/tmp %smnt/tmp",
+ a->os_root, cmd_name(a, "LN"), a->os_root);
+ }
+
+ /*
+ * If the user has /usr, but no /home,
+ * symlink /home to /usr/home.
+ */
+ if (subpartition_find(storage_get_selected_slice(a->s), "/home") == NULL &&
+ subpartition_find(storage_get_selected_slice(a->s), "/usr") != NULL) {
+ command_add(cmds, "%s%s -rf %smnt/home",
+ a->os_root, cmd_name(a, "RM"), a->os_root);
+ command_add(cmds, "%s%s %smnt/usr/home",
+ a->os_root, cmd_name(a, "MKDIR"), a->os_root);
+ command_add(cmds, "%s%s -s /usr/home %smnt/home",
+ a->os_root, cmd_name(a, "LN"), a->os_root);
+ }
+
+ /*
+ * XXX check for other possible combinations too?
+ */
+
+ /*
+ * Clean up. In case some file didn't make it, use rm -f
+ */
+#ifdef __DragonFly__
+ command_add(cmds, "%s%s -f %smnt/boot/loader.conf",
+ a->os_root, cmd_name(a, "RM"), a->os_root);
+#endif
+ command_add(cmds, "%s%s -f %smnt/tmp/install.log",
+ a->os_root, cmd_name(a, "RM"), a->os_root);
+
+ /*
+ * Copy pristine versions over any files we might have installed.
+ * This allows the resulting file tree to be customized.
+ */
+ for (i = 0; cp_src[i] != NULL && cp_src[i][0] != '\0'; i++) {
+ char *src, *dest, *dn, *tmp_dest;
+
+ src = cp_src[i];
+ dest = cp_src[i];
+
+ /*
+ * Get the directory that the desired thing to
+ * copy resides in.
+ */
+ tmp_dest = aura_strdup(dest);
+ dn = dirname(tmp_dest);
+
+ /*
+ * If this dir doesn't exist in PRISTINE_DIR
+ * on the install media, just skip it.
+ */
+ if (!is_dir("%s%s%s", a->os_root, PRISTINE_DIR, dn)) {
+ aura_free(tmp_dest, _("directory name"));
+ continue;
+ }
+
+ /*
+ * Create intermediate directories, if needed.
+ */
+ if (!is_dir("%smnt%s", a->os_root, dn)) {
+ command_add(cmds, "%s%s -p %smnt%s",
+ a->os_root, cmd_name(a, "MKDIR"),
+ a->os_root, dn);
+ }
+ aura_free(tmp_dest, "directory name");
+
+ /*
+ * Cpdup the chosen file or directory onto the HDD.
+ */
+ cmd = command_add(cmds, "%s%s %s%s %smnt%s",
+ a->os_root, cmd_name(a, "CPDUP"),
+ a->os_root, src,
+ a->os_root, dest);
+
+ cmd = command_add(cmds,
+ "%s%s %s%s%s %smnt%s",
+ a->os_root, cmd_name(a, "CPDUP"),
+ a->os_root, PRISTINE_DIR, src,
+ a->os_root, dest);
+ command_set_log_mode(cmd, COMMAND_LOG_QUIET);
+ }
+
+ /*
+ * Rebuild the user database, to get rid of any extra users
+ * from the LiveCD that aren't supposed to be installed
+ * (copying a pristine master.passwd isn't enough.)
+ */
+ command_add(cmds, "%s%s -p -d %smnt/etc %smnt/etc/master.passwd",
+ a->os_root, cmd_name(a, "PWD_MKDB"), a->os_root, a->os_root);
+
+ /* Create missing directories. */
+ command_add(cmds, "%s%s %smnt/proc",
+ a->os_root, cmd_name(a, "MKDIR"), a->os_root);
+ command_add(cmds, "%s%s %smnt/mnt",
+ a->os_root, cmd_name(a, "MKDIR"), a->os_root);
+
+ /* Write new fstab. */
+
+ command_add(cmds, "%s%s '%s' >%smnt/etc/fstab",
+ a->os_root, cmd_name(a, "ECHO"),
+ "# Device\t\tMountpoint\tFStype\tOptions\t\tDump\tPass#",
+ a->os_root);
+
+ for (sp = slice_subpartition_first(storage_get_selected_slice(a->s));
+ sp != NULL; sp = subpartition_next(sp)) {
+ if (strcmp(subpartition_get_mountpoint(sp), "/") == 0) {
+ command_add(cmds, "%s%s '/dev/%s\t\t%s\t\tufs\trw\t\t1\t1' >>%smnt/etc/fstab",
+ a->os_root, cmd_name(a, "ECHO"),
+ subpartition_get_device_name(sp),
+ subpartition_get_mountpoint(sp),
+ a->os_root);
+ } else if (strcmp(subpartition_get_mountpoint(sp), "swap") == 0) {
+ command_add(cmds, "%s%s '/dev/%s\t\tnone\t\tswap\tsw\t\t0\t0' >>%smnt/etc/fstab",
+ a->os_root, cmd_name(a, "ECHO"),
+ subpartition_get_device_name(sp),
+ a->os_root);
+ } else if (subpartition_is_mfsbacked(sp)) {
+ mfsbacked_size = slice_get_capacity(storage_get_selected_slice(a->s)) * 2048;
+ command_add(cmds, "%s%s 'swap\t\t%s\t\t\tmfs\trw,-s%ld\t\t1\t1' >>%smnt/etc/fstab",
+ a->os_root, cmd_name(a, "ECHO"),
+ subpartition_get_mountpoint(sp),
+ mfsbacked_size,
+ a->os_root);
+ } else {
+ command_add(cmds, "%s%s '/dev/%s\t\t%s\t\tufs\trw\t\t2\t2' >>%smnt/etc/fstab",
+ a->os_root, cmd_name(a, "ECHO"),
+ subpartition_get_device_name(sp),
+ subpartition_get_mountpoint(sp),
+ a->os_root);
+ }
+ }
+
+ command_add(cmds, "%s%s '%s' >>%smnt/etc/fstab",
+ a->os_root, cmd_name(a, "ECHO"),
+ "proc\t\t\t/proc\t\tprocfs\trw\t\t0\t0",
+ a->os_root);
+
+ /* Backup the disklabel and the log. */
+
+ command_add(cmds, "%s%s %s > %smnt/etc/disklabel.%s",
+ a->os_root, cmd_name(a, "DISKLABEL"),
+ slice_get_device_name(storage_get_selected_slice(a->s)),
+ a->os_root,
+ slice_get_device_name(storage_get_selected_slice(a->s)));
+ command_add(cmds, "%s%s %sinstall.log %smnt/var/log/install.log",
+ a->os_root, cmd_name(a, "CP"),
+ a->tmp, a->os_root);
+ command_add(cmds, "%s%s 600 %smnt/var/log/install.log",
+ a->os_root, cmd_name(a, "CHMOD"), a->os_root);
+
+ /* Customize stuff here */
+ if(is_file("%susr/local/bin/after_installation_routines.sh")) {
+ command_add(cmds, "%susr/local/bin/after_installation_routines.sh",
+ a->os_root, _("Running after installation custom routines..."));
+ }
+
+ /*
+ * Do it!
+ */
+ /* commands_preview(cmds); */
+ if (!commands_execute(a, cmds)) {
+ inform(a->c, _("%s was not fully installed."), OPERATING_SYSTEM_NAME);
+ a->result = 0;
+ } else {
+ a->result = 1;
+ }
+ commands_free(cmds);
+
+ /*
+ * Unmount everything we mounted on /mnt. This is done in a seperate
+ * command chain, so that partitions are unmounted, even if an error
+ * occurs in one of the preceding commands, or it is cancelled.
+ */
+ cmds = commands_new();
+ unmount_all_under(a, cmds, "%smnt", a->os_root);
+
+ /*
+ * Once everything is unmounted, if the install went successfully,
+ * make sure once and for all that the disklabel is bootable.
+ */
+ if (a->result) {
+ command_add(cmds, "%s%s -B %s",
+ a->os_root, cmd_name(a, "DISKLABEL"),
+ slice_get_device_name(storage_get_selected_slice(a->s)));
+ }
+
+ if (!commands_execute(a, cmds))
+ inform(a->c, _("Warning: subpartitions were not correctly unmounted."));
+
+ commands_free(cmds);
+}
+
Index: contrib/bsdinstaller/src/backend/installer/fn_subpart.c
===================================================================
RCS file: contrib/bsdinstaller/src/backend/installer/fn_subpart.c
diff -N contrib/bsdinstaller/src/backend/installer/fn_subpart.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/src/backend/installer/fn_subpart.c 26 Aug 2005 22:44:36 -0000
@@ -0,0 +1,820 @@
+/*
+ * Copyright (c)2004 The DragonFly Project. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the DragonFly Project nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * fn_subpart.c
+ * Installer Function : Create Subpartitions.
+ * $Id: fn_subpart.c,v 1.51 2005/08/26 22:44:36 cpressey Exp $
+ */
+
+#include
+#include
+#include
+
+#ifdef ENABLE_NLS
+#include
+#define _(String) gettext (String)
+#else
+#define _(String) (String)
+#endif
+
+#ifdef SYSTEM_AURA
+#include
+#include
+#include
+#include
+#else
+#include "mem.h"
+#include "buffer.h"
+#include "dict.h"
+#include "fspred.h"
+#endif
+
+#ifdef SYSTEM_DFUI
+#include
+#include
+#include
+#else
+#include "dfui.h"
+#include "dump.h"
+#include "system.h"
+#endif
+
+#ifdef SYSTEM_LIBINSTALLER
+#include
+#include
+#include
+#include
+#else
+#include "commands.h"
+#include "diskutil.h"
+#include "functions.h"
+#include "uiutil.h"
+#endif
+
+
+#include "fn.h"
+#include "flow.h"
+#include "pathnames.h"
+
+static int create_subpartitions(struct i_fn_args *);
+static long default_capacity(struct storage *, int);
+static int check_capacity(struct i_fn_args *);
+static int check_subpartition_selections(struct dfui_response *, struct i_fn_args *);
+static void save_subpartition_selections(struct dfui_response *, struct i_fn_args *);
+static void populate_create_subpartitions_form(struct dfui_form *, struct i_fn_args *);
+static int warn_subpartition_selections(struct i_fn_args *);
+static struct dfui_form *make_create_subpartitions_form(struct i_fn_args *);
+static int show_create_subpartitions_form(struct dfui_form *, struct i_fn_args *);
+
+const char *def_mountpt[7] = {"/", "swap", "/var", "/tmp", "/usr", "/home", NULL};
+long def_capacity[7] = {128, 128, 128, 128, 256, -1, 0};
+
+int expert = 0;
+
+/*
+ * Given a set of subpartitions-to-be in the selected slice,
+ * create them.
+ */
+static int
+create_subpartitions(struct i_fn_args *a)
+{
+ struct subpartition *sp;
+ struct commands *cmds;
+ int result = 0;
+ int copied_original = 0;
+ int num_partitions;
+
+ cmds = commands_new();
+ if (!is_file("%sinstall.disklabel.%s",
+ a->tmp,
+ slice_get_device_name(storage_get_selected_slice(a->s)))) {
+ /*
+ * Get a copy of the 'virgin' disklabel.
+ * XXX It might make more sense for this to
+ * happen right after format_slice() instead.
+ */
+ command_add(cmds, "%s%s -r %s >%sinstall.disklabel.%s",
+ a->os_root, cmd_name(a, "DISKLABEL"),
+ slice_get_device_name(storage_get_selected_slice(a->s)),
+ a->tmp,
+ slice_get_device_name(storage_get_selected_slice(a->s)));
+ }
+
+ /*
+ * Weave together a new disklabel out the of the 'virgin'
+ * disklabel, and the user's subpartition choices.
+ */
+
+ /*
+ * Take everything from the 'virgin' disklabel up until the
+ * '8 or 16 partitions' line.
+ */
+ num_partitions = 16;
+ command_add(cmds, "%s%s '$2==\"partitions:\" || cut { cut = 1 } !cut { print $0 }' <%sinstall.disklabel.%s >%sinstall.disklabel",
+ a->os_root, cmd_name(a, "AWK"),
+ a->tmp,
+ slice_get_device_name(storage_get_selected_slice(a->s)),
+ a->tmp);
+
+ /*
+ * 8 or 16 partitions:
+ * # size offset fstype [fsize bsize bps/cpg]
+ * c: 2128833 0 unused 0 0 # (Cyl. 0 - 2111*)
+ */
+
+#if defined(__FreeBSD__) && !defined(__DragonFly__)
+ num_partitions = 8;
+#endif
+
+ command_add(cmds, "%s%s '%d partitions:' >>%sinstall.disklabel",
+ a->os_root, cmd_name(a, "ECHO"), num_partitions ,a->tmp);
+ command_add(cmds, "%s%s '%s' >>%sinstall.disklabel",
+ a->os_root, cmd_name(a, "ECHO"),
+ "# size offset fstype [fsize bsize bps/cpg]",
+ a->tmp);
+
+#ifdef DEBUG
+ for (sp = slice_subpartition_first(storage_get_selected_slice(a->s));
+ sp != NULL; sp = subpartition_next(sp)) {
+ command_add(cmds, "%s%s 'mountpoint: %s device: %s'",
+ a->os_root, cmd_name(a, "ECHO"),
+ subpartition_get_mountpoint(sp),
+ subpartition_get_device_name(sp));
+ }
+#endif
+
+ /*
+ * Write a line for each subpartition the user wants.
+ */
+ for (sp = slice_subpartition_first(storage_get_selected_slice(a->s));
+ sp != NULL; sp = subpartition_next(sp)) {
+ if (subpartition_is_mfsbacked(sp)) {
+ continue;
+ }
+ if (subpartition_get_letter(sp) > 'c' && !copied_original) {
+ /*
+ * Copy the 'c' line from the 'virgin' disklabel.
+ */
+ command_add(cmds, "%s%s '^ c:' %sinstall.disklabel.%s >>%sinstall.disklabel",
+ a->os_root, cmd_name(a, "GREP"),
+ a->tmp,
+ slice_get_device_name(storage_get_selected_slice(a->s)),
+ a->tmp);
+ copied_original = 1;
+ }
+ if (subpartition_is_swap(sp)) {
+ command_add(cmds, "%s%s ' %c:\t%s\t*\tswap' >>%sinstall.disklabel",
+ a->os_root, cmd_name(a, "ECHO"),
+ subpartition_get_letter(sp),
+ capacity_to_string(subpartition_get_capacity(sp)),
+ a->tmp);
+ } else {
+ command_add(cmds, "%s%s ' %c:\t%s\t%s\t4.2BSD\t%ld\t%ld\t99' >>%sinstall.disklabel",
+ a->os_root, cmd_name(a, "ECHO"),
+ subpartition_get_letter(sp),
+ capacity_to_string(subpartition_get_capacity(sp)),
+ subpartition_get_letter(sp) == 'a' ? "0" : "*",
+ subpartition_get_fsize(sp),
+ subpartition_get_bsize(sp),
+ a->tmp);
+ }
+ }
+ if (!copied_original) {
+ /*
+ * Copy the 'c' line from the 'virgin' disklabel,
+ * if we haven't yet (less than 2 subpartitions.)
+ */
+ command_add(cmds, "%s%s '^ c:' %sinstall.disklabel.%s >>%sinstall.disklabel",
+ a->os_root, cmd_name(a, "GREP"),
+ a->tmp,
+ slice_get_device_name(storage_get_selected_slice(a->s)),
+ a->tmp);
+ }
+ temp_file_add(a, "install.disklabel");
+
+ /*
+ * Label the slice from the disklabel we just wove together.
+ */
+ command_add(cmds, "%s%s -R -B -r %s %sinstall.disklabel",
+ a->os_root, cmd_name(a, "DISKLABEL"),
+ slice_get_device_name(storage_get_selected_slice(a->s)),
+ a->tmp);
+
+ /*
+ * Create a snapshot of the disklabel we just created
+ * for debugging inspection in the log.
+ */
+ command_add(cmds, "%s%s %s",
+ a->os_root, cmd_name(a, "DISKLABEL"),
+ slice_get_device_name(storage_get_selected_slice(a->s)));
+
+ /*
+ * Create filesystems on the newly-created subpartitions.
+ */
+ for (sp = slice_subpartition_first(storage_get_selected_slice(a->s));
+ sp != NULL; sp = subpartition_next(sp)) {
+ if (subpartition_is_swap(sp) || subpartition_is_mfsbacked(sp))
+ continue;
+
+ /*
+ * Ensure that all the needed device nodes exist.
+ */
+ command_add_ensure_dev(a, cmds,
+ disk_get_device_name(storage_get_selected_disk(a->s)));
+ command_add_ensure_dev(a, cmds,
+ slice_get_device_name(storage_get_selected_slice(a->s)));
+ command_add_ensure_dev(a, cmds,
+ subpartition_get_device_name(sp));
+
+ command_add(cmds, "%s%s%s %sdev/%s",
+ a->os_root, cmd_name(a, "NEWFS"),
+ subpartition_is_softupdated(sp) ? " -U" : "",
+ a->os_root,
+ subpartition_get_device_name(sp));
+ }
+
+ result = commands_execute(a, cmds);
+ commands_free(cmds);
+ return(result);
+}
+
+/*
+ * +-------+------------+--------------+-----------------+-----------------+
+ * | Mtpt | Matt says | FreeBSD says | I got away with | A tiny system |
+ * +-------+------------+--------------+-----------------+-----------------+
+ * | / | 256M | 100M | 256M | 64M |
+ * | swap | 1G | 2 or 3 * mem | (4 * mem) 256M | (1 * mem) 64M |
+ * | /var | 256M | 50M | 256M | 12M |
+ * | /tmp | 256M | --- | 256M | --- |
+ * | /usr | [4G to] 8G | (>160M) rest | 5G | 160M |
+ * | /home | rest | --- | 3.5G | --- |
+ * +-------+------------+--------------+-----------------+-----------------+
+ * | total | 10G+ | ~430M+ | 9.5G | 300M |
+ * +-------+------------+--------------+-----------------+-----------------+
+ */
+
+static long
+default_capacity(struct storage *s, int mtpt)
+{
+ unsigned long swap;
+ unsigned long capacity;
+
+ if (mtpt == MTPT_HOME)
+ return(-1);
+
+ capacity = slice_get_capacity(storage_get_selected_slice(s));
+ swap = 2 * storage_get_memsize(s);
+ if (storage_get_memsize(s) > (capacity / 2) || capacity < 4096)
+ swap = storage_get_memsize(s);
+
+ if (capacity < DISK_MIN) {
+ /*
+ * For the purposes of this installer:
+ * can't be done. Sorry.
+ */
+ return(-1);
+ } else if (capacity < 523) {
+ switch (mtpt) {
+ case MTPT_ROOT: return(70);
+ case MTPT_SWAP: return(swap);
+ case MTPT_VAR: return(32);
+ case MTPT_TMP: return(32);
+ case MTPT_USR: return(174);
+ }
+ } else if (capacity < 1024) {
+ switch (mtpt) {
+ case MTPT_ROOT: return(96);
+ case MTPT_SWAP: return(swap);
+ case MTPT_VAR: return(64);
+ case MTPT_TMP: return(64);
+ case MTPT_USR: return(256);
+ }
+ } else if (capacity < 4096) {
+ switch (mtpt) {
+ case MTPT_ROOT: return(128);
+ case MTPT_SWAP: return(swap);
+ case MTPT_VAR: return(128);
+ case MTPT_TMP: return(128);
+ case MTPT_USR: return(512);
+ }
+ } else if (capacity < 10240) {
+ switch (mtpt) {
+ case MTPT_ROOT: return(256);
+ case MTPT_SWAP: return(swap);
+ case MTPT_VAR: return(256);
+ case MTPT_TMP: return(256);
+ case MTPT_USR: return(3072);
+ }
+ } else {
+ switch (mtpt) {
+ case MTPT_ROOT: return(256);
+ case MTPT_SWAP: return(swap);
+ case MTPT_VAR: return(256);
+ case MTPT_TMP: return(256);
+ case MTPT_USR: return(8192);
+ }
+ }
+ /* shouldn't ever happen */
+ return(-1);
+}
+
+static int
+check_capacity(struct i_fn_args *a)
+{
+ struct subpartition *sp;
+ unsigned long min_capacity[7] = {70, 0, 8, 0, 174, 0, 0};
+ unsigned long total_capacity = 0;
+ int mtpt;
+
+ if (subpartition_find(storage_get_selected_slice(a->s), "/usr") == NULL)
+ min_capacity[MTPT_ROOT] += min_capacity[MTPT_USR];
+
+ for (sp = slice_subpartition_first(storage_get_selected_slice(a->s));
+ sp != NULL; sp = subpartition_next(sp)) {
+ total_capacity += subpartition_get_capacity(sp);
+ for (mtpt = 0; def_mountpt[mtpt] != NULL; mtpt++) {
+ if (strcmp(subpartition_get_mountpoint(sp), def_mountpt[mtpt]) == 0 &&
+ min_capacity[mtpt] > 0 &&
+ subpartition_get_capacity(sp) < min_capacity[mtpt]) {
+ inform(a->c, _("WARNING: the %s subpartition should "
+ "be at least %dM in size or you will "
+ "risk running out of space during "
+ "the installation."),
+ subpartition_get_mountpoint(sp), min_capacity[mtpt]);
+ }
+ }
+ }
+
+ if (total_capacity > slice_get_capacity(storage_get_selected_slice(a->s))) {
+ inform(a->c, _("The space allocated to all of your selected "
+ "subpartitions (%dM) exceeds the total "
+ "capacity of the selected primary partition "
+ "(%dM). Remove some subpartitions or choose "
+ "a smaller size for them and try again."),
+ total_capacity, slice_get_capacity(storage_get_selected_slice(a->s)));
+ return(0);
+ }
+
+ return(1);
+}
+
+static int
+check_subpartition_selections(struct dfui_response *r, struct i_fn_args *a)
+{
+ struct dfui_dataset *ds;
+ struct dfui_dataset *star_ds = NULL;
+ struct aura_dict *d;
+ const char *mountpoint, *capstring;
+ long capacity = 0;
+ long bsize, fsize;
+ int found_root = 0;
+ int softupdates, mfsbacked;
+ int valid = 1;
+
+ d = aura_dict_new(1, AURA_DICT_LIST);
+
+ if ((ds = dfui_response_dataset_get_first(r)) == NULL) {
+ inform(a->c, _("Please set up at least one subpartition."));
+ valid = 0;
+ }
+
+ for (ds = dfui_response_dataset_get_first(r); valid && ds != NULL;
+ ds = dfui_dataset_get_next(ds)) {
+#ifdef DEBUG
+ dfui_dataset_dump(ds);
+#endif
+ mountpoint = dfui_dataset_get_value(ds, "mountpoint");
+ capstring = dfui_dataset_get_value(ds, "capacity");
+
+ if (expert) {
+ softupdates =
+ (strcmp(dfui_dataset_get_value(ds, "softupdates"), "Y") == 0);
+ fsize = atol(dfui_dataset_get_value(ds, "fsize"));
+ bsize = atol(dfui_dataset_get_value(ds, "bsize"));
+ mfsbacked = (strcmp(dfui_dataset_get_value(ds, "mfsbacked"), "Y") == 0);
+ } else {
+ softupdates = (strcmp(mountpoint, "/") == 0 ? 0 : 1);
+ mfsbacked = (strcmp(mountpoint, "/tmp") == 0 ? 0 : 1);
+ fsize = -1;
+ bsize = -1;
+ }
+
+ if (aura_dict_exists(d, mountpoint, strlen(mountpoint) + 1)) {
+ inform(a->c, _("The same mount point cannot be specified "
+ "for two different subpartitions."));
+ valid = 0;
+ }
+
+ if (strcmp(mountpoint, "/") == 0)
+ found_root = 1;
+
+ if (strcmp(capstring, "*") == 0) {
+ if (star_ds != NULL) {
+ inform(a->c, _("You cannot have more than one subpartition "
+ "with a '*' capacity (meaning 'use the remainder "
+ "of the primary partition'.)"));
+ valid = 0;
+ } else {
+ star_ds = ds;
+ }
+ }
+
+ if (!(!strcasecmp(mountpoint, "swap") || mountpoint[0] == '/')) {
+ inform(a->c, _("Mount point must be either 'swap', or it must "
+ "start with a '/'."));
+ valid = 0;
+ }
+
+ if (strpbrk(mountpoint, " \\\"'`") != NULL) {
+ inform(a->c, _("Mount point may not contain the following "
+ "characters: blank space, backslash, or "
+ "single, double, or back quotes."));
+ valid = 0;
+ }
+
+ if (strlen(capstring) == 0) {
+ inform(a->c, _("A capacity must be specified."));
+ valid = 0;
+ }
+
+ if (!string_to_capacity(capstring, &capacity)) {
+ inform(a->c, _("Capacity must be either a '*' symbol to indicate "
+ "'use the rest of the primary partition', or it "
+ "must be a series of decimal digits ending with a "
+ "'M' (indicating megabytes) or a 'G' (indicating "
+ "gigabytes.)"));
+ valid = 0;
+ }
+
+ /*
+ * If we made it through that obstacle course, all is well.
+ */
+
+ if (valid)
+ aura_dict_store(d, mountpoint, strlen(mountpoint) + 1, "", 1);
+ }
+
+ if (!found_root) {
+ inform(a->c, _("You must include a / (root) subpartition."));
+ valid = 0;
+ }
+
+ if (aura_dict_size(d) > 16) {
+ inform(a->c, _("You cannot have more than 16 subpartitions "
+ "on a single primary partition. Remove some "
+ "and try again."));
+ valid = 0;
+ }
+
+ aura_dict_free(d);
+
+ return(valid);
+}
+
+static void
+save_subpartition_selections(struct dfui_response *r, struct i_fn_args *a)
+{
+ struct dfui_dataset *ds;
+ char mfsbacked;
+ const char *mountpoint, *capstring;
+ long capacity;
+ long bsize, fsize;
+ int softupdates;
+ int valid = 1;
+
+ subpartitions_free(storage_get_selected_slice(a->s));
+
+ for (ds = dfui_response_dataset_get_first(r); valid && ds != NULL;
+ ds = dfui_dataset_get_next(ds)) {
+ mountpoint = dfui_dataset_get_value(ds, "mountpoint");
+ capstring = dfui_dataset_get_value(ds, "capacity");
+
+ if (expert) {
+ softupdates =
+ (strcmp(dfui_dataset_get_value(ds, "softupdates"), "Y") == 0);
+ fsize = atol(dfui_dataset_get_value(ds, "fsize"));
+ bsize = atol(dfui_dataset_get_value(ds, "bsize"));
+ mfsbacked = (strcmp(dfui_dataset_get_value(ds, "msfbacked"), "Y") == 0);
+ } else {
+ softupdates = (strcmp(mountpoint, "/") == 0 ? 0 : 1);
+ mfsbacked = 0;
+ fsize = -1;
+ bsize = -1;
+ }
+
+ if (string_to_capacity(capstring, &capacity)) {
+ subpartition_new(storage_get_selected_slice(a->s), mountpoint, capacity,
+ softupdates, fsize, bsize, mfsbacked);
+ }
+ }
+}
+
+static void
+populate_create_subpartitions_form(struct dfui_form *f, struct i_fn_args *a)
+{
+ struct subpartition *sp;
+ struct dfui_dataset *ds;
+ char temp[32];
+ int mtpt;
+ long capacity;
+
+ if (slice_subpartition_first(storage_get_selected_slice(a->s)) != NULL) {
+ /*
+ * The user has already given us their subpartition
+ * preferences, so use them here.
+ */
+ for (sp = slice_subpartition_first(storage_get_selected_slice(a->s));
+ sp != NULL; sp = subpartition_next(sp)) {
+ ds = dfui_dataset_new();
+ dfui_dataset_celldata_add(ds, "mountpoint",
+ subpartition_get_mountpoint(sp));
+ dfui_dataset_celldata_add(ds, "capacity",
+ capacity_to_string(subpartition_get_capacity(sp)));
+ if (expert) {
+ dfui_dataset_celldata_add(ds, "softupdates",
+ subpartition_is_softupdated(sp) ? "Y" : "N");
+ dfui_dataset_celldata_add(ds, "mfsbacked",
+ subpartition_is_mfsbacked(sp) ? "Y" : "N");
+ snprintf(temp, 32, "%ld", subpartition_get_fsize(sp));
+ dfui_dataset_celldata_add(ds, "fsize",
+ temp);
+ snprintf(temp, 32, "%ld", subpartition_get_bsize(sp));
+ dfui_dataset_celldata_add(ds, "bsize",
+ temp);
+ }
+ dfui_form_dataset_add(f, ds);
+ }
+ } else {
+ /*
+ * Otherwise, populate the form with datasets representing
+ * reasonably-calculated defaults. The defaults are chosen
+ * based on the slice's total capacity and the machine's
+ * total physical memory (for swap.)
+ */
+ for (mtpt = 0; def_mountpt[mtpt] != NULL; mtpt++) {
+ capacity = default_capacity(a->s, mtpt);
+ ds = dfui_dataset_new();
+ dfui_dataset_celldata_add(ds, "mountpoint",
+ def_mountpt[mtpt]);
+ dfui_dataset_celldata_add(ds, "capacity",
+ capacity_to_string(capacity));
+ if (expert) {
+ dfui_dataset_celldata_add(ds, "softupdates",
+ strcmp(def_mountpt[mtpt], "/") != 0 ? "Y" : "N");
+ dfui_dataset_celldata_add(ds, "mfsbacked",
+ "N");
+ dfui_dataset_celldata_add(ds, "fsize",
+ capacity < 1024 ? "1024" : "2048");
+ dfui_dataset_celldata_add(ds, "bsize",
+ capacity < 1024 ? "8192" : "16384");
+ }
+ dfui_form_dataset_add(f, ds);
+ }
+ }
+}
+
+static int
+warn_subpartition_selections(struct i_fn_args *a)
+{
+ int valid = 0;
+ struct aura_buffer *omit, *consequences;
+
+ omit = aura_buffer_new(2048);
+ consequences = aura_buffer_new(2048);
+
+ valid = check_capacity(a);
+ if (subpartition_find(storage_get_selected_slice(a->s), "/var") == NULL) {
+ aura_buffer_cat(omit, "/var ");
+ aura_buffer_cat(consequences, _("/var will be a plain dir in /\n"));
+ }
+ if (subpartition_find(storage_get_selected_slice(a->s), "/usr") == NULL) {
+ aura_buffer_cat(omit, "/usr ");
+ aura_buffer_cat(consequences, _("/usr will be a plain dir in /\n"));
+ }
+ if (subpartition_find(storage_get_selected_slice(a->s), "/tmp") == NULL) {
+ aura_buffer_cat(omit, "/tmp ");
+ aura_buffer_cat(consequences, _("/tmp will be symlinked to /var/tmp\n"));
+ }
+ if (subpartition_find(storage_get_selected_slice(a->s), "/home") == NULL) {
+ aura_buffer_cat(omit, "/home ");
+ aura_buffer_cat(consequences, _("/home will be symlinked to /usr/home\n"));
+ }
+
+ if (valid && aura_buffer_len(omit) > 0) {
+ switch (dfui_be_present_dialog(a->c, _("Really omit?"),
+ _("Omit Subpartition(s)|Return to Create Subpartitions"),
+ _("You have elected to not have the following "
+ "subpartition(s):\n\n%s\n\n"
+ "The ramifications of these subpartition(s) being "
+ "missing will be:\n\n%s\n"
+ "Is this really what you want to do?"),
+ aura_buffer_buf(omit), aura_buffer_buf(consequences))) {
+ case 1:
+ valid = 1;
+ break;
+ case 2:
+ valid = 0;
+ break;
+ default:
+ abort_backend();
+ }
+ }
+
+ aura_buffer_free(omit);
+ aura_buffer_free(consequences);
+
+ return(!valid);
+}
+
+static struct dfui_form *
+make_create_subpartitions_form(struct i_fn_args *a)
+{
+ struct dfui_field *fi;
+ struct dfui_form *f;
+ char msg_buf[1][1024];
+
+ snprintf(msg_buf[0], sizeof(msg_buf[0]),
+ _("Subpartitions further divide a primary partition for "
+ "use with %s. Some reasons you may want "
+ "a set of subpartitions are:\n\n"
+ "- you want to restrict how much data can be written "
+ "to certain parts of the primary partition, to quell "
+ "denial-of-service attacks; and\n"
+ "- you want to speed up access to data on the disk."
+ ""), OPERATING_SYSTEM_NAME);
+
+ f = dfui_form_create(
+ "create_subpartitions",
+ _("Create Subpartitions"),
+ _("Set up the subpartitions (also known as just `partitions' "
+ "in BSD tradition) you want to have on this primary "
+ "partition.\n\n"
+ "For Capacity, use 'M' to indicate megabytes, 'G' to "
+ "indicate gigabytes, or a single '*' to indicate "
+ "'use the remaining space on the primary partition'."),
+
+ msg_buf[0],
+
+ "p", "special", "dfinstaller_create_subpartitions",
+ "p", "minimum_width","64",
+
+ "f", "mountpoint", _("Mountpoint"), "", "",
+ "f", "capacity", _("Capacity"), "", "",
+
+ "a", "ok", _("Accept and Create"), "", "",
+ "a", "cancel",
+ (disk_get_formatted(storage_get_selected_disk(a->s)) ?
+ _("Return to Select Disk") :
+ _("Return to Select Primary Partition")), "", "",
+ "p", "accelerator", "ESC",
+
+ NULL
+ );
+
+ dfui_form_set_multiple(f, 1);
+ dfui_form_set_extensible(f, 1);
+
+ if (expert) {
+ fi = dfui_form_field_add(f, "softupdates",
+ dfui_info_new(_("Softupdates"), "", ""));
+ dfui_field_property_set(fi, "control", "checkbox");
+
+ fi = dfui_form_field_add(f, "mfsbacked",
+ dfui_info_new(_("MFS"), "", ""));
+ dfui_field_property_set(fi, "control", "checkbox");
+
+ fi = dfui_form_field_add(f, "fsize",
+ dfui_info_new(_("Frag Sz"), "", ""));
+
+ fi = dfui_form_field_add(f, "bsize",
+ dfui_info_new(_("Block Sz"), "", ""));
+
+ dfui_form_action_add(f, "switch",
+ dfui_info_new(_("Switch to Normal Mode"), "", ""));
+ } else {
+ dfui_form_action_add(f, "switch",
+ dfui_info_new(_("Switch to Expert Mode"), "", ""));
+ }
+
+ return(f);
+}
+
+/*
+ * Returns:
+ * -1 = the form should be redisplayed
+ * 0 = failure, function is over
+ * 1 = success, function is over
+ */
+static int
+show_create_subpartitions_form(struct dfui_form *f, struct i_fn_args *a)
+{
+ struct dfui_dataset *ds;
+ struct dfui_response *r;
+
+ for (;;) {
+ if (dfui_form_dataset_get_first(f) == NULL)
+ populate_create_subpartitions_form(f, a);
+
+ if (!dfui_be_present(a->c, f, &r))
+ abort_backend();
+
+ if (strcmp(dfui_response_get_action_id(r), "cancel") == 0) {
+ dfui_response_free(r);
+ return(0);
+ } else if (strcmp(dfui_response_get_action_id(r), "switch") == 0) {
+ if (check_subpartition_selections(r, a)) {
+ save_subpartition_selections(r, a);
+ expert = expert ? 0 : 1;
+ dfui_response_free(r);
+ return(-1);
+ }
+ } else {
+ if (check_subpartition_selections(r, a)) {
+ save_subpartition_selections(r, a);
+ if (!warn_subpartition_selections(a)) {
+ if (!create_subpartitions(a)) {
+ inform(a->c, _("The subpartitions you chose were "
+ "not correctly created, and the "
+ "primary partition may "
+ "now be in an inconsistent state. "
+ "We recommend re-formatting it "
+ "before proceeding."));
+ dfui_response_free(r);
+ return(0);
+ } else {
+ dfui_response_free(r);
+ return(1);
+ }
+ }
+ }
+ }
+
+ dfui_form_datasets_free(f);
+ /* dfui_form_datasets_add_from_response(f, r); */
+ for (ds = dfui_response_dataset_get_first(r); ds != NULL;
+ ds = dfui_dataset_get_next(ds)) {
+ dfui_form_dataset_add(f, dfui_dataset_dup(ds));
+ }
+ }
+}
+
+/*
+ * fn_create_subpartitions: let the user specify what subpartitions they
+ * want on the disk, how large each should be, and where it should be mounted.
+ */
+void
+fn_create_subpartitions(struct i_fn_args *a)
+{
+ struct dfui_form *f;
+ int done = 0;
+
+ a->result = 0;
+ while (!done) {
+ f = make_create_subpartitions_form(a);
+ switch (show_create_subpartitions_form(f, a)) {
+ case -1:
+ done = 0;
+ break;
+ case 0:
+ done = 1;
+ a->result = 0;
+ break;
+ case 1:
+ done = 1;
+ a->result = 1;
+ break;
+ }
+ dfui_form_free(f);
+ }
+}
Index: contrib/bsdinstaller/src/backend/installer/fn_zonetab.c
===================================================================
RCS file: contrib/bsdinstaller/src/backend/installer/fn_zonetab.c
diff -N contrib/bsdinstaller/src/backend/installer/fn_zonetab.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/src/backend/installer/fn_zonetab.c 16 Jul 2004 21:04:20 -0000
@@ -0,0 +1,172 @@
+/*
+ * Copyright (c)2004 The DragonFly Project. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the DragonFly Project nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * fn_parsers.c
+ * Installer Function : Parse /usr/share/zoneinfo/zone.tab.
+ * $Id: fn_zonetab.c,v 1.3 2004/07/16 21:04:20 adonijah Exp $
+ */
+
+#include
+#include
+#include
+#include
+#include
+
+#include "fn_zonetab.h"
+
+char *
+zt_readfile(char *buf, int len, FILE *f) {
+ int i;
+ char *cs;
+
+ cs = buf;
+ while (--len > 0 && (i = getc(f)) != EOF)
+ *(cs++) = i;
+ *cs = '\0';
+ return((i == EOF && buf == cs) ? NULL : buf);
+}
+
+void
+zt_get_token(struct zt_parse *zp) {
+ int i = 0;
+
+ while (*(zp->buf) != '\0' && *(zp->buf) != '\n' && *(zp->buf) != '\t') {
+ switch (*(zp->buf)) {
+ case '#':
+ while (*(zp->buf) != '\n')
+ zp->buf++;
+ zp->buf++;
+ break;
+ default:
+ while (*(zp->buf) != '\n' && *(zp->buf) != '\t' &&
+ *(zp->buf) != '\0') {
+ if (*(zp->buf) == '/' && zp->state == ZT_REGION) {
+ zp->tok[i] = '\0';
+ return;
+ }
+ zp->tok[i++] = *(zp->buf++);
+ }
+ zp->tok[i] = '\0';
+ if (zp->state == ZT_LOCALE && *(zp->buf) == '\n')
+ zp->state = ZT_LOCALE_ENDL;
+ else if (*(zp->buf) == '\0')
+ zp->state = ZT_NOTOK;
+ break;
+ }
+ }
+}
+
+void
+zt_parse(struct zonetab *head) {
+ FILE *zone_tab;
+ struct stat sb;
+ struct zonetab *c;
+ struct zt_parse zp;
+ char *file;
+ int i;
+
+ zone_tab = fopen(ZONETAB_FILE, "r");
+ stat(ZONETAB_FILE, &sb);
+ file = malloc(sb.st_size + 1);
+ file = zt_readfile(file, sb.st_size, zone_tab);
+ zp.buf = file;
+
+ zp.state = ZT_CC;
+ i = 0;
+ c = head;
+
+ do {
+ zt_get_token(&zp);
+ switch (zp.state) {
+ case ZT_CC:
+ c->zt_cc = strdup(zp.tok);
+ zp.state = ZT_COORDS;
+ break;
+ case ZT_COORDS:
+ c->zt_coords = strdup(zp.tok);
+ zp.state = ZT_REGION;
+ break;
+ case ZT_REGION:
+ c->zt_region = strdup(zp.tok);
+ zp.state = ZT_LOCALE;
+ break;
+ case ZT_LOCALE:
+ c->zt_locale = strdup(zp.tok);
+ zp.state = ZT_COMMENTS;
+ break;
+ case ZT_LOCALE_ENDL:
+ c->zt_locale = strdup(zp.tok);
+ c->zt_comments = NULL;
+ c->next = malloc(sizeof(struct zonetab));
+ c = c->next;
+ zp.state = ZT_CC;
+ break;
+ case ZT_COMMENTS:
+ c->zt_comments = strdup(zp.tok);
+ c->next = malloc(sizeof(struct zonetab));
+ c = c->next;
+ zp.state = ZT_CC;
+ break;
+ case ZT_NOTOK:
+ goto done;
+ }
+ zp.buf++;
+ } while (1);
+
+done:
+ c->next = NULL;
+ free(file);
+}
+
+void
+fn_zt_list_free(struct zonetab *zt) {
+ struct zonetab *p;
+ for (p = zt; p->next != NULL; p = p->next) {
+ free(p->zt_cc);
+ free(p->zt_coords);
+ free(p->zt_region);
+ free(p->zt_locale);
+ if (p->zt_comments != NULL)
+ free(p->zt_comments);
+ }
+}
+
+struct zonetab *
+fn_zt_list(void) {
+ struct zonetab **zt;
+
+ *zt = malloc(sizeof(struct zonetab));
+ zt_parse(*zt);
+ return(*zt);
+}
Index: contrib/bsdinstaller/src/backend/installer/fn_zonetab.h
===================================================================
RCS file: contrib/bsdinstaller/src/backend/installer/fn_zonetab.h
diff -N contrib/bsdinstaller/src/backend/installer/fn_zonetab.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/src/backend/installer/fn_zonetab.h 15 Jul 2004 11:01:21 -0000
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c)2004 The DragonFly Project. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the DragonFly Project nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * fn_zonetab.h
+ * $Id: fn_zonetab.h,v 1.1 2004/07/15 11:01:21 dodell Exp $
+ */
+
+#ifndef _FN_ZONETAB_H_
+#define _FN_ZONETAB_H_
+
+#define ZONETAB_FILE "/usr/share/zoneinfo/zone.tab"
+
+#define ZT_CC 0
+#define ZT_COORDS 1
+#define ZT_REGION 2
+#define ZT_LOCALE 3
+#define ZT_LOCALE_ENDL 4
+#define ZT_COMMENTS 5
+#define ZT_NOTOK 6
+
+struct zonetab {
+ char *zt_cc;
+ char *zt_coords;
+ char *zt_region;
+ char *zt_locale;
+ char *zt_comments;
+ struct zonetab *next;
+};
+
+struct zt_parse {
+ char *buf;
+ char tok[1255];
+ int state;
+};
+
+char *zt_readfile(char *, int, FILE *);
+void zt_get_token(struct zt_parse *);
+void zt_list_free(struct zonetab *);
+void zt_parse(struct zonetab *);
+
+#endif
Index: contrib/bsdinstaller/src/backend/installer/main.c
===================================================================
RCS file: contrib/bsdinstaller/src/backend/installer/main.c
diff -N contrib/bsdinstaller/src/backend/installer/main.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/src/backend/installer/main.c 26 Aug 2005 22:44:36 -0000
@@ -0,0 +1,150 @@
+/*
+ * Copyright (c)2004 The DragonFly Project. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the DragonFly Project nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * main.c
+ * Main program for installer backend.
+ * $Id: main.c,v 1.19 2005/08/26 22:44:36 cpressey Exp $
+ */
+
+#include
+#include
+#include
+#include
+#include
+
+#ifdef ENABLE_NLS
+#include
+#define _(String) gettext (String)
+#else
+#define _(String) (String)
+#endif
+
+#ifdef SYSTEM_AURA
+#include
+#else
+#include "mem.h"
+#endif
+
+#ifdef SYSTEM_DFUI
+#include
+#include
+#include
+#else
+#include "dfui.h"
+#include "dump.h"
+#include "system.h"
+#endif
+
+#include "flow.h"
+#include "pathnames.h"
+
+static void usage(char **);
+
+int
+main(int argc, char **argv)
+{
+ char os_root[256];
+ char *rendezvous = NULL;
+ int do_reboot = 0;
+ int opt;
+ int transport = 0;
+ int booted_from_livecd = 0;
+ int upgrade_menu_toggle = 0;
+
+#ifdef ENABLE_NLS
+ setlocale (LC_ALL, "");
+ bindtextdomain (PACKAGE, LOCALEDIR);
+ textdomain (PACKAGE);
+#endif
+
+ /*
+ * XXX TODO: set transport and rendezvous from
+ * corresponding environment variables, if set.
+ */
+
+ strlcpy(os_root, DEFAULT_OS_ROOT, sizeof(os_root));
+
+#ifdef DEBUG
+ dfui_debug_file = fopen("/tmp/dfuibe_installer_debug.log", "w");
+#endif
+
+ /*
+ * Get command-line arguments.
+ */
+ while ((opt = getopt(argc, argv, "o:r:t:")) != -1) {
+ switch (opt) {
+ case 'o':
+ strlcpy(os_root, optarg, sizeof(os_root));
+ break;
+ case 'r':
+ rendezvous = aura_strdup(optarg);
+ break;
+ case 't':
+ transport = user_get_transport(optarg);
+ break;
+ case '?':
+ default:
+ usage(argv);
+ }
+ }
+ argc -= optind;
+ argv += optind;
+
+ if (transport == 0)
+ transport = user_get_transport("tcp");
+
+ if (rendezvous == NULL) {
+ if (transport == DFUI_TRANSPORT_TCP)
+ rendezvous = aura_strdup("9999");
+ else
+ rendezvous = aura_strdup("test");
+ }
+
+ do_reboot = flow(transport, rendezvous, os_root,
+ booted_from_livecd, upgrade_menu_toggle);
+ free(rendezvous);
+
+ if (do_reboot)
+ exit(5);
+ else
+ exit(0);
+}
+
+static void
+usage(char **argv)
+{
+ fprintf(stderr, _("Usage: %s [-o rootdir] [-r rendezvous] "
+ "[-t caps|npipe|tcp]\n"), argv[0]);
+ exit(1);
+}
Index: contrib/bsdinstaller/src/backend/installer/pathnames.h
===================================================================
RCS file: contrib/bsdinstaller/src/backend/installer/pathnames.h
diff -N contrib/bsdinstaller/src/backend/installer/pathnames.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/src/backend/installer/pathnames.h 12 Oct 2004 06:31:32 -0000
@@ -0,0 +1,46 @@
+/*
+ * Pathnames for DragonFly installer backend.
+ * $Id: pathnames.h,v 1.12 2004/10/12 06:31:32 den Exp $
+ */
+
+#ifndef __PATHNAMES_H_
+#define __PATHNAMES_H_
+
+/*
+ * Default location where the files to copy onto the disk
+ * reside and generally where the installation is mounted.
+ * Normally this will be "/", when booting from a live CD,
+ * but for testing purposes we can set it to (say) "/cdrom/",
+ * so that we needn't boot from a CD in development.
+ * Note that this must include the trailing slash.
+ */
+#ifndef DEFAULT_OS_ROOT
+#define DEFAULT_OS_ROOT "/"
+#endif
+
+/*
+ * Default directory in which temporary files are placed.
+ * /tmp/ is generally MFS mounted when booting from a live CD,
+ * so we can use it both in development and in production.
+ * Note that this must include the trailing slash.
+ * Note that this is NOT relative to the source file root dir.
+ */
+#ifndef DEFAULT_INSTALLER_TEMP
+#define DEFAULT_INSTALLER_TEMP "/tmp/"
+#endif
+
+/*
+ * Directory from which to copy 'pristine' files over the
+ * installed files after the main installation phase is done.
+ * This is actually something of a misnomer now, as these
+ * files would typically be 3rd-party customizations.
+ */
+#ifndef PRISTINE_DIR
+#define PRISTINE_DIR ".pristine"
+#endif
+
+#ifndef PRISTINE_DIR_ROOT
+#define PRISTINE_DIR_ROOT ".pristineroot"
+#endif
+
+#endif /* !__PATHNAMES_H_ */
Index: contrib/bsdinstaller/src/backend/installer/conf/cmdnames.conf
===================================================================
RCS file: contrib/bsdinstaller/src/backend/installer/conf/cmdnames.conf
diff -N contrib/bsdinstaller/src/backend/installer/conf/cmdnames.conf
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/src/backend/installer/conf/cmdnames.conf 29 Jan 2007 23:17:14 -0000
@@ -0,0 +1,102 @@
+# Command names for DragonFly installer backend.
+# $Id: cmdnames.conf,v 1.16 2007/01/29 23:17:14 sullrich Exp $
+
+# This is in Bourne shell syntax so that it is easily editable;
+# it is also sourced by the installer, a C program.
+
+# Note that file names here should all be relative to the
+# installation media. They should NOT include leading slashes.
+# They may contain extra command-line options.
+
+SH=bin/sh
+MKDIR=bin/mkdir
+CHMOD=bin/chmod
+LN=bin/ln
+RM=bin/rm
+CP=bin/cp
+DATE=bin/date
+ECHO=bin/echo
+DD=bin/dd
+MV=bin/mv
+CAT=bin/cat
+TEST=bin/test
+
+# XXX 'sysctl' and '[' in the following tests should ideally include
+# the full path to the executable.
+
+# Some operating systems (OpenBSD) have block devices for disks, slices, etc.
+# Others don't.
+
+if [ X`sysctl -n kern.ostype` = "XOpenBSD" ]; then
+ TEST_DEV="$TEST -b"
+else
+ TEST_DEV="$TEST -c"
+fi
+
+# Some operating systems (DragonFly) have a version of cpdup that supports -u.
+# Others don't, and we assume it is installed as a 'port' on those systems.
+
+if [ X`sysctl -n kern.ostype` = "XDragonFly" ]; then
+ CPDUP="bin/cpdup -o -vvv -u"
+ DHCPD=usr/sbin/dhcpd
+ RPCBIND=usr/sbin/portmap
+ MOUNTD=sbin/mountd
+ NFSD=sbin/nfsd
+else
+ CPDUP="usr/local/bin/cpdup -o -vvv"
+ DHCPD=usr/local/sbin/dhcpd
+ RPCBIND=usr/sbin/rpcbind
+ MOUNTD=usr/sbin/mountd
+ NFSD=usr/sbin/nfsd
+fi
+
+MOUNT=sbin/mount
+MOUNT_MFS=sbin/mount_mfs
+UMOUNT=sbin/umount
+SWAPON=sbin/swapon
+DISKLABEL=sbin/disklabel
+NEWFS=sbin/newfs
+NEWFS_MSDOS=sbin/newfs_msdos
+FDISK=sbin/fdisk
+DUMPON=sbin/dumpon
+IFCONFIG=sbin/ifconfig
+ROUTE=sbin/route
+DHCLIENT=sbin/dhclient
+SYSCTL=sbin/sysctl
+
+TOUCH=usr/bin/touch
+YES=usr/bin/yes
+BUNZIP2=usr/bin/bunzip2
+GREP=usr/bin/grep
+KILLALL=usr/bin/killall
+BASENAME=usr/bin/basename
+SORT=usr/bin/sort
+COMM=usr/bin/comm
+AWK=usr/bin/awk
+SED=usr/bin/sed
+BC=usr/bin/bc
+TR=usr/bin/tr
+
+PWD_MKDB=usr/sbin/pwd_mkdb
+CHROOT=usr/sbin/chroot
+VIDCONTROL=usr/sbin/vidcontrol
+KBDCONTROL=usr/sbin/kbdcontrol
+PW=usr/sbin/pw
+SWAPINFO=usr/sbin/swapinfo
+BOOT0CFG=usr/sbin/boot0cfg
+FDFORMAT=usr/sbin/fdformat
+PKG_ADD=usr/pkg/sbin/pkg_add
+PKG_DELETE=usr/pkg/sbin/pkg_delete
+PKG_CREATE=usr/pkg/sbin/pkg_create
+PKG_INFO=usr/pkg/sbin/pkg_info
+INETD=usr/sbin/inetd
+
+TFTPD=usr/libexec/tftpd
+
+CVSUP=usr/local/bin/cvsup
+MEMTEST=usr/local/bin/memtest
+
+# These aren't commands, but they're configurable here nonetheless.
+
+DMESG_BOOT=var/run/dmesg.boot
+INSTALLER_TEMP="/tmp/"
Index: contrib/bsdinstaller/src/backend/installer/po/dfuibe_installer.pot
===================================================================
RCS file: contrib/bsdinstaller/src/backend/installer/po/dfuibe_installer.pot
diff -N contrib/bsdinstaller/src/backend/installer/po/dfuibe_installer.pot
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/src/backend/installer/po/dfuibe_installer.pot 29 Mar 2005 07:11:12 -0000
@@ -0,0 +1,1300 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR , YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2005-03-29 11:08+0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: LANGUAGE \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#, c-format
+msgid "%s was not fully installed."
+msgstr ""
+
+msgid "/home will be symlinked to /usr/home\n"
+msgstr ""
+
+msgid "/tmp will be symlinked to /var/tmp\n"
+msgstr ""
+
+msgid "/usr will be a plain dir in /\n"
+msgstr ""
+
+msgid "/var will be a plain dir in /\n"
+msgstr ""
+
+msgid "A capacity must be specified."
+msgstr ""
+
+msgid ""
+"A failure occured while provisioning the NetBoot environment. Please check "
+"the logs."
+msgstr ""
+
+msgid "ATA Devices"
+msgstr ""
+
+msgid "Accept and Add"
+msgstr ""
+
+msgid "Accept and Create"
+msgstr ""
+
+msgid "Accept and Install"
+msgstr ""
+
+msgid "Accept and Install Bootblocks"
+msgstr ""
+
+msgid "Accept and Remove"
+msgstr ""
+
+msgid "Accept and Set Password"
+msgstr ""
+
+msgid "Action cancelled - no disks were formatted."
+msgstr ""
+
+msgid "Action cancelled - no primary partitions were formatted."
+msgstr ""
+
+msgid "Add a user"
+msgstr ""
+
+msgid "Add a user to the system"
+msgstr ""
+
+msgid "Add user"
+msgstr ""
+
+msgid "An error occurred when setting the root password."
+msgstr ""
+
+msgid "Assign IP Address"
+msgstr ""
+
+msgid "BIND Name Server"
+msgstr ""
+
+msgid "Begin Installation"
+msgstr ""
+
+msgid "Begin Installing Files"
+msgstr ""
+
+msgid "Block Sz"
+msgstr ""
+
+msgid "Boot sector successfully initialized."
+msgstr ""
+
+msgid "Bootblock Install Failed"
+msgstr ""
+
+msgid "Bootblocks were successfully installed!"
+msgstr ""
+
+msgid "CDBoot floppy successfully created!"
+msgstr ""
+
+msgid "CDBoot floppy was not successfully created."
+msgstr ""
+
+msgid "Cancel"
+msgstr ""
+
+msgid "Cancel Memory Test"
+msgstr ""
+
+msgid "Capacity"
+msgstr ""
+
+msgid ""
+"Capacity must be either a '*' symbol to indicate 'use the rest of the "
+"primary partition', or it must be a series of decimal digits ending with a "
+"'M' (indicating megabytes) or a 'G' (indicating gigabytes.)"
+msgstr ""
+
+msgid "Chosen shell does not exist on the system."
+msgstr ""
+
+msgid "Configure Interface"
+msgstr ""
+
+#, c-format
+msgid "Configure a %s system once it has been installed on HDD"
+msgstr ""
+
+msgid "Configure an Installed System"
+msgstr ""
+
+msgid "Configure hostname and domain"
+msgstr ""
+
+msgid "Configure network interfaces"
+msgstr ""
+
+msgid "Configure the LiveCD Environment"
+msgstr ""
+
+msgid "Configure the hostname and domain for this system"
+msgstr ""
+
+#, c-format
+msgid "Configure this %s System"
+msgstr ""
+
+#, c-format
+msgid "Configure this %s system"
+msgstr ""
+
+msgid "Configure this System"
+msgstr ""
+
+msgid "Configure this System|Reboot|Return to Welcome Menu"
+msgstr ""
+
+msgid "Configuring Interface:"
+msgstr ""
+
+#, c-format
+msgid ""
+"Congratulations!\n"
+"\n"
+"%s has successfully been installed on this computer. You may now proceed to "
+"configure the installation. Alternately, you may wish to reboot the computer "
+"and boot into the installed system to confirm that it works."
+msgstr ""
+
+#, c-format
+msgid "Couldn't install package `%s'."
+msgstr ""
+
+#, c-format
+msgid "Couldn't read %s%setc/rc.conf."
+msgstr ""
+
+#, c-format
+msgid "Couldn't remove package `%s'."
+msgstr ""
+
+msgid "Create CDBoot Floppy"
+msgstr ""
+
+msgid "Create CDBoot Floppy|Return to Utilities Menu"
+msgstr ""
+
+msgid "Create Subpartitions"
+msgstr ""
+
+msgid "Create a CDBoot floppy"
+msgstr ""
+
+msgid "Create a floppy which boots into a dedicated memory-test"
+msgstr ""
+
+msgid "Create memtest86 Floppy"
+msgstr ""
+
+msgid "DHCP Failure"
+msgstr ""
+
+msgid ""
+"DHCP allows the interface to automatically obtain an IP address from a "
+"nearby DHCP server.\n"
+"\n"
+"Would you like to enable DHCP for this interface?"
+msgstr ""
+
+msgid "Default Router"
+msgstr ""
+
+msgid "Disk Drive"
+msgstr ""
+
+msgid "Disk Utilities"
+msgstr ""
+
+msgid "Disk Utilities Menu"
+msgstr ""
+
+msgid "Display ATA devices"
+msgstr ""
+
+msgid "Display ATA devices (atactl)"
+msgstr ""
+
+msgid "Display PCI devices"
+msgstr ""
+
+msgid "Display PCI devices (pciconf)"
+msgstr ""
+
+msgid "Display Plug'n'Play ISA devices"
+msgstr ""
+
+msgid "Display Plug'n'Play ISA devices (pnpinfo)"
+msgstr ""
+
+msgid "Display system startup messages"
+msgstr ""
+
+msgid "Display system startup messages (dmesg)"
+msgstr ""
+
+msgid "Domain"
+msgstr ""
+
+msgid "Enable NetBoot Installation Services|No thanks"
+msgstr ""
+
+msgid "Enable Netboot Installation Services?"
+msgstr ""
+
+msgid "Enable/Disable Services"
+msgstr ""
+
+msgid ""
+"Enter a comma-separated list of other groups that this user should belong to"
+msgstr ""
+
+msgid "Enter the Domain Name"
+msgstr ""
+
+msgid "Enter the Domain Name (e.g. `network.lan')"
+msgstr ""
+
+msgid "Enter the Hostname"
+msgstr ""
+
+msgid "Enter the Hostname (e.g. `machine')"
+msgstr ""
+
+msgid "Enter the IP Address you would like to use"
+msgstr ""
+
+msgid "Enter the IP address of primary DNS Server"
+msgstr ""
+
+msgid "Enter the IP address of the default router"
+msgstr ""
+
+msgid "Enter the amount of memory you would like to check:"
+msgstr ""
+
+msgid "Enter the current day of month (e.g. `30')"
+msgstr ""
+
+msgid "Enter the current hour (e.g. `07')"
+msgstr ""
+
+msgid "Enter the current minutes (e.g. `59')"
+msgstr ""
+
+msgid "Enter the current month (e.g. `07')"
+msgstr ""
+
+msgid "Enter the current time and date."
+msgstr ""
+
+msgid "Enter the current year (e.g. `2004')"
+msgstr ""
+
+msgid "Enter the full path to the user's home directory, or leave blank"
+msgstr ""
+
+msgid "Enter the full path to the user's shell program"
+msgstr ""
+
+msgid "Enter the netmask of the IP address"
+msgstr ""
+
+msgid "Enter the primary group for this account, or leave blank"
+msgstr ""
+
+msgid "Enter the real name (or GECOS field) of this user"
+msgstr ""
+
+msgid "Enter the root password again to confirm"
+msgstr ""
+
+msgid "Enter the root password you would like to use"
+msgstr ""
+
+msgid "Enter the user's password (will not be displayed)"
+msgstr ""
+
+msgid "Enter the username the user will log in as"
+msgstr ""
+
+msgid "Enter this account's numeric user id, or leave blank"
+msgstr ""
+
+msgid "Enter year"
+msgstr ""
+
+msgid "Error Log"
+msgstr ""
+
+msgid "Errors occurred while probing the system for its storage capabilities."
+msgstr ""
+
+#, c-format
+msgid ""
+"Everything is now ready to install the actual files which comprise the %s "
+"operating system on the selected partition of the selected disk.\n"
+"\n"
+"Note that this process will take quite a while to finish. You may wish to "
+"take a break now and come back to the computer in a short while."
+msgstr ""
+
+msgid "Exit Installer"
+msgstr ""
+
+msgid "Exit this program and return to the system"
+msgstr ""
+
+msgid "Exit this program to a login prompt with access to the LiveCD"
+msgstr ""
+
+msgid "Exit to Live CD"
+msgstr ""
+
+msgid "Filesystem table on installed system could not be read."
+msgstr ""
+
+msgid "Floppy successfully formatted!"
+msgstr ""
+
+msgid "Floppy was not successfully formatted."
+msgstr ""
+
+msgid "Format Floppy|Return to Utilities Menu"
+msgstr ""
+
+msgid "Format MSDOS Floppy"
+msgstr ""
+
+msgid "Format a hard disk drive"
+msgstr ""
+
+msgid "Format an MSDOS floppy"
+msgstr ""
+
+msgid "Format and check hard drives and floppy disks"
+msgstr ""
+
+msgid "Frag Sz"
+msgstr ""
+
+msgid "Group Memberships"
+msgstr ""
+
+msgid ""
+"Here you can add a user to an installed system.\n"
+"\n"
+"You can leave the Home Directory, User ID, and Login Group fields empty if "
+"you want these items to be automatically allocated by the system.\n"
+"\n"
+"Note: this user's password will appear in the install log. If this is a "
+"problem, please add the user manually after rebooting into the installed "
+"system instead."
+msgstr ""
+
+msgid ""
+"Here you can set the super-user (root) password.\n"
+"\n"
+"Note: root's new password will appear in the install log. If this is a "
+"problem, please set root's password manually after rebooting into the "
+"installed system instead."
+msgstr ""
+
+msgid "Home Directory"
+msgstr ""
+
+msgid "Hostname"
+msgstr ""
+
+msgid "How Much Disk?"
+msgstr ""
+
+msgid "IP Address"
+msgstr ""
+
+msgid "ISA PnP Devices"
+msgstr ""
+
+msgid "If it is set to local time, or you don't know, please choose NO here!"
+msgstr ""
+
+msgid ""
+"If you are having problems formatting a disk, it may be because of junk that "
+"has accumulated in the boot block and the partition table. A cure for this "
+"is to wipe out everything on the first few sectors of the disk. However, "
+"this is a rather drastic action to take, so it is not recommended unless you "
+"are otherwise encountering problems."
+msgstr ""
+
+msgid ""
+"If you are having problems formatting a primary partition, it may be because "
+"of junk that has accumulated in the partition's `disklabel'. A cure for this "
+"is to wipe out everything on the first few sectors of the primary partition. "
+"However, this is a rather drastic action to take, so it is not recommended "
+"unless you are otherwise encountering problems."
+msgstr ""
+
+#, c-format
+msgid "Install %s"
+msgstr ""
+
+#, c-format
+msgid "Install %s on a HDD or HDD partition on this computer"
+msgstr ""
+
+msgid "Install Bootblock(s)"
+msgstr ""
+
+msgid "Install Bootblock?"
+msgstr ""
+
+msgid "Install OS"
+msgstr ""
+
+msgid "Install Packages"
+msgstr ""
+
+msgid "Install a bootblock on this disk"
+msgstr ""
+
+msgid "Install bootblocks on disks"
+msgstr ""
+
+msgid "Install extra software packages"
+msgstr ""
+
+msgid "Install third-party software packages from the LiveCD"
+msgstr ""
+
+msgid "Internal error - response from frontend should be a valid device name."
+msgstr ""
+
+msgid "Internal error - response from frontend should be a valid slice number."
+msgstr ""
+
+msgid "Internet Super-Server"
+msgstr ""
+
+msgid "Is this machine's CMOS clock set to UTC?\n"
+msgstr ""
+
+msgid "Keyboard map not successfully set."
+msgstr ""
+
+msgid "Live CD Diagnostics Menu"
+msgstr ""
+
+msgid "Live CD Environment Menu"
+msgstr ""
+
+msgid "Live CD Utilities"
+msgstr ""
+
+msgid "Live CD Utilities Menu"
+msgstr ""
+
+msgid "LiveCD Environment"
+msgstr ""
+
+msgid "Local or UTC (Greenwich Mean Time) clock"
+msgstr ""
+
+msgid "Login Group"
+msgstr ""
+
+msgid "MFS"
+msgstr ""
+
+msgid "Memory test"
+msgstr ""
+
+msgid "Memory test - Enter the size in values such as 400M, 1G."
+msgstr ""
+
+msgid "Memory test could not be run."
+msgstr ""
+
+msgid "Memory test size"
+msgstr ""
+
+msgid "Month"
+msgstr ""
+
+msgid ""
+"Mount point may not contain the following characters: blank space, "
+"backslash, or single, double, or back quotes."
+msgstr ""
+
+msgid "Mount point must be either 'swap', or it must start with a '/'."
+msgstr ""
+
+msgid "Mountpoint"
+msgstr ""
+
+msgid ""
+"NetBoot Installation Services allows this machine to become a Installation "
+"Server that will allow the clients to boot over the network via PXE and "
+"start the Installation Environment.\n"
+"\n"
+"*NOTE!* This will assign the IP Address of 10.1.0.1/24 to the selected "
+"interface.\n"
+"\n"
+"Would you like to provision this machine to serve up the LiveCD/Installer?"
+msgstr ""
+
+msgid "NetBoot installation services are now started."
+msgstr ""
+
+msgid "Netmask"
+msgstr ""
+
+msgid "Network Time Protocol Daemon"
+msgstr ""
+
+msgid "OK"
+msgstr ""
+
+msgid "Omit Subpartition(s)|Return to Create Subpartitions"
+msgstr ""
+
+msgid ""
+"On these submenus you will find utilities to help you set up your Live CD "
+"environment, diagnose and analyse this system, and work with the devices "
+"attached to this computer."
+msgstr ""
+
+#, c-format
+msgid ""
+"On this menu you will find utilities to help you set up your Live CD "
+"environment.\n"
+"\n"
+"Note that these functions affect only the LiveCD environment you are "
+"currently using, and they will not affect any system that may be installed "
+"on this computer UNLESS you subsequently choose to install %s from this "
+"environment, in which case they will be copied to the newly installed system."
+msgstr ""
+
+msgid "Other Group Memberships"
+msgstr ""
+
+msgid "PCI Devices"
+msgstr ""
+
+msgid "Packages were not fully installed."
+msgstr ""
+
+msgid "Packages were not fully removed."
+msgstr ""
+
+msgid "Packages were successfully installed!"
+msgstr ""
+
+msgid "Packages were successfully removed."
+msgstr ""
+
+msgid "Packet Mode?"
+msgstr ""
+
+msgid "Password"
+msgstr ""
+
+msgid "Password (Again)"
+msgstr ""
+
+msgid ""
+"Please enter numbers within acceptable ranges for year, month, day of month, "
+"hour, and minute."
+msgstr ""
+
+msgid "Please enter this machine's hostname and domain name."
+msgstr ""
+
+msgid "Please insert the floppy to be formatted in unit 0 (``drive A:'')."
+msgstr ""
+
+msgid "Please select the language you wish you use."
+msgstr ""
+
+msgid "Please select which interface you would like to configure:"
+msgstr ""
+
+msgid "Please select which services you would like started at boot time."
+msgstr ""
+
+msgid "Please set up at least one subpartition."
+msgstr ""
+
+msgid "Primary DNS Server"
+msgstr ""
+
+#, c-format
+msgid "Primary partition #%d was formatted."
+msgstr ""
+
+#, c-format
+msgid ""
+"Primary partition #%d was not correctly formatted, and may now be in an "
+"inconsistent state. We recommend re-formatting it before proceeding."
+msgstr ""
+
+msgid "Probe and display detailed information about this system"
+msgstr ""
+
+msgid "Re-Initialize Bootblock|Cancel"
+msgstr ""
+
+msgid "Re-enter the user's password to confirm"
+msgstr ""
+
+msgid "Real Name"
+msgstr ""
+
+msgid "Really omit?"
+msgstr ""
+
+msgid "Reboot"
+msgstr ""
+
+msgid "Reboot this Computer"
+msgstr ""
+
+msgid "Reboot this computer (e.g. to boot into a newly installed system)"
+msgstr ""
+
+msgid "Reboot|Return to Select Disk"
+msgstr ""
+
+msgid "Reboot|Return to Select Primary Partition"
+msgstr ""
+
+msgid "Remove Packages"
+msgstr ""
+
+msgid "Remove software packages"
+msgstr ""
+
+msgid "Remove third-party software packages from the installed system"
+msgstr ""
+
+msgid "Return to Begin Installation"
+msgstr ""
+
+msgid "Return to Configure Menu"
+msgstr ""
+
+msgid "Return to Create Subpartitions"
+msgstr ""
+
+msgid "Return to Select Disk"
+msgstr ""
+
+msgid "Return to Select Primary Partition"
+msgstr ""
+
+msgid "Return to Utilities Menu"
+msgstr ""
+
+msgid "Return to Welcome Menu"
+msgstr ""
+
+msgid "Root password"
+msgstr ""
+
+msgid "Root password again"
+msgstr ""
+
+msgid "Run On-Line Memory Test"
+msgstr ""
+
+msgid "Running after installation custom routines..."
+msgstr ""
+
+msgid "Secure Shell Daemon"
+msgstr ""
+
+msgid "Select Console Font"
+msgstr ""
+
+msgid "Select Disk"
+msgstr ""
+
+msgid "Select Keyboard Map"
+msgstr ""
+
+msgid "Select Language"
+msgstr ""
+
+msgid "Select Primary Partition"
+msgstr ""
+
+msgid "Select Screen Map"
+msgstr ""
+
+msgid "Select Services"
+msgstr ""
+
+msgid "Select Time Zone"
+msgstr ""
+
+msgid "Select a Time Zone appropriate to your physical location."
+msgstr ""
+
+#, c-format
+msgid "Select a disk on which to install %s"
+msgstr ""
+
+msgid "Select a disk to format."
+msgstr ""
+
+msgid "Select a font appropriate to your video monitor and language."
+msgstr ""
+
+msgid "Select a keyboard map appropriate to your keyboard layout."
+msgstr ""
+
+msgid ""
+"Select a mapping for translating characters as they appear on your video "
+"console screen."
+msgstr ""
+
+#, c-format
+msgid ""
+"Select how much of this disk you want to use for %s.\n"
+"\n"
+"%s"
+msgstr ""
+
+#, c-format
+msgid ""
+"Select optional software packages that you want installed on this system. "
+"This form lists only the software packages installed on the LiveCD; "
+"thousands more are available via the internet once %s is installed."
+msgstr ""
+
+msgid ""
+"Select the disk containing the installation that you would like to upgrade."
+msgstr ""
+
+msgid "Select the disk containing the installation."
+msgstr ""
+
+msgid "Select the disks on which you wish to install bootblocks."
+msgstr ""
+
+#, c-format
+msgid ""
+"Select the existing primary partition (also known as a `slice' in the BSD "
+"tradition) on which to install %s.\n"
+"\n"
+"Note that if you do not have any existing primary partitions on this disk, "
+"you must first create some. This installer does not currently have the "
+"ability to do this, so you will have to exit and run fdisk (in DOS or *BSD) "
+"or parted (in Linux) to do so."
+msgstr ""
+
+msgid ""
+"Select the installed software packages that you want removed from this "
+"system."
+msgstr ""
+
+msgid ""
+"Select the primary partition containing the installation you would like to "
+"upgrade."
+msgstr ""
+
+msgid "Select the primary partition containing the installation."
+msgstr ""
+
+msgid "Select this to use 'packet mode' to boot the disk"
+msgstr ""
+
+msgid "Select timezone"
+msgstr ""
+
+msgid "Set Hostname/Domain"
+msgstr ""
+
+msgid "Set Root Password"
+msgstr ""
+
+msgid "Set Time/Date"
+msgstr ""
+
+msgid "Set console font"
+msgstr ""
+
+msgid "Set date and time"
+msgstr ""
+
+msgid "Set how characters are translated before console display"
+msgstr ""
+
+msgid "Set how the characters on your video console look"
+msgstr ""
+
+msgid "Set keyboard map"
+msgstr ""
+
+msgid "Set root password"
+msgstr ""
+
+msgid "Set screen map"
+msgstr ""
+
+msgid "Set the Time Zone of your physical location"
+msgstr ""
+
+msgid "Set the Time and Date of your machine"
+msgstr ""
+
+msgid "Set the password that the root (superuser) account will use"
+msgstr ""
+
+msgid "Set up network interfaces (NICs, ethernet, TCP/IP, etc)"
+msgstr ""
+
+msgid ""
+"Set up the subpartitions (also known as just `partitions' in BSD tradition) "
+"you want to have on this primary partition.\n"
+"\n"
+"For Capacity, use 'M' to indicate megabytes, 'G' to indicate gigabytes, or a "
+"single '*' to indicate 'use the remaining space on the primary partition'."
+msgstr ""
+
+msgid "Set what kind of keyboard layout you have"
+msgstr ""
+
+msgid "Setting password..."
+msgstr ""
+
+msgid "Setup NetBoot Install Services"
+msgstr ""
+
+msgid "Setup NetBoot Installation Environment"
+msgstr ""
+
+msgid "Setup machine as remote installation server"
+msgstr ""
+
+msgid "Shell"
+msgstr ""
+
+msgid "Skip this Step"
+msgstr ""
+
+msgid "Softupdates"
+msgstr ""
+
+msgid "Some errors occurred. Boot sector was not successfully initialized."
+msgstr ""
+
+msgid "Some errors occurred. Start of disk was not successfully wiped."
+msgstr ""
+
+msgid ""
+"Some errors occurred. Start of primary partition was not successfully wiped."
+msgstr ""
+
+#, c-format
+msgid ""
+"Some situations in which you might not wish to use this installer are:\n"
+"\n"
+"- you want to install %s onto a logical/extended partition;\n"
+"- you want to install %s onto a ``dangerously dedicated'' disk; or\n"
+"- you want full and utter control over the install process."
+msgstr ""
+
+#, c-format
+msgid ""
+"Some subpartitions on the primary partition of this disk are already "
+"activated as swap. Since there is no way to deactivate swap in %s once it is "
+"activated, in order to edit the subpartition layout of this primary "
+"partition, you must first reboot."
+msgstr ""
+
+#, c-format
+msgid ""
+"Some subpartitions on the selected primary partition are already activated "
+"as swap. Since there is no way to deactivate swap in %s once it is "
+"activated, in order to edit the subpartition layout of this primary "
+"partition, you must first reboot."
+msgstr ""
+
+msgid "Start of disk was successfully wiped."
+msgstr ""
+
+msgid "Start of primary partition was successfully wiped."
+msgstr ""
+
+#, c-format
+msgid ""
+"Subpartitions further divide a primary partition for use with %s. Some "
+"reasons you may want a set of subpartitions are:\n"
+"\n"
+"- you want to restrict how much data can be written to certain parts of the "
+"primary partition, to quell denial-of-service attacks; and\n"
+"- you want to speed up access to data on the disk."
+msgstr ""
+
+msgid "Swap already active"
+msgstr ""
+
+msgid "Switch to Expert Mode"
+msgstr ""
+
+msgid "Switch to Normal Mode"
+msgstr ""
+
+msgid "System Diagnostics"
+msgstr ""
+
+msgid "System Logging Daemon"
+msgstr ""
+
+msgid "System Startup Messages (dmesg)"
+msgstr ""
+
+msgid "Target system could not be mounted."
+msgstr ""
+
+msgid "Test the memory in the machine while running"
+msgstr ""
+
+#, c-format
+msgid ""
+"Thank you for choosing %s.\n"
+"\n"
+"For up-to-date news and information on %s, make sure to check out\n"
+"\n"
+"%s\n"
+"\n"
+"You can use this automated application to assist you in setting up this %s "
+"system."
+msgstr ""
+
+#, c-format
+msgid "The Time Zone has been set to %s."
+msgstr ""
+
+msgid "The date and time have been set."
+msgstr ""
+
+#, c-format
+msgid ""
+"The disk\n"
+"\n"
+"%s\n"
+"\n"
+"was formatted."
+msgstr ""
+
+#, c-format
+msgid ""
+"The disk\n"
+"\n"
+"%s\n"
+"\n"
+"was not correctly formatted, and may now be in an inconsistent state. We "
+"recommend re-formatting it before attempting to install %s on it."
+msgstr ""
+
+msgid "The disk on which you wish to install a bootblock"
+msgstr ""
+
+#, c-format
+msgid ""
+"The installer could not find any disks suitable for installation (IDE or "
+"SCSI) attached to this computer. If you wish to install %s on an unorthodox "
+"storage device, you will have to exit to a LiveCD command prompt and install "
+"it manually, using the file /README as a guide."
+msgstr ""
+
+#, c-format
+msgid ""
+"The options on this menu allow you to configure a %s system after it has "
+"already been installed."
+msgstr ""
+
+msgid "The passwords do not match."
+msgstr ""
+
+msgid "The root password has been changed."
+msgstr ""
+
+msgid ""
+"The same mount point cannot be specified for two different subpartitions."
+msgstr ""
+
+#, c-format
+msgid ""
+"The sole primary partition of the disk\n"
+"\n"
+"%s\n"
+"\n"
+"was not correctly formatted, and may now be in an inconsistent state. We "
+"recommend re-formatting the disk before attempting to install %s on it."
+msgstr ""
+
+#, c-format
+msgid ""
+"The space allocated to all of your selected subpartitions (%dM) exceeds the "
+"total capacity of the selected primary partition (%dM). Remove some "
+"subpartitions or choose a smaller size for them and try again."
+msgstr ""
+
+msgid ""
+"The subpartitions you chose were not correctly created, and the primary "
+"partition may now be in an inconsistent state. We recommend re-formatting it "
+"before proceeding."
+msgstr ""
+
+msgid ""
+"The system has issued a cvsup command in the background.\n"
+"\n"
+"Please tail /tmp/cvsupdate.log if you wish to follow the progress."
+msgstr ""
+
+msgid "These functions can help you diagnose this system."
+msgstr ""
+
+msgid ""
+"These functions let you manipulate the storage devices attached to this "
+"computer."
+msgstr ""
+
+#, c-format
+msgid ""
+"This experimental application will install %s on one of the hard disk drives "
+"attached to this computer. It has been designed to make it easy to install %"
+"s in the typical case. If you have special requirements that are not "
+"addressed by this installer, or if you have problems using it, you are "
+"welcome to install %s manually. To do so select Exit to Live CD, login as "
+"root, and follow the instructions given in the file /README .\n"
+"\n"
+"NOTE! As with any installation process, YOU ARE STRONGLY ENCOURAGED TO BACK "
+"UP ANY IMPORTANT DATA ON THIS COMPUTER BEFORE PROCEEDING!"
+msgstr ""
+
+msgid ""
+"This machine is about to be shut down. After the machine has reached its "
+"shutdown state, you may remove the CD from the CD-ROM drive tray and press "
+"Enter to reboot from the HDD."
+msgstr ""
+
+msgid "Upgrade"
+msgstr ""
+
+#, c-format
+msgid "Upgrade a FreeBSD 4.X system to %s"
+msgstr ""
+
+#, c-format
+msgid "Usage: %s [-o rootdir] [-r rendezvous] [-t caps|npipe|tcp]\n"
+msgstr ""
+
+msgid "Use DHCP?"
+msgstr ""
+
+msgid "Use DHCP|Configure Manually"
+msgstr ""
+
+msgid "Use Entire Disk|Use Part of Disk|Return to Select Disk"
+msgstr ""
+
+msgid "User ID"
+msgstr ""
+
+#, c-format
+msgid "User `%s' was added."
+msgstr ""
+
+msgid "User was not successfully added."
+msgstr ""
+
+msgid "Username"
+msgstr ""
+
+msgid "Utilities"
+msgstr ""
+
+msgid "Utilities to work with and diagnose disks and other subsystems"
+msgstr ""
+
+msgid "Utilities to work with disks, diagnostics, and the LiveCD Environment"
+msgstr ""
+
+msgid "Video font not successfully set."
+msgstr ""
+
+#, c-format
+msgid ""
+"WARNING! ALL data in ALL partitions on the disk\n"
+"\n"
+"%s\n"
+"\n"
+"will be IRREVOCABLY ERASED!\n"
+"\n"
+"Are you ABSOLUTELY SURE you wish to take this action? This is your LAST "
+"CHANCE to cancel!"
+msgstr ""
+
+#, c-format
+msgid ""
+"WARNING! ALL data in primary partition #%d,\n"
+"\n"
+"%s\n"
+"\n"
+"on the disk\n"
+"\n"
+"%s\n"
+"\n"
+" will be IRREVOCABLY ERASED!\n"
+"\n"
+"Are you ABSOLUTELY SURE you wish to take this action? This is your LAST "
+"CHANCE to cancel!"
+msgstr ""
+
+#, c-format
+msgid ""
+"WARNING: the %s subpartition should be at least %dM in size or you will risk "
+"running out of space during the installation."
+msgstr ""
+
+#, c-format
+msgid ""
+"WARNING: you should have a disk at least %dM in size, or you may encounter "
+"problems trying to install %s."
+msgstr ""
+
+#, c-format
+msgid ""
+"WARNING: you should have a primary partition at least %dM in size, or you "
+"may encounter problems trying to install %s."
+msgstr ""
+
+msgid "Warning: Installed system was not properly unmounted."
+msgstr ""
+
+#, c-format
+msgid ""
+"Warning: bootblocks were not successfully installed on the disk `%s'. This "
+"may be because the disk is new and not yet formatted. If this is the case, "
+"it might help to re-initialize the boot sector, then try installing the "
+"bootblock again. Note that this should not affect the partition table of the "
+"disk."
+msgstr ""
+
+msgid ""
+"Warning: could not assign IP address or default gateway.\n"
+"\n"
+"Write the corresponding settings to rc.conf anyway?"
+msgstr ""
+
+#, c-format
+msgid ""
+"Warning: could not enable dhclient for %s.\n"
+"\n"
+"Write the corresponding settings to rc.conf anyway?"
+msgstr ""
+
+msgid "Warning: could not launch cvsup"
+msgstr ""
+
+msgid "Warning: subpartitions were not correctly unmounted."
+msgstr ""
+
+#, c-format
+msgid "Welcome to %s"
+msgstr ""
+
+#, c-format
+msgid ""
+"Welcome to the %s Live CD.\n"
+"\n"
+"%s is an efficient and elegant BSD Unix-derived operating system. For more "
+"information, see %s\n"
+"\n"
+"From this CD, you can boot into %s ``live'' (without installing it) to "
+"evaluate it, to install it manually, or to troubleshoot problems with an "
+"existing installation, using either a command prompt or menu-driven "
+"utilities.\n"
+"\n"
+"Also, you can use this automated application to assist you in installing %s "
+"on this computer and configuring it once it is installed."
+msgstr ""
+
+msgid "Wipe out the start of a disk"
+msgstr ""
+
+msgid "Wipe out the start of a primary partition"
+msgstr ""
+
+msgid "Yes|No"
+msgstr ""
+
+msgid ""
+"You cannot have more than 16 subpartitions on a single primary partition. "
+"Remove some and try again."
+msgstr ""
+
+msgid ""
+"You cannot have more than one subpartition with a '*' capacity (meaning 'use "
+"the remainder of the primary partition'.)"
+msgstr ""
+
+#, c-format
+msgid ""
+"You have elected to not have the following subpartition(s):\n"
+"\n"
+"%s\n"
+"\n"
+"The ramifications of these subpartition(s) being missing will be:\n"
+"\n"
+"%s\n"
+"Is this really what you want to do?"
+msgstr ""
+
+#, c-format
+msgid ""
+"You may now wish to install bootblocks on one or more disks. If you already "
+"have a boot manager installed, you can skip this step (but you may have to "
+"configure your boot manager separately.) If you installed %s on a disk "
+"other than your first disk, you will need to put the bootblock on at least "
+"your first disk and the %s disk."
+msgstr ""
+
+msgid "You must enter a username."
+msgstr ""
+
+msgid "You must include a / (root) subpartition."
+msgstr ""
+
+msgid "directory name"
+msgstr ""
+
+msgid "ifconfig Failure"
+msgstr ""
+
+msgid "memtest86 floppy successfully created!"
+msgstr ""
+
+msgid "memtest86 floppy was not successfully created."
+msgstr ""
Index: contrib/bsdinstaller/src/backend/installer/po/ru.po
===================================================================
RCS file: contrib/bsdinstaller/src/backend/installer/po/ru.po
diff -N contrib/bsdinstaller/src/backend/installer/po/ru.po
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/src/backend/installer/po/ru.po 29 Mar 2005 07:46:52 -0000
@@ -0,0 +1,1529 @@
+# bsdinstaller - Russian language localization.
+# Copyright (C) 2004
+# This file is distributed under the same license as the bsdinstaller.
+# Denis Peplin , 2004.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2005-03-28 14:09+0400\n"
+"PO-Revision-Date: 2005-03-28 14:55+0400\n"
+"Last-Translator: Denis Peplin \n"
+"Language-Team: LANGUAGE \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=koi8-r\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#, c-format
+msgid "%s was not fully installed."
+msgstr "%s не была полностью установлена."
+
+msgid "/home will be symlinked to /usr/home\n"
+msgstr "/home будет символической ссылкой на /usr/home\n"
+
+msgid "/tmp will be symlinked to /var/tmp\n"
+msgstr "/tmp будет символической ссылкой на /var/tmp\n"
+
+msgid "/usr will be a plain dir in /\n"
+msgstr "/usr будет обычным каталогом в /\n"
+
+msgid "/var will be a plain dir in /\n"
+msgstr "/var будет обычным каталогом в /\n"
+
+msgid "A capacity must be specified."
+msgstr "Должен быть задан размер."
+
+msgid ""
+"A failure occured while provisioning the NetBoot environment. Please check "
+"the logs."
+msgstr "При включении NetBoot произошли ошибки. Просмотрите протокол."
+
+msgid "ATA Devices"
+msgstr "Устройства ATA"
+
+msgid "Accept and Add"
+msgstr "Принять и добавить"
+
+msgid "Accept and Create"
+msgstr "Принять и создать"
+
+msgid "Accept and Install"
+msgstr "Принять и установить"
+
+msgid "Accept and Install Bootblocks"
+msgstr "Подтвердить и установить загрузочный блок"
+
+msgid "Accept and Remove"
+msgstr "Принять и удалить"
+
+msgid "Accept and Set Password"
+msgstr "Принять и установить пароль"
+
+msgid "Action cancelled - no disks were formatted."
+msgstr "Действие отменено - диски не были отформатированы."
+
+msgid "Action cancelled - no primary partitions were formatted."
+msgstr "Действие прервано - нет отформатированных основных разделов."
+
+msgid "Add a user"
+msgstr "Добавление пользователя"
+
+msgid "Add a user to the system"
+msgstr "Добавление пользователя в систему"
+
+msgid "Add user"
+msgstr "Добавить пользователя"
+
+msgid "An error occurred when setting the root password."
+msgstr "При установке пароля root произошла ошибка"
+
+msgid "Assign IP Address"
+msgstr "Присвоение IP адреса"
+
+msgid "BIND Name Server"
+msgstr "Служба имен BIND"
+
+msgid "Begin Installation"
+msgstr "Начало установки"
+
+msgid "Begin Installing Files"
+msgstr "Начало установки файлов"
+
+msgid "Block Sz"
+msgstr "Размер блока"
+
+msgid "Boot sector successfully initialized."
+msgstr "Загрузочный сектор успешно инициализирован."
+
+msgid "Bootblock Install Failed"
+msgstr "Установка загрузочного блока прошла неудачно"
+
+msgid "Bootblocks were successfully installed!"
+msgstr "Загрузочные блоки были успешно установлены!"
+
+msgid "CDBoot floppy successfully created!"
+msgstr "Дискета CDBoot была успешно создана!"
+
+msgid "CDBoot floppy was not successfully created."
+msgstr "Дискета CDBoot не была создана."
+
+msgid "Cancel"
+msgstr "Отмена"
+
+msgid "Cancel Memory Test"
+msgstr "Выход из тестирования памяти"
+
+msgid "Capacity"
+msgstr "Размер"
+
+msgid ""
+"Capacity must be either a '*' symbol to indicate 'use the rest of the "
+"primary partition', or it must be a series of decimal digits ending with a "
+"'M' (indicating megabytes) or a 'G' (indicating gigabytes.)"
+msgstr ""
+"Размер задается или символом '*', означающим 'использовать остаток основного "
+"раздела', или числом с последующим символом 'M' (означающим мегабайты) или "
+"'G' (означающим гигабайты)."
+
+msgid "Chosen shell does not exist on the system."
+msgstr "Выбранной оболочки нет в этой системе"
+
+msgid "Configure Interface"
+msgstr "Настройка интерфейса"
+
+#, c-format
+msgid "Configure a %s system once it has been installed on HDD"
+msgstr "Настройка системы %s после установки на диск"
+
+msgid "Configure an Installed System"
+msgstr "Настройка установленной системы"
+
+msgid "Configure hostname and domain"
+msgstr "Настройка имени хоста и домена"
+
+msgid "Configure network interfaces"
+msgstr "Настройка сетевых интерфейсов"
+
+msgid "Configure the LiveCD Environment"
+msgstr "Настройка окружения LiveCD"
+
+msgid "Configure the hostname and domain for this system"
+msgstr "Настройка имени хоста и домена для системы"
+
+#, c-format
+msgid "Configure this %s System"
+msgstr "Настройка системы %s"
+
+#, c-format
+msgid "Configure this %s system"
+msgstr "Настройка системы %s"
+
+msgid "Configure this System"
+msgstr "Настройка системы"
+
+msgid "Configure this System|Reboot|Return to Welcome Menu"
+msgstr "Настройка системы|Перезагрузка|Возврат в главное меню"
+
+msgid "Configuring Interface:"
+msgstr "Настройка интерфейса:"
+
+#, c-format
+msgid ""
+"Congratulations!\n"
+"\n"
+"%s has successfully been installed on this computer. You may now proceed to "
+"configure the installation. Alternately, you may wish to reboot the computer "
+"and boot into the installed system to confirm that it works."
+msgstr ""
+"Поздравляем!\n"
+"\n"
+"%s была успешно установлена на этот компьютер. Теперь вы можете настроить "
+"установленную систему. Вы можете также перезагрузить компьютер, чтобы "
+"убедиться, что установленная система работает."
+
+#, c-format
+msgid "Couldn't install package `%s'."
+msgstr "Не могу установить пакет `%s'."
+
+#, c-format
+msgid "Couldn't read %s%setc/rc.conf."
+msgstr "Невозможно прочесть %s%setc/rc.conf."
+
+#, c-format
+msgid "Couldn't remove package `%s'."
+msgstr "Не могу удалить пакет `%s'."
+
+msgid "Create CDBoot Floppy"
+msgstr "Создание дискеты CDBoot"
+
+msgid "Create CDBoot Floppy|Return to Utilities Menu"
+msgstr "Создание дискеты CDBoot|Возврат в меню утилит"
+
+msgid "Create Subpartitions"
+msgstr "Создание подразделов"
+
+msgid "Create a CDBoot floppy"
+msgstr "Создание дискеты CDBoot"
+
+msgid "Create a floppy which boots into a dedicated memory-test"
+msgstr "Создание загрузочной дискеты для тестирования памяти"
+
+msgid "Create memtest86 Floppy"
+msgstr "Создание дискеты memtest86"
+
+msgid "DHCP Failure"
+msgstr "Ошибка DHCP"
+
+msgid ""
+"DHCP allows the interface to automatically obtain an IP address from a "
+"nearby DHCP server.\n"
+"\n"
+"Would you like to enable DHCP for this interface?"
+msgstr ""
+"DHCP позволяет автоматически получить IP адрес для интерфейса с ближайшего "
+"DHCP сервера.\n"
+"\n"
+"Включить DHCP для этого интерфейса?"
+
+msgid "Default Router"
+msgstr "Шлюз по умолчанию"
+
+msgid "Disk Drive"
+msgstr "Диск"
+
+msgid "Disk Utilities"
+msgstr "Дисковые утилиты"
+
+msgid "Disk Utilities Menu"
+msgstr "Дисковые утилиты"
+
+msgid "Display ATA devices"
+msgstr "Отображение устройств ATA"
+
+msgid "Display ATA devices (atactl)"
+msgstr "Отображение устройств ATA (atactl)"
+
+msgid "Display PCI devices"
+msgstr "Отображение устройств PCI"
+
+msgid "Display PCI devices (pciconf)"
+msgstr "Отображение устройств PCI (pciconf)"
+
+msgid "Display Plug'n'Play ISA devices"
+msgstr "Отображение устройств Plug'n'Play ISA"
+
+msgid "Display Plug'n'Play ISA devices (pnpinfo)"
+msgstr "Отображение устройств Plug'n'Play ISA (pnpinfo)"
+
+msgid "Display system startup messages"
+msgstr "Стартовые сообщения системы"
+
+msgid "Display system startup messages (dmesg)"
+msgstr "Отображение стартовых сообщений системы (dmesg)"
+
+msgid "Domain"
+msgstr "Домен"
+
+msgid "Enable NetBoot Installation Services|No thanks"
+msgstr "Включить Netboot сервисы установки|Нет, спасибо"
+
+msgid "Enable Netboot Installation Services?"
+msgstr "Включить Netboot сервисы установки?"
+
+msgid "Enable/Disable Services"
+msgstr "Включение/отключение сервисов"
+
+msgid ""
+"Enter a comma-separated list of other groups that this user should belong to"
+msgstr "Введите разделенный запятыми список других групп пользователя"
+
+msgid "Enter the Domain Name"
+msgstr "Введите имя домена"
+
+msgid "Enter the Domain Name (e.g. `network.lan')"
+msgstr "Введите имя домена (например, `network.lan')"
+
+msgid "Enter the Hostname"
+msgstr "Введите имя хоста"
+
+msgid "Enter the Hostname (e.g. `machine')"
+msgstr "Введите имя хоста (например, `machine')"
+
+msgid "Enter the IP Address you would like to use"
+msgstr "Введите IP адрес, который будет использоваться"
+
+msgid "Enter the IP address of primary DNS Server"
+msgstr "Введите IP адрес первичного DNS сервера"
+
+msgid "Enter the IP address of the default router"
+msgstr "Введите IP адрес шлюза по умолчанию"
+
+msgid "Enter the amount of memory you would like to check:"
+msgstr "Введите объем памяти, который необходимо протестировать:"
+
+msgid "Enter the current day of month (e.g. `30')"
+msgstr "Введите день (например, `30')"
+
+msgid "Enter the current hour (e.g. `07')"
+msgstr "Введите час (например, `07')"
+
+msgid "Enter the current minutes (e.g. `59')"
+msgstr "Введите минуты (например, `59')"
+
+msgid "Enter the current month (e.g. `07')"
+msgstr "Введите месяц (например, `07')"
+
+msgid "Enter the current time and date."
+msgstr "Введите текущее время и дату."
+
+msgid "Enter the current year (e.g. `2004')"
+msgstr "Введите текущий год (например, `2004')"
+
+msgid "Enter the full path to the user's home directory, or leave blank"
+msgstr ""
+"Введите полный путь к домашнему каталогу пользователя или оставьте поле "
+"пустым"
+
+msgid "Enter the full path to the user's shell program"
+msgstr "Введите полный путь к оболочке пользователя"
+
+msgid "Enter the netmask of the IP address"
+msgstr "Введите сетевую маску для IP адреса"
+
+msgid "Enter the primary group for this account, or leave blank"
+msgstr "Введите основную группу этой учетной записи или оставьте поле пустым"
+
+msgid "Enter the real name (or GECOS field) of this user"
+msgstr "Введите полное имя (или поле GECOS) этого пользователя"
+
+msgid "Enter the root password again to confirm"
+msgstr "Введите пароль root еще раз и подтвердите"
+
+msgid "Enter the root password you would like to use"
+msgstr "Введите пароль root"
+
+msgid "Enter the user's password (will not be displayed)"
+msgstr "Введите пароль пользователя (не будет отображаться)"
+
+msgid "Enter the username the user will log in as"
+msgstr "Введите имя пользователя"
+
+msgid "Enter this account's numeric user id, or leave blank"
+msgstr ""
+"Введите числовой идентификатор этой учетной записи или оставьте поле пустым"
+
+msgid "Enter year"
+msgstr "Введите год"
+
+msgid "Error Log"
+msgstr "Протокол ошибок"
+
+msgid "Errors occurred while probing the system for its storage capabilities."
+msgstr "При определении объема дисков возникли ошибки."
+
+#, c-format
+msgid ""
+"Everything is now ready to install the actual files which comprise the %s "
+"operating system on the selected partition of the selected disk.\n"
+"\n"
+"Note that this process will take quite a while to finish. You may wish to "
+"take a break now and come back to the computer in a short while."
+msgstr ""
+"Все готово к установке файлов %s на выбранный раздел выбранного диска.\n"
+"\n"
+"Этому процессу потребуется некоторое время. Вы можете сделать перерыв и "
+"вернуться к компьютеру через некоторое время."
+
+msgid "Exit Installer"
+msgstr "Выход из программы"
+
+msgid "Exit this program and return to the system"
+msgstr "Выход из программы и возврат в систему"
+
+msgid "Exit this program to a login prompt with access to the LiveCD"
+msgstr "Выход из программы к приглашению командной строки LiveCD"
+
+msgid "Exit to Live CD"
+msgstr "Выход в Live CD"
+
+msgid "Filesystem table on installed system could not be read."
+msgstr "Невозможно прочесть таблицу файловой системы на установленной системе."
+
+msgid "Floppy successfully formatted!"
+msgstr "Дискета успешно отформатирована"
+
+msgid "Floppy was not successfully formatted."
+msgstr "Дискета не была отформатирована."
+
+msgid "Format Floppy|Return to Utilities Menu"
+msgstr "Форматирование дискеты|Возврат в меню утилит"
+
+msgid "Format MSDOS Floppy"
+msgstr "Форматирование дискеты MSDOS"
+
+msgid "Format a hard disk drive"
+msgstr "Форматирование жесткого диска"
+
+msgid "Format an MSDOS floppy"
+msgstr "Форматирование дискеты MSDOS"
+
+msgid "Format and check hard drives and floppy disks"
+msgstr "Форматирование и проверка дисков и дискет"
+
+msgid "Frag Sz"
+msgstr "Размер фрагмента"
+
+msgid "Group Memberships"
+msgstr "Принадлежность группам"
+
+msgid ""
+"Here you can add a user to an installed system.\n"
+"\n"
+"You can leave the Home Directory, User ID, and Login Group fields empty if "
+"you want these items to be automatically allocated by the system.\n"
+"\n"
+"Note: this user's password will appear in the install log. If this is a "
+"problem, please add the user manually after rebooting into the installed "
+"system instead."
+msgstr ""
+"Вы можете добавить пользователя в установленную систему.\n"
+"\n"
+"Если вы оставите поля домашнего каталога, ID пользователя и группы пустыми, "
+"эти значения будут автоматически назначены системой.\n"
+"\n"
+"Внимание: пароль этого пользователя появится в протоколе установки. Если это "
+"проблема, добавьте пользователя вручную после перезагрузки установленной "
+"системы."
+
+msgid ""
+"Here you can set the super-user (root) password.\n"
+"\n"
+"Note: root's new password will appear in the install log. If this is a "
+"problem, please set root's password manually after rebooting into the "
+"installed system instead."
+msgstr ""
+"Здесь вы можете установить пароль суперпользователя (root).\n"
+"\n"
+"Внимание: пароль root появится в протоколе программы установки. Если это "
+"проблема, установите пароль root вручную после перезагрузки установленной "
+"системы."
+
+msgid "Home Directory"
+msgstr "Домашний каталог"
+
+msgid "Hostname"
+msgstr "Имя хоста"
+
+msgid "How Much Disk?"
+msgstr "Какого размера диск?"
+
+msgid "IP Address"
+msgstr "IP адрес"
+
+msgid "ISA PnP Devices"
+msgstr "Устройства ISA PnP"
+
+msgid "If it is set to local time, or you don't know, please choose NO here!"
+msgstr "Если они установлены в локальное время, или вы не знаете, выберите NO!"
+
+msgid ""
+"If you are having problems formatting a disk, it may be because of junk that "
+"has accumulated in the boot block and the partition table. A cure for this "
+"is to wipe out everything on the first few sectors of the disk. However, "
+"this is a rather drastic action to take, so it is not recommended unless you "
+"are otherwise encountering problems."
+msgstr ""
+"Если у вас возникли проблемы при форматировании диска, это могло произойти "
+"из-за содержимого загрузочного блока и таблицы разделов. Решить эти проблемы "
+"может удаление содержимого первых нескольких секторов диска. Однако, такое "
+"действие довольно серьезно и выполнять его не рекомендуется, если только оно "
+"не необходимо для решения проблем."
+
+msgid ""
+"If you are having problems formatting a primary partition, it may be because "
+"of junk that has accumulated in the partition's `disklabel'. A cure for this "
+"is to wipe out everything on the first few sectors of the primary partition. "
+"However, this is a rather drastic action to take, so it is not recommended "
+"unless you are otherwise encountering problems."
+msgstr ""
+"Если у вас возникли проблемы с форматированием раздела, это могло случиться "
+"из-за содержимого, находящегося в метке раздела. Решить эти проблемы может "
+"очистка первых нескольких секторов основного раздела. Однако, такое действие "
+"довольно серьезно и выполнять его не рекомендуется, если только оно не "
+"необходимо для решения проблем."
+
+#, c-format
+msgid "Install %s"
+msgstr "Установка %s"
+
+#, c-format
+msgid "Install %s on a HDD or HDD partition on this computer"
+msgstr "Установка %s на диск или раздел диска этого компьютера"
+
+msgid "Install Bootblock(s)"
+msgstr "Установка загрузочных блоков"
+
+msgid "Install Bootblock?"
+msgstr "Установить загрузочный блок?"
+
+msgid "Install OS"
+msgstr "Установка OS"
+
+msgid "Install Packages"
+msgstr "Установка пакетов"
+
+msgid "Install a bootblock on this disk"
+msgstr "Установка загрузочного блока на диск"
+
+msgid "Install bootblocks on disks"
+msgstr "Установка загрузочного блока на диск"
+
+msgid "Install extra software packages"
+msgstr "Установка дополнительных программных пакетов"
+
+msgid "Install third-party software packages from the LiveCD"
+msgstr "Установка пакетов сторонних разработчиков с LiveCD"
+
+msgid "Internal error - response from frontend should be a valid device name."
+msgstr ""
+"Внутренняя ошибка - ответ от интерфейса должен быть именем существующего "
+"устройства."
+
+msgid "Internal error - response from frontend should be a valid slice number."
+msgstr ""
+"Внутренняя ошибка - ответ от интерфейса должен быть именем существующего "
+"слайса."
+
+msgid "Internet Super-Server"
+msgstr "Интернет супер-сервер"
+
+msgid "Is this machine's CMOS clock set to UTC?\n"
+msgstr "Установлены ли CMOS часы этого компьютера в UTC?\n"
+
+msgid "Keyboard map not successfully set."
+msgstr "Раскладка клавиатуры не была установлена."
+
+msgid "Live CD Diagnostics Menu"
+msgstr "Диагностическое меню Live CD"
+
+msgid "Live CD Environment Menu"
+msgstr "Меню переменных окружения Live CD"
+
+msgid "Live CD Utilities"
+msgstr "Утилиты Live CD"
+
+msgid "Live CD Utilities Menu"
+msgstr "Меню утилит Live CD"
+
+msgid "LiveCD Environment"
+msgstr "Окружение LiveCD"
+
+msgid "Local or UTC (Greenwich Mean Time) clock"
+msgstr "Локальные или UTC (Greenwich Mean Time) часы"
+
+msgid "Login Group"
+msgstr "Группа"
+
+msgid "MFS"
+msgstr "MFS"
+
+msgid "Memory test"
+msgstr "Тестирование памяти"
+
+msgid "Memory test - Enter the size in values such as 400M, 1G."
+msgstr "Тестирование памяти - введите размер, например 400M, 1G."
+
+msgid "Memory test could not be run."
+msgstr "Тестирование памяти не может быть запущено."
+
+msgid "Memory test size"
+msgstr "Размер тестируемой памяти"
+
+msgid "Month"
+msgstr "Месяц"
+
+msgid ""
+"Mount point may not contain the following characters: blank space, "
+"backslash, or single, double, or back quotes."
+msgstr ""
+"В точке монтирования не должно быть следующих символов: пробелов, обратной "
+"косой черты, одинарных, двойных или обратных кавычек."
+
+msgid "Mount point must be either 'swap', or it must start with a '/'."
+msgstr "Точка монтирования должна быть или 'swap' или начинаться с '/'."
+
+msgid "Mountpoint"
+msgstr "Точка монтирования"
+
+msgid ""
+"NetBoot Installation Services allows this machine to become a Installation "
+"Server that will allow the clients to boot over the network via PXE and "
+"start the Installation Environment.\n"
+"\n"
+"*NOTE!* This will assign the IP Address of 10.1.0.1/24 to the selected "
+"interface.\n"
+"\n"
+"Would you like to provision this machine to serve up the LiveCD/Installer?"
+msgstr ""
+"NetBoot сервисы установки позволяют этому компьютеру становиться сервером "
+"установки, что позволить клиентам загрузиться через сеть посредством PXE и "
+"войти в среду установки.\n"
+"\n"
+"*ОБРАТИТЕ ВНИМАНИЕ!* Выбранному интерфейсу будет присвоен адрес "
+"10.1.0.1/24 .\n"
+"\n"
+"Хотите ли вы включить обслуживание LiveCD/установки с этого компьютера?"
+
+msgid "NetBoot installation services are now started."
+msgstr "NetBoot сервис установки был запущен."
+
+msgid "Netmask"
+msgstr "Сетевая маска"
+
+msgid "Network Time Protocol Daemon"
+msgstr "Даемон синхронизации времени"
+
+msgid "OK"
+msgstr "OK"
+
+msgid "Omit Subpartition(s)|Return to Create Subpartitions"
+msgstr "Пропустить подраздел(ы)|Вернуться к созданию подразделов"
+
+msgid ""
+"On these submenus you will find utilities to help you set up your Live CD "
+"environment, diagnose and analyse this system, and work with the devices "
+"attached to this computer."
+msgstr ""
+"В этих меню находятся утилиты, предназначенные для настройки окружения Live "
+"CD, диагностики и анализа системы, работы с устройствами, подключенными к "
+"компьютеру."
+
+#, c-format
+msgid ""
+"On this menu you will find utilities to help you set up your Live CD "
+"environment.\n"
+"\n"
+"Note that these functions affect only the LiveCD environment you are "
+"currently using, and they will not affect any system that may be installed "
+"on this computer UNLESS you subsequently choose to install %s from this "
+"environment, in which case they will be copied to the newly installed system."
+msgstr ""
+"В этом меню находятся утилиты для настройки переменных окружения Live CD.\n"
+"\n"
+"Эти функции работают только в той среде, где вы их используете на данный "
+"момент, и если вы устанавливаете их в среде LiveCD, а на компьютере уже "
+"установлена операционная система, для этой системы они действовать не будут, "
+"если только вы не устанавливаете %s из этой среды."
+
+msgid "Other Group Memberships"
+msgstr "Другие группы"
+
+msgid "PCI Devices"
+msgstr "Устройства PCI"
+
+msgid "Packages were not fully installed."
+msgstr "Пакеты не были полностью установлены."
+
+msgid "Packages were not fully removed."
+msgstr "Пакеты не были полностью удалены."
+
+msgid "Packages were successfully installed!"
+msgstr "Пакеты были успешно установлены!"
+
+#, c-format
+msgid "Packages were successfully removed."
+msgstr "Пакеты были успешно удалены."
+
+msgid "Packet Mode?"
+msgstr "Пакетный режим?"
+
+msgid "Password"
+msgstr "Пароль"
+
+msgid "Password (Again)"
+msgstr "Пароль (повтор)"
+
+msgid ""
+"Please enter numbers within acceptable ranges for year, month, day of month, "
+"hour, and minute."
+msgstr ""
+"Пожалуйста, введите числа, входящие в диапазоны года, месяца, дня месяца, "
+"часа и минуты."
+
+msgid "Please enter this machine's hostname and domain name."
+msgstr "Введите имя хоста и домена."
+
+msgid "Please insert the floppy to be formatted in unit 0 (``drive A:'')."
+msgstr "Вставьте дискету для форматирования в устройство 0 (``диск A:'')."
+
+msgid "Please select the language you wish you use."
+msgstr "Пожалуйста, выберите язык, который вы предпочитаете использовать."
+
+msgid "Please select which interface you would like to configure:"
+msgstr "Выберите интерфейс для настройки:"
+
+msgid "Please select which services you would like started at boot time."
+msgstr ""
+"Пожалуйста, выберите сервисы, которые необходимо запустить во время загрузки."
+
+msgid "Please set up at least one subpartition."
+msgstr "Настройте хотя бы один подраздел."
+
+msgid "Primary DNS Server"
+msgstr "Первичный DNS сервер"
+
+#, c-format
+msgid "Primary partition #%d was formatted."
+msgstr "Основной раздел #%d был отформатирован."
+
+#, c-format
+msgid ""
+"Primary partition #%d was not correctly formatted, and may now be in an "
+"inconsistent state. We recommend re-formatting it before proceeding."
+msgstr ""
+"Основной раздел #%d не был корректно отформатирован, и может находиться в "
+"поврежденном состоянии. Рекомендуется переформатировать его перед "
+"дальнейшими действиями."
+
+msgid "Probe and display detailed information about this system"
+msgstr "Получение и вывод детальной информации о системе"
+
+msgid "Re-Initialize Bootblock|Cancel"
+msgstr "Переустановить загрузочный блок|Отменить"
+
+msgid "Re-enter the user's password to confirm"
+msgstr "Введите пароль еще раз для подтверждения"
+
+msgid "Real Name"
+msgstr "Полное имя"
+
+msgid "Really omit?"
+msgstr "Действительно пропустить?"
+
+msgid "Reboot"
+msgstr "Перезагрузка"
+
+msgid "Reboot this Computer"
+msgstr "Перезагрузка компьютера"
+
+msgid "Reboot this computer (e.g. to boot into a newly installed system)"
+msgstr "Перезагрузка компьютера (например для загрузки установленной системы)"
+
+msgid "Reboot|Return to Select Disk"
+msgstr "Перезагрузка|Возврат к выбору диска"
+
+msgid "Reboot|Return to Select Primary Partition"
+msgstr "Перезагрузка|Возврат к выбору основного раздела"
+
+msgid "Remove Packages"
+msgstr "Удаление пакетов"
+
+msgid "Remove software packages"
+msgstr "Удаление программных пакетов"
+
+msgid "Remove third-party software packages from the installed system"
+msgstr "Удаление пакетов сторонних разработчиков из системы"
+
+msgid "Return to Begin Installation"
+msgstr "Возврат к началу установки"
+
+msgid "Return to Configure Menu"
+msgstr "Возврат в меню настройки"
+
+msgid "Return to Create Subpartitions"
+msgstr "Возврат к созданию подразделов"
+
+msgid "Return to Select Disk"
+msgstr "Возврат к выбору диска"
+
+msgid "Return to Select Primary Partition"
+msgstr "Возврат к выбору основного раздела"
+
+msgid "Return to Utilities Menu"
+msgstr "Возврат в меню утилит"
+
+msgid "Return to Welcome Menu"
+msgstr "Возврат в главное меню"
+
+msgid "Root password"
+msgstr "Пароль root"
+
+msgid "Root password again"
+msgstr "Пароль root еще раз"
+
+msgid "Run On-Line Memory Test"
+msgstr "Запуск он-лайн теста памяти"
+
+msgid "Running after installation custom routines..."
+msgstr "Запуск после установки..."
+
+msgid "Secure Shell Daemon"
+msgstr "Даемон Secure Shell (ssh)"
+
+msgid "Select Console Font"
+msgstr "Выберите консольный шрифт"
+
+msgid "Select Disk"
+msgstr "Выбор диска"
+
+msgid "Select Keyboard Map"
+msgstr "Выбор раскладки клавиатуры"
+
+msgid "Select Language"
+msgstr "Выбор языка"
+
+msgid "Select Primary Partition"
+msgstr "Выбор основного раздела"
+
+msgid "Select Screen Map"
+msgstr "Выбор карты экрана"
+
+msgid "Select Services"
+msgstr "Выбор сервисов"
+
+msgid "Select Time Zone"
+msgstr "Выбор временной зоны"
+
+msgid "Select a Time Zone appropriate to your physical location."
+msgstr "Выберите временную зону, соответствующую вашему местонахождению"
+
+#, c-format
+msgid "Select a disk on which to install %s"
+msgstr "Выберите диск для установки %s"
+
+msgid "Select a disk to format."
+msgstr "Выбор диска для форматирования."
+
+msgid "Select a font appropriate to your video monitor and language."
+msgstr "Выберите шрифт, соответствующий вашему монитору и языку."
+
+msgid "Select a keyboard map appropriate to your keyboard layout."
+msgstr "Выберите раскладку клавиатуры"
+
+msgid ""
+"Select a mapping for translating characters as they appear on your video "
+"console screen."
+msgstr "Выбор карты для трансляции символов на консоль."
+
+#, c-format
+msgid ""
+"Select how much of this disk you want to use for %s.\n"
+"\n"
+"%s"
+msgstr ""
+"Выберите, какая часть этого диска будет использована под %s.\n"
+"\n"
+"%s"
+
+#, c-format
+msgid ""
+"Select optional software packages that you want installed on this system. "
+"This form lists only the software packages installed on the LiveCD; "
+"thousands more are available via the internet once %s is installed."
+msgstr ""
+"Выберите опциональные программные пакеты для установки в эту систему. Эта "
+"форма содержит только список программных пакетов, установленных на LiveCD; "
+"тысячи других доступны через интернет после установки %s."
+
+msgid ""
+"Select the disk containing the installation that you would like to upgrade."
+msgstr "Выбор диска, содержащего установку, которую нужно обновить."
+
+msgid "Select the disk containing the installation."
+msgstr "Выберите диск, содержащий программу установки."
+
+msgid "Select the disks on which you wish to install bootblocks."
+msgstr "Выбор диска для установки загрузочного блока."
+
+#, c-format
+msgid ""
+"Select the existing primary partition (also known as a `slice' in the BSD "
+"tradition) on which to install %s.\n"
+"\n"
+"Note that if you do not have any existing primary partitions on this disk, "
+"you must first create some. This installer does not currently have the "
+"ability to do this, so you will have to exit and run fdisk (in DOS or *BSD) "
+"or parted (in Linux) to do so."
+msgstr ""
+"Выберите существующие основной раздел (традиционно в BSD называемый "
+"`слайсом') для установки %s.\n"
+"\n"
+"Если на этом диске еще нет основных разделов, их необходимо сначала создать. "
+"Программа установки на данный момент не может сделать этого, необходимо "
+"выйти из нее и запустить fdisk (в DOS или *BSD) или parted (в Linux)."
+
+msgid ""
+"Select the installed software packages that you want removed from this "
+"system."
+msgstr ""
+"Выберите установленные программные пакеты, которые необходимо удалить из "
+"системы."
+
+msgid ""
+"Select the primary partition containing the installation you would like to "
+"upgrade."
+msgstr ""
+"Выбор основного раздела, содержащего установку, которую нужно обновить."
+
+msgid "Select the primary partition containing the installation."
+msgstr "Выберите основной раздел, содержащий установку."
+
+msgid "Select this to use 'packet mode' to boot the disk"
+msgstr ""
+"Выберите этот пункт для использования 'пакетного режима' загрузки диска"
+
+msgid "Select timezone"
+msgstr "Выбор временной зоны"
+
+msgid "Set Hostname/Domain"
+msgstr "Установка имени хоста/домена"
+
+msgid "Set Root Password"
+msgstr "Установите пароль root"
+
+msgid "Set Time/Date"
+msgstr "Установка времени/даты"
+
+msgid "Set console font"
+msgstr "Выбор шрифта для консоли"
+
+msgid "Set date and time"
+msgstr "Установка даты и времени"
+
+msgid "Set how characters are translated before console display"
+msgstr "Выбор трансляции символов перед отображением на экран"
+
+msgid "Set how the characters on your video console look"
+msgstr "Выбор шрифта для консоли"
+
+msgid "Set keyboard map"
+msgstr "Выбор раскладки клавиатуры"
+
+msgid "Set root password"
+msgstr "Установка пароля root"
+
+msgid "Set screen map"
+msgstr "Выбор соответствия шрифта и кодировки экрана"
+
+msgid "Set the Time Zone of your physical location"
+msgstr "Выбор временной зоны, где вы находитесь"
+
+msgid "Set the Time and Date of your machine"
+msgstr "Установка даты и времени на компьютере"
+
+msgid "Set the password that the root (superuser) account will use"
+msgstr "Установка пароля для root (суперпользователя)"
+
+msgid "Set up network interfaces (NICs, ethernet, TCP/IP, etc)"
+msgstr "Настройка сетевых интерфейсов (NIC, ethernet, TCP/IP и т.д.)"
+
+msgid ""
+"Set up the subpartitions (also known as just `partitions' in BSD tradition) "
+"you want to have on this primary partition.\n"
+"\n"
+"For Capacity, use 'M' to indicate megabytes, 'G' to indicate gigabytes, or a "
+"single '*' to indicate 'use the remaining space on the primary partition'."
+msgstr ""
+"Установка подразделов (называемых просто `разделами' по традиции BSD), "
+"которые будут находиться на этом основном разделе.\n"
+"\n"
+"Для размера используйте 'M', чтобы обозначить мегабайты, 'G', чтобы "
+"обозначить гигабайты, или символ '*', чтобы использовать остаток места на "
+"основном разделе."
+
+msgid "Set what kind of keyboard layout you have"
+msgstr "Выберите раскладку вашей клавиатуры"
+
+msgid "Setting password..."
+msgstr "Установка пароля"
+
+msgid "Setup NetBoot Install Services"
+msgstr "Настройка сервисов установки NetBoot"
+
+msgid "Setup NetBoot Installation Environment"
+msgstr "Настроить NetBoot среду установки"
+
+msgid "Setup machine as remote installation server"
+msgstr "Настроить компьютер как удаленный сервер установки"
+
+msgid "Shell"
+msgstr "Оболочка"
+
+msgid "Skip this Step"
+msgstr "Пропуск этого действия"
+
+msgid "Softupdates"
+msgstr "Softupdates"
+
+msgid "Some errors occurred. Boot sector was not successfully initialized."
+msgstr "Возникли ошибки. Загрузочный сектор не был успешно инициализирован."
+
+msgid "Some errors occurred. Start of disk was not successfully wiped."
+msgstr "Возникли ошибки. Начало диска не было успешно очищено."
+
+msgid ""
+"Some errors occurred. Start of primary partition was not successfully wiped."
+msgstr "Возникли ошибки. Начало первичного раздела не было очищено."
+
+#, c-format
+msgid ""
+"Some situations in which you might not wish to use this installer are:\n"
+"\n"
+"- you want to install %s onto a logical/extended partition;\n"
+"- you want to install %s onto a ``dangerously dedicated'' disk; or\n"
+"- you want full and utter control over the install process."
+msgstr ""
+"В некоторых ситуациях вы не можете использовать эту программу:\n"
+"\n"
+"- установка %s в логический/расширенный раздел;\n"
+"- установка %s на ``dangerously dedicated'' диск; или\n"
+"- необходим тотальный контроль над процессом установки."
+
+#, c-format
+msgid ""
+"Some subpartitions on the primary partition of this disk are already "
+"activated as swap. Since there is no way to deactivate swap in %s once it is "
+"activated, in order to edit the subpartition layout of this primary "
+"partition, you must first reboot."
+msgstr ""
+"Некоторые подразделы на основном разделе этого диска уже были активированы "
+"для подкачки. Поскольку в %s нет способа деактивировать подкачку, для "
+"редактирования раскладки подразделов этого основного раздела необходимо "
+"сначала перегрузиться."
+
+#, c-format
+msgid ""
+"Some subpartitions on the selected primary partition are already activated "
+"as swap. Since there is no way to deactivate swap in %s once it is "
+"activated, in order to edit the subpartition layout of this primary "
+"partition, you must first reboot."
+msgstr ""
+"Некоторые подразделы на выбранном основном разделе уже были активированы для "
+"подкачки. Поскольку в %s нет способа деактивировать подкачку, для "
+"редактирования раскладки подразделов этого основного раздела необходимо "
+"сначала перегрузиться."
+
+msgid "Start of disk was successfully wiped."
+msgstr "Начало диска было успешно очищено."
+
+msgid "Start of primary partition was successfully wiped."
+msgstr "Начало первичного раздела было успешно очищено."
+
+#, c-format
+msgid ""
+"Subpartitions further divide a primary partition for use with %s. Some "
+"reasons you may want a set of subpartitions are:\n"
+"\n"
+"- you want to restrict how much data can be written to certain parts of the "
+"primary partition, to quell denial-of-service attacks; and\n"
+"- you want to speed up access to data on the disk."
+msgstr ""
+"Подразделы это дальнейшее разделение основного раздела для использования с %"
+"s. Причины, по которым могут потребоваться подразделы:\n"
+"\n"
+"- вы хотите ограничить объем данных, которые могут быть записаны на "
+"определенные части основного раздела для остановки DoS атаки; и\n"
+"- вы хотите повысить скорость доступа к данным."
+
+msgid "Swap already active"
+msgstr "Подкачка уже включена"
+
+msgid "Switch to Expert Mode"
+msgstr "Переключиться в экспертный режим"
+
+msgid "Switch to Normal Mode"
+msgstr "Переключиться в нормальный режим"
+
+msgid "System Diagnostics"
+msgstr "Диагностика системы"
+
+msgid "System Logging Daemon"
+msgstr "Даемон системного протоколирования"
+
+msgid "System Startup Messages (dmesg)"
+msgstr "Загрузочные сообщения системы (dmesg)"
+
+msgid "Target system could not be mounted."
+msgstr "Целевая система не может быть смонтирована."
+
+msgid "Test the memory in the machine while running"
+msgstr "Запуск тестирования памяти в работающей системе"
+
+#, c-format
+msgid ""
+"Thank you for choosing %s.\n"
+"\n"
+"For up-to-date news and information on %s, make sure to check out\n"
+"\n"
+"%s\n"
+"\n"
+"You can use this automated application to assist you in setting up this %s "
+"system."
+msgstr ""
+"Спасибо за выбор %s.\n"
+"\n"
+"Последние новости и самая свежая информация по %s, находятся на сайте\n"
+"\n"
+"%s\n"
+"\n"
+"Вы можете использовать эту программу для настройки установленной системы %s."
+
+#, c-format
+msgid "The Time Zone has been set to %s."
+msgstr "Временная зона была установлена в %s."
+
+msgid "The date and time have been set."
+msgstr "Дата и время были установлены"
+
+#, c-format
+msgid ""
+"The disk\n"
+"\n"
+"%s\n"
+"\n"
+"was formatted."
+msgstr ""
+"Диск\n"
+"\n"
+"%s\n"
+"\n"
+"был отформатирован."
+
+#, c-format
+msgid ""
+"The disk\n"
+"\n"
+"%s\n"
+"\n"
+"was not correctly formatted, and may now be in an inconsistent state. We "
+"recommend re-formatting it before attempting to install %s on it."
+msgstr ""
+"Диск\n"
+"\n"
+"%s\n"
+"\n"
+"не был правильно отформатирован, и может быть поврежден. Рекомендуется "
+"переформатировать его перед установкой %s."
+
+msgid "The disk on which you wish to install a bootblock"
+msgstr "Диск, на который будет установлен загрузочный блок"
+
+#, c-format
+msgid ""
+"The installer could not find any disks suitable for installation (IDE or "
+"SCSI) attached to this computer. If you wish to install %s on an unorthodox "
+"storage device, you will have to exit to a LiveCD command prompt and install "
+"it manually, using the file /README as a guide."
+msgstr ""
+"Программа установки не может найти на этом компьютере диски, подходящие для "
+"установки (IDE или SCSI). Если вы хотите установить %s на другое "
+"устройство, необходимо выйти в приглашение командной строки LiveCD и "
+"провести установку вручную, используя файл /README в качестве руководства."
+
+#, c-format
+msgid ""
+"The options on this menu allow you to configure a %s system after it has "
+"already been installed."
+msgstr "Это меню позволяет настроить систему %s после ее установки."
+
+msgid "The passwords do not match."
+msgstr "Пароли не совпадают"
+
+msgid "The root password has been changed."
+msgstr "Пароль root был изменен"
+
+msgid ""
+"The same mount point cannot be specified for two different subpartitions."
+msgstr ""
+"Одна и та же точка монтирования не может быть задана для разных подразделов."
+
+#, c-format
+msgid ""
+"The sole primary partition of the disk\n"
+"\n"
+"%s\n"
+"\n"
+"was not correctly formatted, and may now be in an inconsistent state. We "
+"recommend re-formatting the disk before attempting to install %s on it."
+msgstr ""
+"Первичный раздел диска\n"
+"\n"
+"%s\n"
+"\n"
+"не был правильно отформатирован, и может быть поврежден. Рекомендуется "
+"переформатировать диск перед установкой %s."
+
+#, c-format
+msgid ""
+"The space allocated to all of your selected subpartitions (%dM) exceeds the "
+"total capacity of the selected primary partition (%dM). Remove some "
+"subpartitions or choose a smaller size for them and try again."
+msgstr ""
+"Размер, выделенный всем выбранным разделам (%dM), превышает общий размер "
+"выбранного основного раздела (%dM). Удалите некоторые подразделы или "
+"выберите для них меньший размер и попробуйте еще раз."
+
+msgid ""
+"The subpartitions you chose were not correctly created, and the primary "
+"partition may now be in an inconsistent state. We recommend re-formatting it "
+"before proceeding."
+msgstr ""
+"Выбранный подраздел не был корректно создан, и основной раздел может быть "
+"поврежден. Мы рекомендуем переформатировать его перед дальнейшими действиями."
+
+msgid ""
+"The system has issued a cvsup command in the background.\n"
+"\n"
+"Please tail /tmp/cvsupdate.log if you wish to follow the progress."
+msgstr ""
+"Система выполнила команду cvsup в фоновом режиме.\n"
+"\n"
+"Используйте tail /tmp/cvsupdate.log для отслеживания текущего выполнения."
+
+msgid "These functions can help you diagnose this system."
+msgstr "Эти функции могут помочь в диагностике системы"
+
+msgid ""
+"These functions let you manipulate the storage devices attached to this "
+"computer."
+msgstr ""
+"Эти функции предназначены для работы с устройствами хранения, подключенными "
+"к компьютеру."
+
+#, c-format
+msgid ""
+"This experimental application will install %s on one of the hard disk drives "
+"attached to this computer. It has been designed to make it easy to install %"
+"s in the typical case. If you have special requirements that are not "
+"addressed by this installer, or if you have problems using it, you are "
+"welcome to install %s manually. To do so select Exit to Live CD, login as "
+"root, and follow the instructions given in the file /README .\n"
+"\n"
+"NOTE! As with any installation process, YOU ARE STRONGLY ENCOURAGED TO BACK "
+"UP ANY IMPORTANT DATA ON THIS COMPUTER BEFORE PROCEEDING!"
+msgstr ""
+"Эта экспериментальная программа установит %s на один из подключенных к "
+"компьютеру жестких дисков. Она была разработана для упрощения типичной "
+"установки %s. Если вы предъявляете к установке особые требования, не "
+"удовлетворяемые этой программой, или у вас проблемы с ее использованием, "
+"установите %s вручную. Для этого выйдите из Live CD, войдите под root, и "
+"следуйте инструкциям в файле /README .\n"
+"\n"
+"ВНИМАНИЕ! Как и с любым процессом установки, НАСТОЯТЕЛЬНО РЕКОМЕНДУЕТСЯ "
+"СДЕЛАТЬ РЕЗЕРВНУЮ КОПИЮ ВСЕХ ВАЖНЫХ ДАННЫХ ПЕРЕД НАЧАЛОМ УСТАНОВКИ!"
+
+msgid ""
+"This machine is about to be shut down. After the machine has reached its "
+"shutdown state, you may remove the CD from the CD-ROM drive tray and press "
+"Enter to reboot from the HDD."
+msgstr ""
+"Компьютер будет перезагружен. После завершения работы системы вы можете "
+"извлечь компакт-диск из привода и нажать Enter для загрузки с жесткого диска."
+
+msgid "Upgrade"
+msgstr "Обновление"
+
+#, c-format
+msgid "Upgrade a FreeBSD 4.X system to %s"
+msgstr "Обновление системы FreeBSD 4.X до %s"
+
+#, c-format
+msgid "Usage: %s [-o rootdir] [-r rendezvous] [-t caps|npipe|tcp]\n"
+msgstr "Использование: %s [-o rootdir] [-r rendezvous] [-t caps|npipe|tcp]\n"
+
+msgid "Use DHCP?"
+msgstr "Использовать DHCP?"
+
+msgid "Use DHCP|Configure Manually"
+msgstr "Использовать DHCP|Настроить вручную"
+
+msgid "Use Entire Disk|Use Part of Disk|Return to Select Disk"
+msgstr "Использовать весь диск|Использовать часть диска|Возврат к выбору диска"
+
+msgid "User ID"
+msgstr "ID пользователя"
+
+#, c-format
+msgid "User `%s' was added."
+msgstr "Пользователь `%s' был добавлен"
+
+msgid "User was not successfully added."
+msgstr "Пользователь не был добавлен"
+
+msgid "Username"
+msgstr "Имя пользователя"
+
+msgid "Utilities"
+msgstr "Утилиты"
+
+msgid "Utilities to work with and diagnose disks and other subsystems"
+msgstr "Утилиты для диагностирования и работы с дисками и другими подсистемами"
+
+msgid "Utilities to work with disks, diagnostics, and the LiveCD Environment"
+msgstr "Утилиты для работы с дисками, диагностики и настройки окружения LiveCD"
+
+msgid "Video font not successfully set."
+msgstr "Шрифт не был установлен."
+
+#, c-format
+msgid ""
+"WARNING! ALL data in ALL partitions on the disk\n"
+"\n"
+"%s\n"
+"\n"
+"will be IRREVOCABLY ERASED!\n"
+"\n"
+"Are you ABSOLUTELY SURE you wish to take this action? This is your LAST "
+"CHANCE to cancel!"
+msgstr ""
+"ВНИМАНИЕ! ВСЕ данные во ВСЕХ разделах диска\n"
+"\n"
+"%s\n"
+"\n"
+"будут НЕВОССТАНОВИМО УДАЛЕНЫ!\n"
+"\n"
+"Вы АБСОЛЮТНО УВЕРЕНЫ, что хотите выполнить это действие? Это ПОСЛЕДНИЙ ШАНС "
+"отменить его!"
+
+#, c-format
+msgid ""
+"WARNING! ALL data in primary partition #%d,\n"
+"\n"
+"%s\n"
+"\n"
+"on the disk\n"
+"\n"
+"%s\n"
+"\n"
+" will be IRREVOCABLY ERASED!\n"
+"\n"
+"Are you ABSOLUTELY SURE you wish to take this action? This is your LAST "
+"CHANCE to cancel!"
+msgstr ""
+"ВНИМАНИЕ! ВСЕ данные основного раздела #%d,\n"
+"\n"
+"%s\n"
+"\n"
+"на диске\n"
+"\n"
+"%s\n"
+"\n"
+" будут НЕВОССТАНОВИМО УДАЛЕНЫ!\n"
+"\n"
+"Вы АБСОЛЮТНО УВЕРЕНЫ, что хотите выполнить это действие? Это ПОСЛЕДНИЙ ШАНС "
+"отменить действие!"
+
+#, c-format
+msgid ""
+"WARNING: the %s subpartition should be at least %dM in size or you will risk "
+"running out of space during the installation."
+msgstr ""
+"ПРЕДУПРЕЖДЕНИЕ: размер подраздела %s должен быть как минимум %dM, иначе во "
+"время установки места может не хватить."
+
+#, c-format
+msgid ""
+"WARNING: you should have a disk at least %dM in size, or you may encounter "
+"problems trying to install %s."
+msgstr ""
+"ПРЕДУПРЕЖДЕНИЕ: диск должен иметь размер как минимум %dM, или у вас могут "
+"возникнуть проблемы при установке %s."
+
+#, c-format
+msgid ""
+"WARNING: you should have a primary partition at least %dM in size, or you "
+"may encounter problems trying to install %s."
+msgstr ""
+"ПРЕДУПРЕЖДЕНИЕ: размер основного раздела должен быть не менее %dM, или при "
+"установке %s могут возникнуть проблемы."
+
+msgid "Warning: Installed system was not properly unmounted."
+msgstr ""
+"Предупреждение: установленная система не была правильно размонтирована."
+
+#, c-format
+msgid ""
+"Warning: bootblocks were not successfully installed on the disk `%s'. This "
+"may be because the disk is new and not yet formatted. If this is the case, "
+"it might help to re-initialize the boot sector, then try installing the "
+"bootblock again. Note that this should not affect the partition table of the "
+"disk."
+msgstr ""
+"Предупреждение: загрузочные блоки не были успешно установлены на диск`%s'. "
+"Это могло произойти из-за того, что диск новый и еще не был отформатирован. "
+"В этом случае может помочь переинициализация загрузочного сектора с "
+"последующей повторной установкой загрузочного блока. Обратите внимание, что "
+"это не должно повлиять на таблицу разделов диска."
+
+msgid ""
+"Warning: could not assign IP address or default gateway.\n"
+"\n"
+"Write the corresponding settings to rc.conf anyway?"
+msgstr ""
+"Предупреждение: невозможно назначить IP адрес или шлюз по умолчанию.\n"
+"\n"
+"Записать соответствующие настройки в rc.conf несмотря на это?"
+
+#, c-format
+msgid ""
+"Warning: could not enable dhclient for %s.\n"
+"\n"
+"Write the corresponding settings to rc.conf anyway?"
+msgstr ""
+"Предупреждение: невозможно включить dhclient для %s.\n"
+"\n"
+"Записать соответствующие настрйки в rc.conf несмотря на это?"
+
+msgid "Warning: could not launch cvsup"
+msgstr "Предупреждение: не удается запустить cvsup"
+
+msgid "Warning: subpartitions were not correctly unmounted."
+msgstr "Предупреждение: подразделы не были правильно отмонтированы."
+
+#, c-format
+msgid "Welcome to %s"
+msgstr "Добро пожаловать в %s"
+
+#, c-format
+msgid ""
+"Welcome to the %s Live CD.\n"
+"\n"
+"%s is an efficient and elegant BSD Unix-derived operating system. For more "
+"information, see %s\n"
+"\n"
+"From this CD, you can boot into %s ``live'' (without installing it) to "
+"evaluate it, to install it manually, or to troubleshoot problems with an "
+"existing installation, using either a command prompt or menu-driven "
+"utilities.\n"
+"\n"
+"Also, you can use this automated application to assist you in installing %s "
+"on this computer and configuring it once it is installed."
+msgstr ""
+"Добро пожаловать в %s Live CD.\n"
+"\n"
+"%s это эффективная и элегантная BSD Unix операционная система. За подробной "
+"информацией обратитесь к %s\n"
+"\n"
+"С этого диска вы можете загрузить %s в режиме ``live'' (без установки), "
+"чтобы ознакомиться с ней, установить вручную, или решить проблемы с "
+"существующей установкой (через приглашение командной строки или через меню "
+"утилит.\n"
+"\n"
+"Кроме того, для установки %s вы можете использовать эту программу, а после "
+"установки с ее помощью настроить систему."
+
+msgid "Wipe out the start of a disk"
+msgstr "Очистка начала диска"
+
+msgid "Wipe out the start of a primary partition"
+msgstr "Очистка начала основного раздела"
+
+msgid "Yes|No"
+msgstr "Да|Нет"
+
+msgid ""
+"You cannot have more than 16 subpartitions on a single primary partition. "
+"Remove some and try again."
+msgstr ""
+"На одном основном разделе не может находиться более 16 подразделов. Удалите "
+"некоторые подразделы и попробуйте еще раз."
+
+msgid ""
+"You cannot have more than one subpartition with a '*' capacity (meaning 'use "
+"the remainder of the primary partition'.)"
+msgstr ""
+"Вы не можете использовать '*' для обозначения размера более чем одного "
+"подраздела (означает 'использовать остаток основного раздела')."
+
+#, c-format
+msgid ""
+"You have elected to not have the following subpartition(s):\n"
+"\n"
+"%s\n"
+"\n"
+"The ramifications of these subpartition(s) being missing will be:\n"
+"\n"
+"%s\n"
+"Is this really what you want to do?"
+msgstr ""
+"Вы отказались от создания следующих подразделов:\n"
+"\n"
+"%s\n"
+"\n"
+"Эти подразделы будут заменены так:\n"
+"\n"
+"%s\n"
+"Вы действительно подтверждаете это?"
+
+#, c-format
+msgid ""
+"You may now wish to install bootblocks on one or more disks. If you already "
+"have a boot manager installed, you can skip this step (but you may have to "
+"configure your boot manager separately.) If you installed %s on a disk "
+"other than your first disk, you will need to put the bootblock on at least "
+"your first disk and the %s disk."
+msgstr ""
+"Вы можете установить загрузочные блоки на один или несколько дисков. Если "
+"менеджер загрузки уже установлен, этот шаг можно пропустить (но менеджер "
+"загрузки необходимо настроить отдельно). Если %s устанавливается не на "
+"первый диск, загрузочный блок необходимо поместить хотя бы на первый диск и "
+"диск с %s."
+
+msgid "You must enter a username."
+msgstr "Необходимо ввести имя пользователя"
+
+msgid "You must include a / (root) subpartition."
+msgstr "Необходимо включить / (корневой) подраздел."
+
+msgid "directory name"
+msgstr "имя каталога"
+
+msgid "ifconfig Failure"
+msgstr "Ошибка ifconfig"
+
+msgid "memtest86 floppy successfully created!"
+msgstr "Дискета memtest86 была успешно создана!"
+
+msgid "memtest86 floppy was not successfully created."
+msgstr "Дискета memtest86 не была создана"
Index: contrib/bsdinstaller/src/backend/lua/200_install.lua
===================================================================
RCS file: contrib/bsdinstaller/src/backend/lua/200_install.lua
diff -N contrib/bsdinstaller/src/backend/lua/200_install.lua
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/src/backend/lua/200_install.lua 13 Sep 2006 23:43:25 -0000
@@ -0,0 +1,34 @@
+-- $Id: 200_install.lua,v 1.13 2006/09/13 23:43:25 cpressey Exp $
+
+--
+-- 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.
+--
+
+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
+
+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
Index: contrib/bsdinstaller/src/backend/lua/400_configure.lua
===================================================================
RCS file: contrib/bsdinstaller/src/backend/lua/400_configure.lua
diff -N contrib/bsdinstaller/src/backend/lua/400_configure.lua
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/src/backend/lua/400_configure.lua 13 Sep 2006 23:43:25 -0000
@@ -0,0 +1,25 @@
+-- $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)
+
+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
Index: contrib/bsdinstaller/src/backend/lua/500_create_geom_mirror.lua
===================================================================
RCS file: contrib/bsdinstaller/src/backend/lua/500_create_geom_mirror.lua
diff -N contrib/bsdinstaller/src/backend/lua/500_create_geom_mirror.lua
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/src/backend/lua/500_create_geom_mirror.lua 13 Sep 2006 23:43:25 -0000
@@ -0,0 +1,142 @@
+-- $Id: 500_create_geom_mirror.lua,v 1.3 2006/09/13 23:43:25 cpressey Exp $
+
+--
+-- Copyright (c)2005 Scott Ullrich. All rights reserved.
+--
+-- Redistribution and use in source and binary forms, with or without
+-- modification, are permitted provided that the following conditions
+-- are met:
+--
+-- 1. Redistributions of source code must retain the above copyright
+-- notices, this list of conditions and the following disclaimer.
+-- 2. Redistributions in binary form must reproduce the above copyright
+-- notices, this list of conditions, and the following disclaimer in
+-- the documentation and/or other materials provided with the
+-- distribution.
+-- 3. Neither the names of the copyright holders nor the names of their
+-- contributors may be used to endorse or promote products derived
+-- from this software without specific prior written permission.
+--
+-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+-- ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES INCLUDING, BUT NOT
+-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+-- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+-- COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+-- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+-- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+-- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+-- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+-- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+-- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+-- POSSIBILITY OF SUCH DAMAGE.
+--
+
+--
+-- FreeBSD specific module GEOM/GMirror
+--
+-- If more than two disks are detected, ask if the user wishes
+-- to setup a GEOM/GMirror volume. The volume will then appear
+-- in the future select disk step.
+--
+id = "setup_gmirror"
+name = _("Setup GEOM Mirror")
+req_state = { "storage" }
+
+condition = function()
+ if App.conf.os.name ~= "FreeBSD" then
+ return false, "GEOM only applies to FreeBSD"
+ end
+ if App.state.storage:get_disk_count() < 2 then
+ return false, "GEOM needs more than one disk"
+ end
+ return true
+end
+
+effect = function(step)
+
+ -- Ask if user wnats a GEOM mirror to be created
+ local response = App.ui:present{
+ name = _("GEOM Mirror"),
+ short_desc = _("Would you like to setup a GEOM mirror?"),
+ actions = {
+ {
+ id = "ok",
+ name = _("Yes, setup a GEOM mirror")
+ },
+ {
+ id = "cancel",
+ accelerator = "ESC",
+ name = _("No thanks")
+ }
+ }
+ }
+
+ if response.action_id ~= "ok" then
+ return Menu.CONTINUE
+ end
+
+ local disk1
+ local disk2
+
+ local dd = App.state.storage:select_disk({
+ short_desc = _(
+ "Select the primary disk %s ",
+ App.conf.product.name
+ ),
+ cancel_desc = _("Cancel")
+ })
+ disk1 = dd:get_name()
+
+ local dd = App.state.storage:select_disk({
+ short_desc = _(
+ "Select the disk on which the mirror of %s ",
+ App.conf.product.name
+ ),
+ cancel_desc = _("Cancel")
+ })
+ disk2 = dd:get_name()
+
+ -- Make sure disk 1 was selected
+ if not disk1 then
+ return Menu.CONTINUE
+ end
+
+ -- Make sure disk 2 was selected
+ if not disk2 then
+ return Menu.CONTINUE
+ end
+
+ if disk1 == disk2 then
+ App.ui:inform(_(
+ "You need two unique disks to create a GEOM MIRROR.")
+ )
+ return Menu.CONTINUE
+ end
+
+ local cmds = CmdChain.new()
+ -- XXX: switch to a while loop and allow user to add more than 2 disks
+ cmds:add{
+ cmdline = "${root}sbin/gmirror label -v -b split ${OS}Mirror ${disk1} ${disk2}",
+ replacements = {
+ OS = App.conf.product.name,
+ disk1 = disk1,
+ disk2 = disk2
+ }
+ }
+
+ -- Finally execute the commands to create the gmirror
+ if cmds:execute() then
+ App.ui:inform(_(
+ "The GEOM mirror has been created with no errors. " ..
+ "The mirror disk will now appear in the select disk step.")
+ )
+ -- Survey disks again, they have changed.
+ App.state.storage:survey()
+ else
+ App.ui:inform(_(
+ "The GEOM mirror was NOT created due to errors.")
+ )
+ end
+
+ return Menu.CONTINUE
+end
Index: contrib/bsdinstaller/src/backend/lua/600_upgrade.lua
===================================================================
RCS file: contrib/bsdinstaller/src/backend/lua/600_upgrade.lua
diff -N contrib/bsdinstaller/src/backend/lua/600_upgrade.lua
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/src/backend/lua/600_upgrade.lua 13 Sep 2006 23:43:25 -0000
@@ -0,0 +1,10 @@
+-- $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")
+
+effect = function()
+ App.descend("upgrade")
+ return Menu.CONTINUE
+end
Index: contrib/bsdinstaller/src/backend/lua/800_netboot.lua
===================================================================
RCS file: contrib/bsdinstaller/src/backend/lua/800_netboot.lua
diff -N contrib/bsdinstaller/src/backend/lua/800_netboot.lua
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/src/backend/lua/800_netboot.lua 13 Sep 2006 23:43:25 -0000
@@ -0,0 +1,11 @@
+-- $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")
+
+effect = function()
+ App.descend("netboot")
+ return Menu.CONTINUE
+end
Index: contrib/bsdinstaller/src/backend/lua/950_reboot.lua
===================================================================
RCS file: contrib/bsdinstaller/src/backend/lua/950_reboot.lua
diff -N contrib/bsdinstaller/src/backend/lua/950_reboot.lua
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/src/backend/lua/950_reboot.lua 13 Sep 2006 23:43:25 -0000
@@ -0,0 +1,16 @@
+-- $Id: 950_reboot.lua,v 1.4 2006/09/13 23:43:25 cpressey Exp $
+
+id = "reboot"
+name = _("Reboot")
+short_desc = _("Reboot this computer")
+
+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
Index: contrib/bsdinstaller/src/backend/lua/Makefile
===================================================================
RCS file: contrib/bsdinstaller/src/backend/lua/Makefile
diff -N contrib/bsdinstaller/src/backend/lua/Makefile
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/src/backend/lua/Makefile 14 Jul 2007 11:12:01 -0000
@@ -0,0 +1,58 @@
+# Makefile for dfuibe_lua.
+# $Id: Makefile,v 1.56 2006/07/29 18:02:50 cpressey Exp $
+
+BASE?=../..
+include ${BASE}/Config
+
+PACKAGE= dfuibe_lua
+
+MEDIAROOT?= /usr/release/root
+OSNAME?= DragonFly
+
+LANGUAGES= ru
+
+all:
+ @echo "Nothing to build."
+
+clean:
+ rm -rf po/*.mo *.core
+
+strip: all
+ @echo "Nothing to strip."
+
+nls: all mo
+
+pot:
+ cat `find . -name '*.lua' ! -regex '\./scripts/test/main.lua'` | \
+ sed 's|\-\-|//|' | sed 's/\.\.//' | \
+ xgettext -s -C --no-location --keyword=_ -o po/${PACKAGE}.pot -
+
+mo:
+ for _language in ${LANGUAGES}; do \
+ msgfmt -o po/$${_language}.mo po/$${_language}; \
+ done
+
+test:
+ env LD_LIBRARY_PATH='../../lib/libaura:../../lib/libdfui:$(LUA)/lib' \
+ LUA_PATH='../../lib/lua/?/?.lua;../../lib/lua/luasocket/src/?.lua;./lib/?.lua' \
+ LUA_CPATH='../../lib/lua/posix/?.so;../../lib/lua/pty/?.so;../../lib/lua/dfui/?.so;../../lib/lua/luasocket/src/?.so' \
+ $(LUA)/lua main.lua \
+ ./conf/BSDInstaller.lua ./conf/${OSNAME}.lua \
+ dir.root=${MEDIAROOT} booted_from_install_media=true
+
+# Create directory layout for binary distribution.
+
+distribution: strip
+ mkdir -p ${DESTDIR}${SHAREDIR}/dfuibe_lua
+ ${INSTALL_DATA} *.lua ${DESTDIR}${SHAREDIR}/dfuibe_lua/
+ for _subdir in lib conf pit install configure upgrade netboot; do \
+ mkdir -p ${DESTDIR}${SHAREDIR}/dfuibe_lua/$${_subdir}; \
+ ${INSTALL_DATA} $${_subdir}/*.lua ${DESTDIR}${SHAREDIR}/dfuibe_lua/$${_subdir}; \
+ done
+
+distribution_nls: nls
+ for _language in ${LANGUAGES}; do \
+ mkdir -p ${DESTDIR}${SHAREDIR}/locale/$${_language}/LC_MESSAGES; \
+ ${INSTALL_DATA} po/$${_language}.mo \
+ ${DESTDIR}${LOCALEDIR}/$${_language}/LC_MESSAGES/${PROG}.mo; \
+ done
Index: contrib/bsdinstaller/src/backend/lua/Makefile.orig
===================================================================
RCS file: contrib/bsdinstaller/src/backend/lua/Makefile.orig
diff -N contrib/bsdinstaller/src/backend/lua/Makefile.orig
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/src/backend/lua/Makefile.orig 29 Jul 2006 18:02:50 -0000
@@ -0,0 +1,61 @@
+# Makefile for dfuibe_lua.
+# $Id: Makefile,v 1.56 2006/07/29 18:02:50 cpressey Exp $
+
+BASE?=../..
+include ${BASE}/Config
+
+PACKAGE= dfuibe_lua
+
+LUA?= ../../platform/lua
+COMPAT?= ../../lib/lua/compat-5.1
+
+MEDIAROOT?= /usr/release/root
+OSNAME?= DragonFly
+
+LANGUAGES= ru
+
+all:
+ @echo "Nothing to build."
+
+clean:
+ rm -rf po/*.mo *.core
+
+strip: all
+ @echo "Nothing to strip."
+
+nls: all mo
+
+pot:
+ cat `find . -name '*.lua' ! -regex '\./scripts/test/main.lua'` | \
+ sed 's|\-\-|//|' | sed 's/\.\.//' | \
+ xgettext -s -C --no-location --keyword=_ -o po/${PACKAGE}.pot -
+
+mo:
+ for _language in ${LANGUAGES}; do \
+ msgfmt -o po/$${_language}.mo po/$${_language}; \
+ done
+
+test:
+ su root -c "env LD_LIBRARY_PATH='../../lib/libaura:../../lib/libdfui:$(LUA)/lib' \
+ 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 \
+ dir.root=${MEDIAROOT} booted_from_install_media=true"
+
+# Create directory layout for binary distribution.
+
+distribution: strip
+ mkdir -p ${DESTDIR}/share/dfuibe_lua
+ cp *.lua ${DESTDIR}/share/dfuibe_lua/
+ for _subdir in lib conf pit install configure upgrade netboot; do \
+ mkdir -p ${DESTDIR}/share/dfuibe_lua/$${_subdir}; \
+ cp $${_subdir}/*.lua ${DESTDIR}/share/dfuibe_lua/$${_subdir}; \
+ done
+
+distribution_nls: nls
+ for _language in ${LANGUAGES}; do \
+ mkdir -p ${DESTDIR}/share/locale/$${_language}/LC_MESSAGES; \
+ cp po/$${_language}.mo \
+ ${LOCALEDIR}/$${_language}/LC_MESSAGES/${PROG}.mo; \
+ done
Index: contrib/bsdinstaller/src/backend/lua/main.lua
===================================================================
RCS file: contrib/bsdinstaller/src/backend/lua/main.lua
diff -N contrib/bsdinstaller/src/backend/lua/main.lua
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/src/backend/lua/main.lua 13 Sep 2006 23:43:25 -0000
@@ -0,0 +1,256 @@
+-- $Id: main.lua,v 1.76 2006/09/13 23:43:25 cpressey Exp $
+-- Main program/menu for BSD Installer Lua backend.
+
+--
+-- Copyright (c)2005, 2006 Chris Pressey. All rights reserved.
+--
+-- Redistribution and use in source and binary forms, with or without
+-- modification, are permitted provided that the following conditions
+-- are met:
+--
+-- 1. Redistributions of source code must retain the above copyright
+-- notices, this list of conditions and the following disclaimer.
+-- 2. Redistributions in binary form must reproduce the above copyright
+-- notices, this list of conditions, and the following disclaimer in
+-- the documentation and/or other materials provided with the
+-- distribution.
+-- 3. Neither the names of the copyright holders nor the names of their
+-- contributors may be used to endorse or promote products derived
+-- from this software without specific prior written permission.
+--
+-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+-- ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES INCLUDING, BUT NOT
+-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+-- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+-- COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+-- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+-- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+-- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+-- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+-- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+-- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+-- POSSIBILITY OF SUCH DAMAGE.
+--
+
+--
+-- Before anything else, make a local copy of the command line.
+-- Otherwise it will get trashed by require().
+--
+local arg = arg
+
+--
+-- Load the application framework.
+--
+App = require("app")
+
+--
+-- Check if gettext functionality is available to us.
+-- If so, load it, but if not, stub it out.
+--
+if pcall(function() require("gettext") end) then
+ GetText = require("gettext")
+ GetText.set_package("dfuibe_lua")
+ -- XXX use App.conf.dir.root here:
+ GetText.set_locale_dir("/usr/local/share/locale")
+ GetText.init()
+else
+ GetText = nil
+ _ = string.format
+end
+
+--
+-- Start the application.
+--
+App.start(arg)
+
+App.load_conf_files()
+
+--
+-- Load modules and make them available globally (to all scriptlets.)
+--
+FileName = require("filename")
+Pty = require("pty")
+Socket = require("socket")
+
+--[[
+App.require("Cmd")
+App.require("CmdLeaf")
+App.require("CmdSeq")
+-- Set up the default observer for Cmds.
+local ProgBarCmdObserver = require("ProgBarCmdObserver")
+Cmd.generate_default_observer = function() return ProgBarCmdObserver.new() end
+]]--
+
+local StorageSystemUI = App.require("StorageSystemUI", "local")
+local DiskUI = App.require("DiskUI", "local")
+local PartitionUI = App.require("PartitionUI", "local")
+local InstallationUI = App.require("InstallationUI", "local")
+local Network = App.require("Network", "local")
+local PackageSet = App.require("PackageSet", "local")
+local ConfigFile = App.require("ConfigFile", "local")
+local NavContainer = App.require("NavContainer", "local")
+
+App.require("Flow")
+App.require("Menu")
+
+--
+-- Set the product name to the OS name, if not given.
+--
+App.conf.product.name =
+ App.conf.product.name or App.conf.os.name
+App.conf.product.version =
+ App.conf.product.version or App.conf.os.version
+
+App.open_log()
+
+App.start_ui(App.UIBridge.new(require("dfui"), {
+ transport = App.conf.dfui_transport or "tcp",
+ rendezvous = App.conf.dfui_rendezvous or "9999",
+ log = App.log
+ }))
+
+-----------------------------------------------------------------------------
+--
+-- Set up the initial App.state, which is global, and shared by everything.
+--
+-- App.state. | Type | Description
+-- -----------+----------------+---------------------------------------------
+-- storage | StorageSystemUI| Represents the storage potentials (disks,
+-- | | &c) of the entire running computer system.
+-- sel_disk | DiskUI | The disk under examination (to install onto
+-- | | or to configure)
+-- sel_part | PartitionUI | The partition under examination (to install
+-- | | onto, or to configure)
+-- source | InstallationUI | The currently running system; this is where
+-- | | stuff will be installed *from*.
+-- target | InstallationUI | The system (as in, set of disks) which will
+-- | | be installed onto, or which is being cfg'd
+-- net_if | Network. | Represents the available network interfaces
+-- | Interfaces | of the entire running computer system.
+-- all_pkgs | PackageSet | The set of all packages that the user
+-- | | has access to for installing.
+-- sel_pkgs | PackageSet | The set of packages that the user has
+-- | | selected to be installed onto the system.
+-- rc_conf | ConfigFile | Settings that will be written to rc.conf
+-- | | when the install or configure is finished.
+-- resolv_conf| ConfigFile | Similar to rc_conf, but for DNS settings.
+-- extra_fs | table | A list of extra filesystem descriptions,
+-- | | to be written to the new /etc/fstab.
+-- do_exit | boolean | If set, exit after returning to main menu.
+-- do_reboot | boolean | If set, start the reboot sequence after
+-- | | returning to the main menu.
+-- lang_id | string | Identifier of the language the user has
+-- | | selected to work in, or nil for default.
+-- vidfont | string | \
+-- scrnmap | string | - Console settings.
+-- keymap | string | /
+--
+-----------------------------------------------------------------------------
+
+-- Create a representation of the storage devices and probe them.
+StorageSystemUI.set_ui(App.ui)
+DiskUI.set_ui(App.ui)
+PartitionUI.set_ui(App.ui)
+App.state.storage = StorageSystemUI.new()
+App.state.storage:survey()
+
+-- Point to the source system.
+InstallationUI.set_ui(App.ui)
+App.state.source = InstallationUI.new()
+App.state.source:use_current()
+
+-- Create a representation of the network interfaces and probe them.
+App.state.net_if = Network.Interfaces.new()
+App.state.net_if:probe()
+
+-- Enumerate available packages from the install media.
+App.state.all_pkgs = PackageSet.new()
+App.state.all_pkgs:enumerate_present_on(App.state.source)
+
+-- Set up the initial configuration variables
+App.state.rc_conf = ConfigFile.new()
+App.state.resolv_conf = ConfigFile.new()
+
+--
+-- Create an environment containing common BSD Installer modules and
+-- set it as the default environment in which to execute scriptlets.
+--
+NavContainer.set_scriptlet_env{
+ App = App,
+ Bitwise = require("Bitwise"),
+ CmdChain = require("CmdChain"),
+ ConfigFile = require("ConfigFile"),
+ Capacity = require("Capacity"),
+ StorageSystemUI = require("StorageSystemUI"),
+ DiskUI = require("DiskUI"),
+ PartitionUI = require("PartitionUI"),
+ Subpartition = require("Subpartition"),
+ Package = require("Package"),
+ PackageGraph = require("PackageGraph"),
+ PackageSet = require("PackageSet"),
+ PackageUI = require("PackageUI"),
+ InstallationUI = require("InstallationUI"),
+ Network = require("Network"),
+ NetworkUI = require("NetworkUI"),
+ Menu = require("Menu"),
+ Flow = require("Flow"),
+ GetText = GetText,
+ _ = _,
+ print = print,
+ pairs = pairs,
+ ipairs = ipairs,
+ table = table,
+ string = string
+}
+
+--
+-- Begin running stuff.
+--
+
+--
+-- First let the user configure the important user-interface aspects
+-- of their system (language, keyboard/screenmap if on console,
+-- internet connection for logging to remote machine over net, etc.)
+--
+-- These are termed "pre-install tasks" even though that is a slight
+-- misnomer (and an unfortunate acronym):
+--
+App.descend("pit")
+
+if not App.state.do_reboot and not App.state.do_exit then
+ --
+ -- Show the Main Menu.
+ --
+ Menu.new{
+ id = "main",
+ name = _("Select Task"),
+ short_desc = _("Choose one of the following tasks to perform."),
+ continue_constraint = function(result)
+ if App.state.do_reboot or App.state.do_exit then
+ return Menu.DONE
+ else
+ return result
+ end
+ end
+ }:populate("."):loop()
+end
+
+--
+-- If there is a target system mounted, unmount it before leaving.
+--
+if App.state.target ~= nil and App.state.target:is_mounted() then
+ if not App.state.target:unmount() then
+ App.ui:inform(
+ _("Warning: subpartitions were not correctly unmounted.")
+ )
+ end
+end
+
+App.stop()
+
+if App.state.do_reboot then
+ -- exit with reboot code
+ os.exit(5)
+else
+ os.exit(0)
+end
Index: contrib/bsdinstaller/src/backend/lua/conf/BSDInstaller.lua
===================================================================
RCS file: contrib/bsdinstaller/src/backend/lua/conf/BSDInstaller.lua
diff -N contrib/bsdinstaller/src/backend/lua/conf/BSDInstaller.lua
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ contrib/bsdinstaller/src/backend/lua/conf/BSDInstaller.lua 4 Sep 2006 18:01:33 -0000
@@ -0,0 +1,697 @@
+--
+-- conf/BSDInstaller.lua
+-- $Id: BSDInstaller.lua,v 1.20 2006/09/04 18:01:33 cpressey Exp $
+--
+-- The monolithic default configuration file for the BSD Installer.
+--
+-- Many of the defaults in here are appropriate to DragonFly BSD,
+-- but only because that platform is where the installer is
+-- developed, and there is no other "default" for many of these
+-- things (except perhaps 4.4BSD-LITE.)
+--
+-- This file can (and should) be partially overridden by further,
+-- operating system- and product-specific configuration files.
+--
+-- Settings can also be set or overridden from the command line like so:
+-- fake_execution=true dir.root=/usr/release/root
+--
+
+-------------------------------------------------------------------
+-- Application Settings
+-------------------------------------------------------------------
+
+--
+-- app_name: name of the application.
+--
+
+app_name = "BSD Installer"
+
+--
+-- log_filename: the file to which logs will be recorded.
+-- This exists under dir.tmp.
+--
+
+log_filename = "installer.log"
+
+--
+-- dir: a table of important directories.
+--
+-- dir.root is where all commands are assumed to be located, and where
+-- all system files are copied from.
+--
+-- dir.tmp is the temporary directory.
+--
+
+dir = {
+ root = "/",
+ tmp = "/tmp/"
+}
+
+
+-------------------------------------------------------------------
+-- Installation Parameters
+-------------------------------------------------------------------
+
+--
+-- os: table which describes the operating system.
+-- Required, but no default value is given, so it is necessary
+-- that some other configuration file override these entries.
+
+os = {
+ name = nil,
+ version = nil
+}
+
+
+--
+-- product: table which describes the product which is being installed;
+-- if not given, the product is assumed to be the operating system.
+--
+
+product = {
+ name = nil,
+ version = nil
+}
+
+
+--
+-- Name of the install media in use. Usually "LiveCD", but could be
+-- "CompactFlash card", "install disk", etc.
+--
+media_name = "LiveCD"
+
+
+--
+-- install_items: description of the set of items that are to be
+-- installed. Each item represents a file or directory to copy,
+-- and can be specified with either:
+-- o a string, in which case the source has the same name as the dest, or
+-- o a table, with "src" and "dest" keys, so that the names may differ.
+-- (A table is particularly useful with /etc, which may have configuration
+-- files which produce significantly different behaviour on the install
+-- medium, compared to a standard HDD boot.)
+--
+-- Either way, no leading root directory is specified in names of files
+-- and directories.
+--
+-- Note that specifying (for example) "usr/local" will only copy all of
+-- /usr/local *if* nothing below /usr/local is specified. For instance,
+-- if you want copy all of /usr/local/ *except* for /usr/local/share,
+-- you need to specify all subdirs of /usr/local except for /usr/local/share
+-- in the table.
+--
+
+install_items = {
+ "COPYRIGHT",
+ "bin",
+ "boot",
+ "dev",
+ { src = "etc.hdd", dest = "etc" }, -- install media config differs
+ "lib",
+ "libexec",
+ "kernel",
+ "modules",
+ "root",
+ "sbin",
+ "sys", -- XXX What's the deal with this anyway?
+ "usr/bin",
+ "usr/games",
+ "usr/include",
+ "usr/lib",
+-- "usr/local", -- No need to copy these two, since we use mtree to
+-- "usr/X11R6", -- make them and pkg_add to populate them with files.
+ "usr/libdata",
+ "usr/libexec",
+ "usr/sbin",
+ "usr/share",
+ "usr/src",
+ "var"
+}
+
+
+--
+-- cleanup_items: list of files to remove from the HDD immediately following
+-- an installation. These may be files that are simply unwanted, or may
+-- impede the functioning of the system (because they came from the
+-- installation system, which may have a different configuration in place.)
+--
+-- On the DragonFlyBSD LiveCD, for example, /boot/loader.conf contains
+-- kernel_options="-C"
+-- i.e., boot from CD-ROM. This is clearly inapplicable to a HDD boot.
+--
+
+cleanup_items = {
+ "/boot/loader.conf"
+}
+
+
+--
+-- mtrees_post_copy: a table of directory trees to create, using 'mtree',
+-- after everything has been copied.
+--
+
+mtrees_post_copy = {
+ ["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.
+--
+
+upgrade_items = {
+ "COPYRIGHT",
+ "bin",
+ "boot/beastie.4th", -- unfortunately, we need to list
+ "boot/boot", -- everything in boot except for
+ "boot/boot0", -- the .conf files, so that we
+ "boot/boot1", -- don't end up overwriting them
+ "boot/boot2",
+ "boot/cdboot",
+ "boot/defaults",
+ "boot/frames.4th",
+ "boot/loader",
+ "boot/loader.4th",
+ "boot/loader.help",
+ "boot/loader.old",
+ "boot/loader.rc",
+ "boot/mbr",
+ "boot/pxeboot",
+ "boot/screen.4th",
+ "boot/support.4th",
+ "dev",
+ "libexec",
+ "lib",
+ "kernel",
+ "modules",
+ "sbin",
+ "sys",
+ "usr/bin",
+ "usr/games",
+ "usr/include",
+ "usr/lib",
+ "usr/libdata",
+ "usr/libexec",
+ "usr/sbin",
+ "usr/share"
+}
+
+
+--
+-- mountpoints: a function which takes two numbers (the capacity
+-- of the partition and the capacity of RAM, both in megabytes)
+-- and which returns a list of tables, each of which like:
+--
+-- {
+-- mountpoint = "/foo", -- name of mountpoint
+-- capstring = "123M" -- suggested capacity
+-- }
+--
+-- Note that the capstring can be "*" to indicate 'use the
+-- rest of the partition.')
+--
+-- Typically this function returns a different list of mountpoint
+-- descriptions based on the supported capacity of the device.
+--
+-- As a somewhat special case, this function may return {}
+-- (an empty list) to indicate that there simply is not enough
+-- space on the device to install anything at all.
+--
+
+mountpoints = function(part_megs, ram_megs)
+
+ --
+ -- First, calculate suggested swap size:
+ --
+ 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_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 avail_megs < 300 then
+ return {}
+ elseif avail_megs < 523 then
+ return {
+ { mountpoint = "/", capstring = "70M" },
+ { mountpoint = "swap", capstring = swap },
+ { mountpoint = "/var", capstring = "32M" },
+ { mountpoint = "/tmp", capstring = "32M" },
+ { mountpoint = "/usr", capstring = "174M" },
+ { mountpoint = "/home", capstring = "*" }
+ }
+ elseif avail_megs < 1024 then
+ return {
+ { mountpoint = "/", capstring = "96M" },
+ { mountpoint = "swap", capstring = swap },
+ { mountpoint = "/var", capstring = "64M" },
+ { mountpoint = "/tmp", capstring = "64M" },
+ { mountpoint = "/usr", capstring = "256M" },
+ { mountpoint = "/home", capstring = "*" }
+ }
+ elseif avail_megs < 4096 then
+ return {
+ { mountpoint = "/", capstring = "128M" },
+ { mountpoint = "swap", capstring = swap },
+ { mountpoint = "/var", capstring = "128M" },
+ { mountpoint = "/tmp", capstring = "128M" },
+ { mountpoint = "/usr", capstring = "512M" },
+ { mountpoint = "/home", capstring = "*" }
+ }
+ elseif avail_megs < 10240 then
+ return {
+ { mountpoint = "/", capstring = "256M" },
+ { mountpoint = "swap", capstring = swap },
+ { mountpoint = "/var", capstring = "256M" },
+ { mountpoint = "/tmp", capstring = "256M" },
+ { mountpoint = "/usr", capstring = "3G" },
+ { mountpoint = "/home", capstring = "*" }
+ }
+ else
+ return {
+ { mountpoint = "/", capstring = "256M" },
+ { mountpoint = "swap", capstring = swap },
+ { mountpoint = "/var", capstring = "256M" },
+ { mountpoint = "/tmp", capstring = "256M" },
+ { mountpoint = "/usr", capstring = "8G" },
+ { mountpoint = "/home", capstring = "*" }
+ }
+ end
+end
+
+
+--
+-- extra_filesystems:
+--
+
+extra_filesystems = {
+ {
+ desc = "Process filesystem",
+ dev = "proc",
+ mtpt = "/proc",
+ fstype = "procfs",
+ access = "rw",
+ selected = "N"
+ },
+ {
+ desc = "CD-ROM drive",
+ dev = "/dev/acd0c",
+ mtpt = "/cdrom",
+ fstype = "cd9660",
+ access = "ro,noauto",
+ selected = "N"
+ }
+}
+
+--
+-- limits: Limiting values specified by the installation; the most
+-- significant of these is the minimum disk space required to
+-- install the software.
+--
+
+limits = {
+ part_min = "300M", -- Minimum size of partition or disk.
+ subpart_min = {
+ ["/"] = "70M", -- Minimum size of each subpartition.
+ ["/var"] = "8M", -- If a subpartition has no particular
+ ["/usr"] = "174M" -- minimum, it can be omitted here.
+ },
+ waste_max = 8192 -- Maximum number of sectors to allow
+ -- to go to waste when carving out
+ -- partitions and subpartitions.
+}
+
+
+--
+-- deafult_packages: a list of packages to install without asking
+-- during the install phase.
+--
+-- Note that these packages are specified by Lua regular expressions
+-- that will be passed to string.find(). This allows us to specify
+-- packages regardless of their version number, etc.
+--
+
+default_packages = {
+ -- empty by default
+}
+
+
+--
+-- use_cpdup: a boolean which indicates whether the 'cpdup' utility
+-- will be used to copy files and directories to the target system.
+-- If false, 'tar' and 'cp' will be used instead.
+--
+
+use_cpdup = true
+
+
+-------------------------------------------------------------------
+-- User Interface
+-------------------------------------------------------------------
+
+--
+-- ui_nav_control: a configuration table which allows individual
+-- user-interface navigation elements to be configured in broad
+-- fashion, globally.
+--
+-- Extra Flow.Steps and Menu.Items can always be added by adding Lua
+-- scriptlets to their container directories; however, it is more awkward to
+-- delete existing Steps and Items which may be inapplicable in a particular
+-- distribution. So, this file can be used to globally ignore (or otherwise
+-- alter the meaning of) individual Steps and Items.
+--
+-- This configuration file should return a table. Each key in this table
+-- should be a regular expression which will match the id of the Step or
+-- Item; the associated value is a control code which indicates what do
+-- with all Steps and Items so matched.
+--
+-- The only supported control code, at present, is "ignore", indicating
+-- that the Step or Item should be skipped; this is, not be executed as
+-- part of the Flow, or not be displayed as part of the menu.
+--
+-- NOTE! Ignoring Flow.Steps properly is more problematic than ignoring
+-- Menu.Items, because Steps often rely on a change of state caused by a
+-- previous Step. Configure this table (and write your own Steps) with
+-- that fact in mind.
+--
+
+ui_nav_control = {
+ ["*/install/select_packages"] = "ignore", -- do not do the "Select
+ -- Packages" step on install
+
+-- -- examples follow:
+-- ["*/install/format_disk"] = "ignore", -- do not do the "Format
+-- -- Disk" step on install
+-- ["*/welcome"] = "ignore", -- no "welcome" items at all
+
+-- ["*/install/partition_disk"] = "ignore", -- Don't show the Partition
+-- ["*/install/select_part"] = "ignore", -- Editor or selection.
+-- -- Used in combination with
+-- -- "Format Disk" step in
+-- -- embedded apps, etc.
+}
+
+
+-------------------------------------------------------------------
+-- System Settings
+-------------------------------------------------------------------
+
+--
+-- cmd_names: names and locations of system commands used by the installer.
+--
+-- Note that some non-command files and directories are configurable
+-- here too.
+--
+-- The main table lists commands apropos for for DragonFly BSD.
+-- Conditional overrides for other BSD's are listed below it.
+--
+
+cmd_names = {
+ SH = "bin/sh",
+ MKDIR = "bin/mkdir",
+ CHMOD = "bin/chmod",
+ LN = "bin/ln",
+ RM = "bin/rm",
+ CP = "bin/cp",
+ DATE = "bin/date",
+ ECHO = "bin/echo",
+ DD = "bin/dd",
+ MV = "bin/mv",
+ CAT = "bin/cat",
+ TEST = "bin/test",
+ TEST_DEV = "bin/test -c",
+ CPDUP = "bin/cpdup -vvv -I",
+
+ ATACONTROL = "sbin/atacontrol",
+ MOUNT = "sbin/mount",
+ MOUNT_MFS = "sbin/mount_mfs",
+ UMOUNT = "sbin/umount",
+ SWAPON = "sbin/swapon",
+ DISKLABEL = "sbin/disklabel",
+ MBRLABEL = "sbin/mbrlabel",
+ NEWFS = "sbin/newfs",
+ NEWFS_MSDOS = "sbin/newfs_msdos",
+ FDISK = "sbin/fdisk",
+ DUMPON = "sbin/dumpon",
+ IFCONFIG = "sbin/ifconfig",
+ ROUTE = "sbin/route",
+ DHCLIENT = "sbin/dhclient",
+ SYSCTL = "sbin/sysctl",
+ MOUNTD = "sbin/mountd",
+ NFSD = "sbin/nfsd",
+ KLDLOAD = "sbin/kldload",
+ KLDUNLOAD = "sbin/kldunload",
+ KLDSTAT = "sbin/kldstat",
+ TUNEFS = "sbin/tunefs",
+
+ TOUCH = "usr/bin/touch",
+ YES = "usr/bin/yes",
+ BUNZIP2 = "usr/bin/bunzip2",
+ GREP = "usr/bin/grep",
+ KILLALL = "usr/bin/killall",
+ BASENAME = "usr/bin/basename",
+ SORT = "usr/bin/sort",
+ COMM = "usr/bin/comm",
+ AWK = "usr/bin/awk",
+ SED = "usr/bin/sed",
+ BC = "usr/bin/bc",
+ TR = "usr/bin/tr",
+ FIND = "usr/bin/find",
+ CHFLAGS = "usr/bin/chflags",
+ XARGS = "usr/bin/xargs",
+ MAKE = "usr/bin/make",
+ TAR = "usr/bin/tar",
+
+ PWD_MKDB = "usr/sbin/pwd_mkdb",
+ CHROOT = "usr/sbin/chroot",
+ VIDCONTROL = "usr/sbin/vidcontrol",
+ KBDCONTROL = "usr/sbin/kbdcontrol",
+ PW = "usr/sbin/pw",
+ SWAPINFO = "usr/sbin/pstat -s",
+ BOOT0CFG = "usr/sbin/boot0cfg",
+ FDFORMAT = "usr/sbin/fdformat",
+ MTREE = "usr/sbin/mtree",
+ INETD = "usr/sbin/inetd",
+ DHCPD = "usr/sbin/dhcpd",
+ RPCBIND = "usr/sbin/portmap",
+
+ PKG_ADD = "usr/sbin/pkg_add",
+ PKG_DELETE = "usr/sbin/pkg_delete",
+ PKG_CREATE = "usr/sbin/pkg_create",
+ PKG_INFO = "usr/sbin/pkg_info",
+
+ TFTPD = "usr/libexec/tftpd",
+
+ CVSUP = "usr/local/bin/cvsup",
+
+ -- These aren't commands, but they're configurable here nonetheless.
+
+ DMESG_BOOT = "var/run/dmesg.boot",
+ MODULES_DIR = "modules",
+ SYSCTL_DISKS = "kern.disks"
+}
+
+--
+-- package_suffix: The filename suffix for package files,
+-- apropos to the current operating system and/or package
+-- system in use.
+-- XXX This should be organized better in the future.
+--
+
+package_suffix = "tgz"
+
+--
+-- enable_crashdumps: Whether crashdumps (to a suitable swap partition)
+-- will be enabled upon installation, or not.
+--
+
+enable_crashdumps = true
+
+--
+-- mount_info_regexp: A Lua regular expression which describes
+-- what the output of the 'mount' command looks like, so that
+-- it can be parsed to extract mountpoint and filesystem info.
+--
+
+mount_info_regexp = "^([^%s]+)%s+on%s+([^%s]+)%s+%(([^%s]+)"
+
+
+-------------------------------------------------------------------
+-- Static Storage Parameters
+-------------------------------------------------------------------
+
+--
+-- sysids: Partition identifiers that can be used in the partition
+-- editor, and their names. The order they are listed here are the
+-- order they will appear in the partition editor.
+--
+sysids = {
+ { "DragonFly/FreeBSD", 165 },
+ { "OpenBSD", 166 },
+ { "NetBSD", 169 },
+ { "MS-DOS", 15 },
+ { "Linux", 131 },
+ { "Plan9", 57 }
+}
+
+--
+-- default_sysid: the partition identifier to use by default.
+--
+
+default_sysid = 165
+
+--
+-- has_raw_devices: true if the platform has "raw" devices whose
+-- names begin with "r".
+--
+
+has_raw_devices = false
+
+--
+-- disklabel_on_disk: true if there is only one disklabel per
+-- disk (OpenBSD and NetBSD), false if there is more than one, i.e.
+-- one disklabel per BIOS partition (FreeBSD and DragonFly BSD.)
+--
+-- disklabel_on_disk also implies there are no device nodes for
+-- BIOS partitions.
+--
+
+disklabel_on_disk = false
+
+--
+-- num_subpartitions: number of subpartitions supported per disklabel.
+--
+
+num_subpartitions = 16
+
+--
+-- offlimits_devices: devices which the installer should not
+-- consider installing onto.
+-- These are actually Lua regexps.
+--
+
+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.
+--
+
+has_softupdates = true
+
+--
+-- window_subpartitions: a list of which sub