Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid module to crash when dhcp service is not present #34

Merged
merged 3 commits into from
Aug 23, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions package/yast2-dhcp-server.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu Aug 23 09:38:55 UTC 2018 - dgonzalez@suse.com

- Avoid module to crash if service is not installed
(related to fate#319428).
- 4.1.1

-------------------------------------------------------------------
Mon Aug 20 13:47:16 CEST 2018 - schubi@suse.de

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-dhcp-server.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


Name: yast2-dhcp-server
Version: 4.1.0
Version: 4.1.1
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand Down
5 changes: 2 additions & 3 deletions src/include/dhcp-server/dialogs2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def initialize_dhcp_server_dialogs2(include_target)
"inst_summary" => {
"contents" => VBox(
VSpacing(1),
"auto_start_up",
"service_widget",
VSpacing(1),
"config_summary",
VSpacing(1),
Expand All @@ -181,7 +181,7 @@ def initialize_dhcp_server_dialogs2(include_target)
# dialog caption
"wizard" => _("Start-Up"),
"widget_names" => [
"auto_start_up",
"service_widget",
"config_summary",
"all_settings_button"
]
Expand All @@ -192,7 +192,6 @@ def initialize_dhcp_server_dialogs2(include_target)
Builtins.union(
@widgets,
{
"auto_start_up" => service_widget.cwm_definition,
"use_ldap" => CWMServiceStart.CreateLdapWidget(
{
"get_use_ldap" => fun_ref(
Expand Down
9 changes: 0 additions & 9 deletions src/modules/DhcpServerUI.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ def main
Yast.import "Mode"
Yast.import "Popup"
Yast.import "Report"
Yast.import "Service"
Yast.import "SuSEFirewall"
Yast.import "SystemdService"

@current_entry_type = ""
@current_entry_id = ""
Expand Down Expand Up @@ -82,13 +80,6 @@ def DhcpServerUI
nil
end

# Object representing the DHCP service for its usage in the UI code
#
# @return [Yast::SystemdServiceClass::Service]
def service
@service ||= SystemdService.find(DhcpServer.ServiceName())
end

publish :variable => :current_entry_type, :type => "string"
publish :variable => :current_entry_id, :type => "string"
publish :variable => :current_entry_options, :type => "list <map <string, string>>"
Expand Down