Merge pull request #208 from elreydetoda/master

Adding arch deviation support and packer var for windows.
This commit is contained in:
jbarnett-r7 2018-02-14 16:57:44 -06:00 committed by GitHub
commit c266574144
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -4,6 +4,7 @@ $virtualBoxMinVersion = "5.1.10"
$packerMinVersion = "0.10.0"
$vagrantMinVersion = "1.9.0"
$vagrantreloadMinVersion = "0.0.1"
$packer = "packer"
function CompareVersions ($actualVersion, $expectedVersion, $exactMatch = $False) {
If ($exactMatch) {
@ -48,7 +49,7 @@ If (CompareVersions -actualVersion $vboxVersion -expectedVersion $virtualBoxMinV
exit
}
$packerVersion = cmd.exe /c "packer" -v
$packerVersion = cmd.exe /c $packer -v
If (CompareVersions -actualVersion $packerVersion -expectedVersion $packerMinVersion) {
Write-Host "Compatible version of packer found."
@ -99,7 +100,7 @@ If ($(Test-Path "windows_2008_r2_virtualbox.box") -eq $True) {
Write-Host "It looks like the Vagrant box already exists. Skipping the Packer build."
} else {
Write-Host "Building the Vagrant box..."
cmd.exe /c packer build --only=virtualbox-iso windows_2008_r2.json
cmd.exe /c $packer build --only=virtualbox-iso windows_2008_r2.json
if($?) {
Write-Host "Box successfully built by Packer."
@ -128,4 +129,4 @@ If ($vagrant_box_list -eq "metasploitable3") {
}
Write-Host "SUCCESS: Run 'vagrant up' to provision and start metasploitable3."
Write-Host "NOTE: The VM will need Internet access to provision properly."
Write-Host "NOTE: The VM will need Internet access to provision properly."

View File

@ -42,7 +42,7 @@ if [ $(uname) = "Darwin" ]; then
vagrant_exact_match=false
elif [ $(uname) = "Linux" ]; then
vagrant_exact_match=false
if (cat /etc/*-release | grep -q 'DISTRIB_ID=Arch')|(cat /etc/os-release | grep -q 'ID=arch'); then
if (cat /etc/*-release | grep -q 'DISTRIB_ID=Arch')|(cat /etc/os-release | grep -Pq 'ID=(arch|"antergos")'); then
packer_bin="packer-io"
fi
fi