Install a moduli(5) manual page.
[dragonfly.git] / contrib / bsdinstaller-1.1.6 / src / backend / lua / upgrade / 400_mount_target_system.lua
1 -- $Id: 400_mount_target_system.lua,v 1.1 2005/03/27 23:19:29 cpressey Exp $
2
3 return {
4     name = "mount_target_system",
5     title = "Mount Target System",
6     action = function(fsm)
7         --
8         -- If there is a target system mounted, unmount it before starting.
9         --
10         if App.state.target ~= nil and App.state.target:is_mounted() then
11                 if not App.state.target:unmount() then
12                         App.ui:inform(
13                             _("Warning: already-mounted target system could " ..
14                               "not be correctly unmounted first.")
15                         )
16                         return fsm:prev()
17                 end
18         end
19
20         App.state.target = TargetSystem.new(App.state.sel_part, "mnt")
21         if not App.state.target:probe() then
22                 App.ui:inform(_(
23                     "The target system could not be successfully probed."
24                 ))
25                 return fsm:prev()
26         end
27         if not App.state.target:mount() then
28                 App.ui:inform(_(
29                     "The target system could not be successfully mounted."
30                 ))
31                 return fsm:prev()
32         end
33
34         return fsm:next()
35     end
36 }