Skip to content

Commit

Permalink
Merge 269ef37 into 0cde89b
Browse files Browse the repository at this point in the history
  • Loading branch information
dgdavid committed Aug 23, 2018
2 parents 0cde89b + 269ef37 commit a008f14
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
6 changes: 6 additions & 0 deletions package/yast2-ftp-server.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Aug 22 16:01:22 UTC 2018 - dgonzalez@suse.com

- Update calls to YaST2 systemd classes (related to fate#319428)
- 4.1.4

-------------------------------------------------------------------
Mon Aug 20 15:20:10 CEST 2018 - schubi@suse.de

Expand Down
10 changes: 5 additions & 5 deletions package/yast2-ftp-server.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@


Name: yast2-ftp-server
Version: 4.1.3
Version: 4.1.4
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: %{name}-%{version}.tar.bz2

# CWM::ServiceWidget
Requires: yast2 >= 4.1.0
# Yast2::Systemd::Service
Requires: yast2 >= 4.1.1
BuildRequires: update-desktop-files
# CWM::ServiceWidget
BuildRequires: yast2 >= 4.1.0
# Yast2::Systemd::Service
BuildRequires: yast2 >= 4.1.1
BuildRequires: yast2-devtools >= 3.1.10
BuildRequires: rubygem(%rb_default_ruby_abi:rspec)
BuildRequires: rubygem(%rb_default_ruby_abi:yast-rake)
Expand Down
11 changes: 6 additions & 5 deletions src/include/ftp-server/write_load.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
#
# Representation of the configuration of FtpServer.
# Input and output routines.
require "yast2/systemd/service"
require "yast2/systemd/socket"

module Yast
module FtpServerWriteLoadInclude
def initialize_ftp_server_write_load(_include_target)
Expand All @@ -17,19 +20,17 @@ def initialize_ftp_server_write_load(_include_target)
Yast.import "Popup"
Yast.import "Progress"
Yast.import "Service"
Yast.import "SystemdService"
Yast.import "SystemdSocket"
end

def start_via_socket?
socket = SystemdSocket.find("vsftpd")
socket = Yast2::Systemd::Socket.find("vsftpd")
return false unless socket

socket.enabled?
end

def WriteStartViaSocket(start)
socket = SystemdSocket.find("vsftpd")
socket = Yast2::Systemd::Socket.find("vsftpd")
return false unless socket

if start
Expand All @@ -41,7 +42,7 @@ def WriteStartViaSocket(start)
end
# stop service so socket can start new one with newly written configuration
# or stop it completelly
SystemdService.find!("vsftpd").stop
Yast2::Systemd::Service.find!("vsftpd").stop

true
end
Expand Down

0 comments on commit a008f14

Please sign in to comment.