Merge pull request #8051 from jklippel/vagrant-issue-7368
redirect any output to stderr by /sbin/init to /dev/null when checking for upstart capability
This commit is contained in:
commit
0587707044
|
@ -94,7 +94,7 @@ SCRIPT
|
||||||
|
|
||||||
# Emit an upstart event if we can
|
# Emit an upstart event if we can
|
||||||
machine.communicate.sudo <<-SCRIPT
|
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}'
|
/sbin/initctl emit --no-wait vagrant-mounted MOUNTPOINT='#{expanded_guest_path}'
|
||||||
fi
|
fi
|
||||||
SCRIPT
|
SCRIPT
|
||||||
|
|
|
@ -89,7 +89,7 @@ module VagrantPlugins
|
||||||
|
|
||||||
# Emit an upstart event if we can
|
# Emit an upstart event if we can
|
||||||
machine.communicate.sudo <<-EOH.gsub(/^ {12}/, "")
|
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}
|
/sbin/initctl emit --no-wait vagrant-mounted MOUNTPOINT=#{guest_path}
|
||||||
fi
|
fi
|
||||||
EOH
|
EOH
|
||||||
|
|
|
@ -35,7 +35,7 @@ module VagrantPlugins
|
||||||
mount -o #{mount_opts} #{ip}:#{host_path} #{guest_path}
|
mount -o #{mount_opts} #{ip}:#{host_path} #{guest_path}
|
||||||
result=$?
|
result=$?
|
||||||
if test $result -eq 0; then
|
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}
|
/sbin/initctl emit --no-wait vagrant-mounted MOUNTPOINT=#{guest_path}
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue