Class: Yast::InstFeaturesClient

Inherits:
Client
  • Object
show all
Defined in:
src/lib/installation/clients/inst_features.rb

Instance Method Summary collapse

Instance Method Details

#mainObject



29
30
31
32
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# File 'src/lib/installation/clients/inst_features.rb', line 29

def main
  textdomain "installation"

  Yast.import "ProductControl"
  Yast.import "ProductFeatures"
  Yast.import "Timezone"
  Yast.import "Keyboard"
  Yast.import "Language"
  Yast.import "Installation"
  Yast.import "Console"

  # Timezone
  if ProductFeatures.GetStringFeature("globals", "timezone") != ""
    Timezone.Set(
      ProductFeatures.GetStringFeature("globals", "timezone"),
      true
    )
  end

  # Keyboard
  if ProductFeatures.GetStringFeature("globals", "keyboard") != ""
    Keyboard.default_kbd = ProductFeatures.GetStringFeature(
      "globals",
      "keyboard"
    )
    Keyboard.SetConsole(Keyboard.default_kbd)
  end

  if ProductFeatures.GetStringFeature("globals", "language") != ""
    @language = ProductFeatures.GetStringFeature("globals", "language")
    # Set it in the Language module.
    Language.Set(@language)

    # Set Console font
    Console.SelectFont(@language)

    # Set it in YaST2
    Language.WfmSetLanguage
  end

  # Bugzilla #327791
  # Online Repositories - default status

  # Feature is not defined
  if ProductFeatures.GetFeature("software", "online_repos_preselected") == ""
    # Default is true - selected
    Installation.productsources_selected = true
    # Defined
  else
    @default_status_or = ProductFeatures.GetBooleanFeature(
      "software",
      "online_repos_preselected"
    )

    # if not set, default is "true"
    @default_status_or = true if @default_status_or.nil?
    Installation.productsources_selected = @default_status_or
  end

  Builtins.y2milestone(
    "Use Online Repositories (default): %1",
    Installation.productsources_selected
  )

  :auto
end