hosts/gentoo: recognize systemd for nfsd startup and

replace "service" command with /etc/init.d/nfs
This commit is contained in:
Tim Gus 2013-10-16 01:04:21 -04:00
parent 57e95323b6
commit 7bfc3ea16e
1 changed files with 14 additions and 2 deletions

View File

@ -18,8 +18,20 @@ module VagrantPlugins
super super
@nfs_apply_command = "/usr/sbin/exportfs -r" @nfs_apply_command = "/usr/sbin/exportfs -r"
@nfs_check_command = "service nfs status" if systemd?
@nfs_start_command = "service nfs start" @nfs_check_command = "/usr/bin/systemctl status nfsd"
@nfs_start_command = "/usr/bin/systemctl start nfsd rpc-mountd rpcbind"
else
@nfs_check_command = "/etc/init.d/nfs status"
@nfs_start_command = "/etc/init.d/nfs start"
end
end
protected
# Check for systemd presence from current processes.
def systemd?
`ps -o comm= 1`.chomp == 'systemd'
end end
end end
end end