Using gitea URL and setting current branch as default

pull/1/head
Nicolas Arenas 2023-09-13 15:29:32 +02:00
parent 6a65c2d9c5
commit 0fe1fb95bc
1 changed files with 6 additions and 5 deletions

View File

@ -4,7 +4,7 @@ VAGRANTFILE_API_VERSION = "2"
# VM provider: Oracle VM VirtualBox.
ENV['VAGRANT_DEFAULT_PROVIDER'] = "vmware_esxi"
# OpenGnsys version and OGAgent version.
OGVERSION="1.1.1d"
OGVERSION=ENV['OGVERSION'] || "vagrant-esxi"
# OGAgent version.
OGAGENTVERSION="1.1.2"
# Language (accepted values: es_ES, ca_ES, en_GB).
@ -19,7 +19,7 @@ REPOSIZE = 50
SERVERMEM = 2048 # Minimum: 512
CLIENTMEM = 512 # Minimum: 256
# Prefixes for MAC and IP addresses.
MACPREFIX = ENV['OGN_MAC_PREFIX'] || '00:50:56:aa:aa:'
MACPREFIX = ENV['OGN_MAC_PREFIX'] || '00:50:56:aa:aa'
NETPREFIX = ENV['OGN_NET_PREFIX'] || "192.168.2"
# OpenGnsys Server IP address.
SERVERIP = "#{NETPREFIX}.10"
@ -58,8 +58,8 @@ if which curl &>/dev/null; then
elif which wget &>/dev/null; then
DOWNLOAD="wget -q -O -"
fi
BRANCH="opengnsys-#{OGVERSION}"
$DOWNLOAD "https://raw.githubusercontent.com/opengnsys/OpenGnsys/$BRANCH/installer/opengnsys_installer.sh" | bash || exit $?
BRANCH="$OGVERSION"
$DOWNLOAD "https://ognproject.evlt.uma.es/gitea/unizar/opengnsys/raw/${BRANCH}/vagrant-esxi/installer/opengnsys_installer.sh" | bash || exit $?
mv /opt/opengnsys/log/bash.log /opt/opengnsys/log/opengnsys_installer.log
echo y | /opt/opengnsys/bin/setserveraddr $(ip -o link show | tail -1 | cut -d: -f2)
# Insert DHCP data.
@ -114,6 +114,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
og.vm.hostname = "ogAdministrator"
# Launch provisioning script.
og.vm.provision "file", source: "config/01-eth1.yaml" , destination: "/tmp/"
og.vm.provision "shell", inline: OGSERVERSCRIPT
og.vm.provision "shell", inline: OGSERVERSCRIPT , environemnt: {"NETPREFIX" => NETPREFIX}
end
end