guests/linux: Fix compatibility with dash shell
This commit is contained in:
parent
233120eebd
commit
61d2a50a54
|
@ -31,7 +31,7 @@ module VagrantPlugins
|
||||||
|
|
||||||
# Configure the interface
|
# Configure the interface
|
||||||
comm.sudo("ln -fs /etc/init.d/net.lo /etc/init.d/net.eth#{network[: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("cat /tmp/vagrant-network-entry >> /etc/conf.d/net")
|
||||||
comm.sudo("rm -f /tmp/vagrant-network-entry")
|
comm.sudo("rm -f /tmp/vagrant-network-entry")
|
||||||
comm.sudo("/etc/init.d/net.eth#{network[:interface]} start")
|
comm.sudo("/etc/init.d/net.eth#{network[:interface]} start")
|
||||||
|
|
|
@ -34,7 +34,7 @@ module VagrantPlugins
|
||||||
|
|
||||||
# Emit a mount event
|
# Emit a mount event
|
||||||
commands << <<-EOH.gsub(/^ {14}/, '')
|
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}'
|
/sbin/initctl emit --no-wait vagrant-mounted MOUNTPOINT='#{expanded_guest_path}'
|
||||||
fi
|
fi
|
||||||
EOH
|
EOH
|
||||||
|
|
|
@ -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 &>/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}'
|
/sbin/initctl emit --no-wait vagrant-mounted MOUNTPOINT='#{expanded_guest_path}'
|
||||||
fi
|
fi
|
||||||
SCRIPT
|
SCRIPT
|
||||||
|
|
|
@ -81,7 +81,7 @@ module VagrantPlugins
|
||||||
|
|
||||||
# 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 &>/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}'
|
/sbin/initctl emit --no-wait vagrant-mounted MOUNTPOINT='#{expanded_guest_path}'
|
||||||
fi
|
fi
|
||||||
SCRIPT
|
SCRIPT
|
||||||
|
|
|
@ -34,7 +34,7 @@ module VagrantPlugins
|
||||||
|
|
||||||
# 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 &>/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}'
|
/sbin/initctl emit --no-wait vagrant-mounted MOUNTPOINT='#{expanded_guest_path}'
|
||||||
fi
|
fi
|
||||||
SCRIPT
|
SCRIPT
|
||||||
|
|
Loading…
Reference in New Issue