Vagrant-Issue: 7368: redirect any output to stderr by /sbin/init to /dev/null when checking for upstart capability
This commit is contained in:
parent
9dc1ce584d
commit
b10bc2e8c2
|
@ -94,7 +94,7 @@ SCRIPT
|
|||
|
||||
# Emit an upstart event if we can
|
||||
machine.communicate.sudo <<-SCRIPT
|
||||
if command -v /sbin/init && /sbin/init --version | grep upstart; then
|
||||
if command -v /sbin/init && /sbin/init 2>/dev/null --version | grep upstart; then
|
||||
/sbin/initctl emit --no-wait vagrant-mounted MOUNTPOINT='#{expanded_guest_path}'
|
||||
fi
|
||||
SCRIPT
|
||||
|
|
|
@ -89,7 +89,7 @@ module VagrantPlugins
|
|||
|
||||
# Emit an upstart event if we can
|
||||
machine.communicate.sudo <<-EOH.gsub(/^ {12}/, "")
|
||||
if command -v /sbin/init && /sbin/init --version | grep upstart; then
|
||||
if command -v /sbin/init && /sbin/init 2>/dev/null --version | grep upstart; then
|
||||
/sbin/initctl emit --no-wait vagrant-mounted MOUNTPOINT=#{guest_path}
|
||||
fi
|
||||
EOH
|
||||
|
|
|
@ -35,7 +35,7 @@ module VagrantPlugins
|
|||
mount -o #{mount_opts} #{ip}:#{host_path} #{guest_path}
|
||||
result=$?
|
||||
if test $result -eq 0; then
|
||||
if test -x /sbin/initctl && command -v /sbin/init && /sbin/init --version | grep upstart; then
|
||||
if test -x /sbin/initctl && command -v /sbin/init && /sbin/init 2>/dev/null --version | grep upstart; then
|
||||
/sbin/initctl emit --no-wait vagrant-mounted MOUNTPOINT=#{guest_path}
|
||||
fi
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue