What do you mean by this?  Which line you are referring to?

I basically just added a line to the vagrant file (see the link I provided 
in OP)

from

$install_chef = <<SCRIPT
if ! [ -d "/opt/chef" ];
then
    apt-get update
    apt-get install -y curl
    curl -L https://www.opscode.com/chef/install.sh | bash
fi
SCRIPT

to this:

$install_chef = <<SCRIPT
if ! [ -d "/opt/chef" ];
then
    sed -i -e 's/archive.ubuntu.com\|
security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
    apt-get update
    apt-get install -y curl
    curl -L https://www.opscode.com/chef/install.sh | bash
fi
SCRIPT



On Thursday, 6 November 2014 18:02:59 UTC+11, Alvaro Miranda Aguilera wrote:
>
> without seeing the line i can't comment.
>
> On Thu, Nov 6, 2014 at 4:19 PM, Anthony Kong <[email protected] 
> <javascript:>> wrote:
>
>> Hi all,
>>
>> I am trying to vagrant up this vagrant file: 
>> https://github.com/sensu/sensu-chef/blob/master/examples/Vagrantfile
>>
>> Because the distribution is old, when the apt-get update is run, it 
>> throws a lot of error messages like
>>
>> ==> default: Err http://us.archive.ubuntu.com raring/main Sources
>> ==> default:   404  Not Found [IP: 91.189.91.23 80]
>>
>> A solution is to update the */etc/apt/sources.list* to point to 
>> old-releases before running* apt-get*
>>
>> Here is the command: 
>>
>> sed -i -e 's/archive.ubuntu.com\|
>> security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
>>
>> However for some reason the shell provisioner did not modify the file. 
>>
>> If I *vagrant ssh *into the box and run it manually, the sed command 
>> works.
>>
>> Why it is the case?
>>
>>
>> Thanks, Tony
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Vagrant" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to