Merge pull request #11076 from dcermak/suse_nfs_support

Update nfs & service daemon names for suse based hosts
This commit is contained in:
Brian Cain 2019-10-08 13:41:22 -07:00 committed by GitHub
commit 00e0dc9279
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -5,8 +5,8 @@ module VagrantPlugins
def self.nfs_client_install(machine)
machine.communicate.sudo <<-EOH.gsub(/^ {12}/, '')
zypper -n install nfs-client
/sbin/service rpcbind restart
/sbin/service nfs restart
/usr/bin/systemctl restart rpcbind
/usr/bin/systemctl restart nfs-client.target
EOH
end
end

View File

@ -7,11 +7,11 @@ module VagrantPlugins
end
def self.nfs_check_command(env)
"/sbin/service nfsserver status"
"systemctl status --no-pager nfs-server"
end
def self.nfs_start_command(env)
"/sbin/service nfsserver start"
"systemctl start --no-pager nfs-server"
end
end
end

View File

@ -24,8 +24,8 @@ describe "VagrantPlugins::GuestSUSE::Cap::NFSClient" do
it "installs nfs client utilities" do
cap.nfs_client_install(machine)
expect(comm.received_commands[0]).to match(/zypper -n install nfs-client/)
expect(comm.received_commands[0]).to match(/service rpcbind restart/)
expect(comm.received_commands[0]).to match(/service nfs restart/)
expect(comm.received_commands[0]).to match(/systemctl restart rpcbind/)
expect(comm.received_commands[0]).to match(/systemctl restart nfs-client.target/)
end
end
end