Class: Installation::PreUmountFinish

Inherits:
FinishClient
  • Object
show all
Includes:
Yast::I18n
Defined in:
src/lib/installation/clients/pre_umount_finish.rb

Instance Method Summary collapse

Constructor Details

#initializePreUmountFinish

Returns a new instance of PreUmountFinish.



14
15
16
17
18
19
20
21
22
23
# File 'src/lib/installation/clients/pre_umount_finish.rb', line 14

def initialize
  super
  textdomain "installation"
  Yast.import "UI"
  Yast.import "Misc"
  Yast.import "Installation"
  Yast.import "String"
  Yast.import "Pkg"
  Yast.import "Mode"
end

Instance Method Details

#modesObject



29
30
31
# File 'src/lib/installation/clients/pre_umount_finish.rb', line 29

def modes
  [:installation, :live_installation, :update, :autoinst]
end

#titleObject



25
26
27
# File 'src/lib/installation/clients/pre_umount_finish.rb', line 25

def title
  _("Checking the installed system...")
end

#writeObject



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# File 'src/lib/installation/clients/pre_umount_finish.rb', line 33

def write
  Yast.include self, "installation/inst_inc_first.rb"

  # bugzilla #326478
  # some processes might be still running...
  cmd_run = WFM.Execute(path(".local.bash_output"),
    "/usr/bin/fuser -v '#{String.Quote(Installation.destdir)}' 2>&1")

  log.info("These processes are still running at " \
           "#{Installation.destdir} -> #{cmd_run}")

  unless Misc.boot_msg.empty?
    # just a beep
    SCR.Execute(path(".target.bash"), "/usr/bin/echo -e 'a'")
  end

  # creates or removes the runme_at_boot file (for second stage)
  # according to the current needs
  #
  # Must be called before 'umount'!
  #
  # See FATE #303396
  HandleSecondStageRequired()

  # Release all sources, they might be still mounted
  Pkg.SourceReleaseAll

  # save all sources and finish target
  # bnc #398315
  Pkg.SourceSaveAll
  # release the sources and unload the pool so the libzypp cache can be closed
  # and /mnt/var/cache/zypp unmounted
  Pkg.SourceFinishAll
  Pkg.TargetFinish

  # BNC #692799: Preserve the randomness state before umounting
  preserve_randomness_state
end