diff options
author | Ramón M. Gómez <ramongomez@us.es> | 2018-11-26 12:52:31 +0100 |
---|---|---|
committer | Ramón M. Gómez <ramongomez@us.es> | 2018-11-26 12:52:31 +0100 |
commit | 51e67a2cc790796cf3e6832d430c4473e6377ed8 (patch) | |
tree | 41e24b0c7e74d95f55dcaca94f778f008774bb4f /installer/vagrant/Vagrantfile-devel-vbox | |
parent | 910a4c358af0191b5c83f45f93a444b60a633fff (diff) | |
parent | 518d4d84f755185f224c82d5cc3f49b350af4b05 (diff) |
#794: Fast-forward.
Diffstat (limited to 'installer/vagrant/Vagrantfile-devel-vbox')
-rw-r--r-- | installer/vagrant/Vagrantfile-devel-vbox | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/installer/vagrant/Vagrantfile-devel-vbox b/installer/vagrant/Vagrantfile-devel-vbox index 00d7dab6..7aac2c56 100644 --- a/installer/vagrant/Vagrantfile-devel-vbox +++ b/installer/vagrant/Vagrantfile-devel-vbox @@ -38,7 +38,12 @@ if [ -z "$(blkid /dev/mapper/og-images | grep ext4)" ]; then mount -a fi # Install OpenGnsys and change server address. -curl -s https://raw.githubusercontent.com/opengnsys/OpenGnsys/devel/installer/opengnsys_installer.sh | bash || exit $? +if which curl &>/dev/null; then + DOWNLOAD="curl -s" +elif which wget &>/dev/null; then + DOWNLOAD="wget -q -O -" +fi +$DOWNLOAD -s https://raw.githubusercontent.com/opengnsys/OpenGnsys/devel/installer/opengnsys_installer.sh | bash || exit $? mv /opt/opengnsys/log/bash.log /opt/opengnsys/log/opengnsys_installer.log echo y | /opt/opengnsys/bin/setserveraddr enp0s8 # Insert DHCP data. @@ -48,10 +53,10 @@ done service isc-dhcp-server restart # Set language. export LANG="#{LANGUAGE}.UTF-8" -echo "LANG=\"$LANG\"" > /etc/default/locale -echo "LANG=\"$LANG\"" >> /etc/environment +echo "LANG=\\\"$LANG\\\"" > /etc/default/locale +echo "LANG=\\\"$LANG\\\"" >> /etc/environment locale-gen --lang #{LANGUAGE} -sed -i "s/XKBLAYOUT=.*/XKBLAYOUT=\"${LANG%_*}\"/" /etc/default/keyboard +sed -i "s/XKBLAYOUT=.*/XKBLAYOUT=\\\"${LANG%_*}\\\"/" /etc/default/keyboard dpkg-reconfigure -fnoninteractive console-setup # Comment out next lines for automatic data insertion. #SQL="INSERT INTO aulas (nombreaula, idcentro, urlfoto, grupoid, ubicacion, puestos, modomul, ipmul, pormul, velmul, router, netmask, ntp, dns, proxy, modp2p, timep2p) VALUES ('Aula virtual', 1, 'aula.jpg', 0, 'Despliegue virtual con Vagrant.', 5, 2, '239.194.2.11', 9000, 70, '#{NETPREFIX}.1', '255.255.255.0', '', '', '', 'peer', 30); INSERT INTO ordenadores (nombreordenador, ip, mac, idaula, idrepositorio, idperfilhard, idmenu, idproautoexec, grupoid, router, mascara, arranque, netiface, netdriver, fotoord) VALUES" @@ -94,12 +99,12 @@ OGAGENTPKG = "ogagent_1.1.0_all.deb" MODELSCRIPT = <<EOT # Comment out next lines to install and configure OGAgent for Ubuntu. #apt-get update -y -#curl -ks https://#{SERVERIP}/opengnsys/descargas/#{OGAGENTPKG} -o #{OGAGENTPKG} -#if [ -f #{OGAGENTPKG} ]; then -# dpkg -i #{OGAGENTPKG} -# apt-get install -fy || exit $? +#apt-get install -y curl +#curl -ks https://#{SERVERIP}/opengnsys/descargas/#{OGAGENTPKG} -o /tmp/#{OGAGENTPKG} +#if [ -f /tmp/#{OGAGENTPKG} ]; then +# apt-get install -y /tmp/#{OGAGENTPKG} || exit $? # sed -i "0,/remote=/ s,remote=.*,remote=https://#{SERVERIP}/opengnsys/rest/," /usr/share/OGAgent/cfg/ogagent.cfg -# rm -f #{OGAGENTPKG} +# rm -f /tmp/#{OGAGENTPKG} #else # echo "Warning: cannot install OGAgent package #{OGAGENTPKG}" #fi |