Skip to content

Commit

Permalink
Merge pull request #194 from yast/review_160211_autoyast_confirm_lice…
Browse files Browse the repository at this point in the history
…nces

[Review] Request from 'schubi2' @ 'yast/yast-autoinstallation/review_160211_autoyast_confirm_licences'
  • Loading branch information
schubi2 committed Feb 12, 2016
2 parents 19ab829 + 803d470 commit 6a50aa3
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 3 deletions.
11 changes: 11 additions & 0 deletions package/autoyast2.changes
@@ -1,3 +1,14 @@
-------------------------------------------------------------------
Thu Feb 11 15:30:55 CET 2016 - schubi@suse.de

- Confirming base product license. This can be defined by the flag
<confirm_base_product_license> in the general/mode section.
Confirming licenses of add-on products can be defined for each
product by the flag <confirm_license> in the add-on product
description.
(Fate#318945)
- 3.1.114

-------------------------------------------------------------------
Fri Jan 29 09:04:47 UTC 2016 - igonzalezsosa@suse.com

Expand Down
2 changes: 1 addition & 1 deletion package/autoyast2.spec
Expand Up @@ -18,7 +18,7 @@

Name: autoyast2

Version: 3.1.113
Version: 3.1.114
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand Down
28 changes: 26 additions & 2 deletions src/clients/inst_autosetup.rb
Expand Up @@ -40,12 +40,14 @@ def main
Yast.import "Keyboard"
Yast.import "Call"
Yast.import "ProductControl"
Yast.import "ProductLicense"
Yast.import "LanUdevAuto"
Yast.import "Language"
Yast.import "Console"
Yast.import "ServicesManager"
Yast.import "Y2ModuleConfig"
Yast.import "AutoinstFunctions"
Yast.import "Wizard"

Yast.include self, "bootloader/routines/autoinstall.rb"
Yast.include self, "autoinstall/ask.rb"
Expand All @@ -62,7 +64,8 @@ def main
_("Registration"),
_("Configure Software selections"),
_("Configure Systemd Default Target"),
_("Configure users and groups")
_("Configure users and groups"),
_("Confirm License")
]

@progress_descriptions = [
Expand All @@ -74,7 +77,8 @@ def main
_("Registering the system..."),
_("Configuring Software selections..."),
_("Configuring Systemd Default Target..."),
_("Importing users and groups configuration...")
_("Importing users and groups configuration..."),
_("Confirming License...")
]

Progress.New(
Expand Down Expand Up @@ -397,6 +401,26 @@ def main
Progress.NextStage
autosetup_users

#
# Checking Base Product licenses
#
Progress.NextStage
if general_section["mode"].fetch( "confirm_base_product_license", false )
Wizard.EnableAbortButton
result = ProductLicense.AskLicenseAgreement(nil,
"",
ProductLicense.license_patterns,
"abort",
# back button is disabled
false,
true,
true,
# unique id
"0"
)
return :abort if result == :abort
end

Progress.Finish

@ret = ProductControl.RunFrom(
Expand Down

0 comments on commit 6a50aa3

Please sign in to comment.