guests/linux: Fix compatibility with dash shell

This commit is contained in:
Seth Vargo 2016-06-06 12:59:51 -04:00
parent 233120eebd
commit 61d2a50a54
No known key found for this signature in database
GPG Key ID: 905A90C2949E8787
5 changed files with 5 additions and 5 deletions

View File

@ -31,7 +31,7 @@ module VagrantPlugins
# Configure the interface
comm.sudo("ln -fs /etc/init.d/net.lo /etc/init.d/net.eth#{network[:interface]}")
comm.sudo("/etc/init.d/net.eth#{network[:interface]} stop 2> /dev/null")
comm.sudo("/etc/init.d/net.eth#{network[:interface]} stop")
comm.sudo("cat /tmp/vagrant-network-entry >> /etc/conf.d/net")
comm.sudo("rm -f /tmp/vagrant-network-entry")
comm.sudo("/etc/init.d/net.eth#{network[:interface]} start")

View File

@ -34,7 +34,7 @@ module VagrantPlugins
# Emit a mount event
commands << <<-EOH.gsub(/^ {14}/, '')
if command -v /sbin/init &>/dev/null && /sbin/init --version | grep upstart &>/dev/null; then
if command -v /sbin/init && /sbin/init --version | grep upstart; then
/sbin/initctl emit --no-wait vagrant-mounted MOUNTPOINT='#{expanded_guest_path}'
fi
EOH

View File

@ -94,7 +94,7 @@ SCRIPT
# Emit an upstart event if we can
machine.communicate.sudo <<-SCRIPT
if command -v /sbin/init &>/dev/null && /sbin/init --version | grep upstart &>/dev/null; then
if command -v /sbin/init && /sbin/init --version | grep upstart; then
/sbin/initctl emit --no-wait vagrant-mounted MOUNTPOINT='#{expanded_guest_path}'
fi
SCRIPT

View File

@ -81,7 +81,7 @@ module VagrantPlugins
# Emit an upstart event if we can
machine.communicate.sudo <<-SCRIPT
if command -v /sbin/init &>/dev/null && /sbin/init --version | grep upstart &>/dev/null; then
if command -v /sbin/init && /sbin/init --version | grep upstart; then
/sbin/initctl emit --no-wait vagrant-mounted MOUNTPOINT='#{expanded_guest_path}'
fi
SCRIPT

View File

@ -34,7 +34,7 @@ module VagrantPlugins
# Emit an upstart event if we can
machine.communicate.sudo <<-SCRIPT
if command -v /sbin/init &>/dev/null && /sbin/init --version | grep upstart &>/dev/null; then
if command -v /sbin/init && /sbin/init --version | grep upstart; then
/sbin/initctl emit --no-wait vagrant-mounted MOUNTPOINT='#{expanded_guest_path}'
fi
SCRIPT