From d29acc8982323b6f9e98b08d60ff4b8b5f0b9938 Mon Sep 17 00:00:00 2001 From: penz Date: Thu, 28 Apr 2016 13:28:37 -0300 Subject: [PATCH] Do not let NFS systemctl status use a pager Call it with "--no-pager" Without it, if the user has a pager (more/less/etc.) configured and call vagrant up with NFS shares, systemctl would use the pager, and that would probably require an unnecessary key press from the user. --- contrib/sudoers/linux-fedora | 2 +- plugins/hosts/arch/cap/nfs.rb | 2 +- plugins/hosts/gentoo/cap/nfs.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/sudoers/linux-fedora b/contrib/sudoers/linux-fedora index 5bec89189..47740c83f 100644 --- a/contrib/sudoers/linux-fedora +++ b/contrib/sudoers/linux-fedora @@ -1,5 +1,5 @@ Cmnd_Alias VAGRANT_EXPORTS_ADD = /usr/bin/tee -a /etc/exports -Cmnd_Alias VAGRANT_NFSD_CHECK = /usr/bin/systemctl status nfs-server.service +Cmnd_Alias VAGRANT_NFSD_CHECK = /usr/bin/systemctl status --no-pager nfs-server.service Cmnd_Alias VAGRANT_NFSD_START = /usr/bin/systemctl start nfs-server.service Cmnd_Alias VAGRANT_NFSD_APPLY = /usr/sbin/exportfs -ar Cmnd_Alias VAGRANT_EXPORTS_REMOVE = /bin/sed -r -e * d -ibak /*/exports diff --git a/plugins/hosts/arch/cap/nfs.rb b/plugins/hosts/arch/cap/nfs.rb index 6de645237..eb0c656f2 100644 --- a/plugins/hosts/arch/cap/nfs.rb +++ b/plugins/hosts/arch/cap/nfs.rb @@ -4,7 +4,7 @@ module VagrantPlugins class NFS def self.nfs_check_command(env) if systemd? - return "/usr/sbin/systemctl status nfs-server.service" + return "/usr/sbin/systemctl status --no-pager nfs-server.service" else return "/etc/rc.d/nfs-server status" end diff --git a/plugins/hosts/gentoo/cap/nfs.rb b/plugins/hosts/gentoo/cap/nfs.rb index 737e49fc9..995e9b43c 100644 --- a/plugins/hosts/gentoo/cap/nfs.rb +++ b/plugins/hosts/gentoo/cap/nfs.rb @@ -7,7 +7,7 @@ module VagrantPlugins class NFS def self.nfs_check_command(env) if systemd? - return "#{systemctl_path} status nfs-server.service" + return "#{systemctl_path} status --no-pager nfs-server.service" else return "/etc/init.d/nfs status" end