Skip to content

Commit

Permalink
Use the proper service name for nfs-server
Browse files Browse the repository at this point in the history
Instead its alias (nfsserver), which has been removed in
`nfs-utils-2.3.3`.

Related to bsc#1116779
  • Loading branch information
dgdavid committed Nov 21, 2018
1 parent 864d0b6 commit c4e8565
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/modules/Instserver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

module Yast
class InstserverClass < Module
NFS_SERVER_SEVICE = "nfs-server".freeze

def main
textdomain "instserver"

Expand Down Expand Up @@ -549,11 +551,11 @@ def SetupNFS(dir, options)

ConfigureService("nfs_server_auto", nfs)

Service.Enable("nfsserver")
if Service.Status("nfsserver") == 0
Service.Reload("nfsserver")
Service.Enable(NFS_SERVER_SERVICE)
if Service.Status(NFS_SERVER_SERVICE) == 0
Service.Reload(NFS_SERVER_SERVICE)
else
Service.Start("nfsserver")
Service.Start(NFS_SERVER_SERVICE)
end

firewalld.write
Expand Down Expand Up @@ -1013,7 +1015,7 @@ def NFSValid(config)
# is the directory in /etc/exports?
return false if !NFSExported(dir)

nfsserver_running = Service.Status("nfsserver") == 0
nfsserver_running = Service.Status(NFS_SERVER_SERVICE) == 0
Builtins.y2milestone("NFS server running: %1", nfsserver_running)

# is the nfsserver running?
Expand Down

0 comments on commit c4e8565

Please sign in to comment.