Install a moduli(5) manual page.
[dragonfly.git] / contrib / bsdinstaller-1.1.6 / src / backend / lua / upgrade / 200_select_disk.lua
1 -- $Id: 200_select_disk.lua,v 1.1 2005/03/27 23:19:29 cpressey Exp $
2
3 return {
4     name = "select_disk",
5     title = "Select Disk",
6     action = function(fsm)
7         App.state.sel_disk = nil
8         App.state.sel_part = nil
9
10         -- XXX there might be a better place to handle this.
11         if App.state.storage:get_disk_count() == 0 then
12                 App.ui:inform(_(
13                     "The installer could not find any suitable disks "  ..
14                     "attached to this computer.  If you wish to "       ..
15                     "upgrade an installation located "                  ..
16                     "on an unorthodox storage device, you will have to " ..
17                     "exit to a LiveCD command prompt and configure it " ..
18                     "manually, using the file /README as a guide.",
19                     App.os.name)
20                 )
21                 return nil
22         end
23
24         local dd = StorageUI.select_disk({
25             sd = App.state.storage,
26             short_desc = _(
27                 "Select the disk on which the installation " ..
28                 "that you wish to upgrade resides.",
29                 App.os.name),
30             cancel_desc = _("Return to Main") -- _("Return to %s", fsm:prev().title)
31         })
32
33         if dd then
34                 App.state.sel_disk = dd
35                 return fsm:next()
36         else
37                 return nil -- fsm:prev()
38         end
39     end
40 }