guests/openbsd: Ensure that `PKG_PATH` is set when installing rsync

Depending on the shell, `PKG_PATH` is not necessarily set when Vagrant
runs `pkg_add`.

Ref: GH-2917
This commit is contained in:
Teemu Matilainen 2014-02-03 23:17:54 -03:00
parent bc7496d21c
commit 3b5d6c65fd
2 changed files with 6 additions and 5 deletions

View File

@ -8,8 +8,8 @@ module VagrantPlugins
def self.rsync_install(machine)
machine.communicate.sudo(
'export PKG_PATH="http://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/' \
'`uname -m`/`uname -r | cut -d. -f1-2`/All"; ' \
'PKG_PATH="http://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/' \
'`uname -m`/`uname -r | cut -d. -f1-2`/All" ' \
'pkg_add rsync')
end

View File

@ -3,9 +3,10 @@ module VagrantPlugins
module Cap
class RSync
def self.rsync_install(machine)
machine.communicate.tap do |comm|
comm.sudo("pkg_add -I rsync--")
end
machine.communicate.sudo(
'PKG_PATH="http://ftp.openbsd.org/pub/OpenBSD/' \
'`uname -r`/packages/`arch -s`/" ' \
'pkg_add -I rsync--')
end
def self.rsync_installed(machine)