summaryrefslogtreecommitdiffstats
path: root/installer/vagrant
diff options
context:
space:
mode:
authorRamón M. Gómez <ramongomez@us.es>2019-02-21 12:40:54 +0100
committerRamón M. Gómez <ramongomez@us.es>2019-02-21 12:40:54 +0100
commitccfd26b92bbed78e2eb8b2561aeb2ab488258d93 (patch)
treedf9f0fbafc9a78cef128d20bf9b8d887a9dba5ec /installer/vagrant
parent215cd243c9dd1a1d2f486f81ef6419e4cd13200a (diff)
#739: Vagrant provisioning scripts try to get the name of the internal network interface.
Diffstat (limited to 'installer/vagrant')
-rw-r--r--installer/vagrant/Vagrantfile-1.0.6b-vbox2
-rw-r--r--installer/vagrant/Vagrantfile-devel-vbox2
-rw-r--r--installer/vagrant/Vagrantfile-prod-vbox2
3 files changed, 3 insertions, 3 deletions
diff --git a/installer/vagrant/Vagrantfile-1.0.6b-vbox b/installer/vagrant/Vagrantfile-1.0.6b-vbox
index 2db25e1c..4317c654 100644
--- a/installer/vagrant/Vagrantfile-1.0.6b-vbox
+++ b/installer/vagrant/Vagrantfile-1.0.6b-vbox
@@ -42,7 +42,7 @@ fi
# Install OpenGnsys and change server address.
wget -q https://opengnsys.es/svn/tags/opengnsys-1.0.6b/installer/opengnsys_installer.sh -O - | bash || exit $?
mv /opt/opengnsys/log/bash.log /opt/opengnsys/log/opengnsys_installer.log
-echo y | /opt/opengnsys/bin/setserveraddr eth1
+echo y | /opt/opengnsys/bin/setserveraddr $(ip -o link show | tail -1 | cut -d: -f2)
# Insert DHCP data.
for ((i=#{NCLIENTS+10}; i>10; i--)); do
sed -i "/^}$/ i host pc${i} { hardware ethernet #{MACPREFIX}:${i}; fixed-address #{NETPREFIX}.${i}; }" /etc/dhcp/dhcpd.conf
diff --git a/installer/vagrant/Vagrantfile-devel-vbox b/installer/vagrant/Vagrantfile-devel-vbox
index 7aac2c56..ee330e93 100644
--- a/installer/vagrant/Vagrantfile-devel-vbox
+++ b/installer/vagrant/Vagrantfile-devel-vbox
@@ -45,7 +45,7 @@ elif which wget &>/dev/null; then
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
+echo y | /opt/opengnsys/bin/setserveraddr $(ip -o link show | tail -1 | cut -d: -f2)
# Insert DHCP data.
for ((i=#{NCLIENTS+10}; i>10; i--)); do
sed -i "/^}$/ i host pc${i} { hardware ethernet #{MACPREFIX}:${i}; fixed-address #{NETPREFIX}.${i}; }" /etc/dhcp/dhcpd.conf
diff --git a/installer/vagrant/Vagrantfile-prod-vbox b/installer/vagrant/Vagrantfile-prod-vbox
index adeccce7..5cfc94d5 100644
--- a/installer/vagrant/Vagrantfile-prod-vbox
+++ b/installer/vagrant/Vagrantfile-prod-vbox
@@ -45,7 +45,7 @@ elif which wget &>/dev/null; then
fi
$DOWNLOAD -s https://raw.githubusercontent.com/opengnsys/OpenGnsys/master/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
+echo y | /opt/opengnsys/bin/setserveraddr $(ip -o link show | tail -1 | cut -d: -f2)
# Insert DHCP data.
for ((i=#{NCLIENTS+10}; i>10; i--)); do
sed -i "/^}$/ i host pc${i} { hardware ethernet #{MACPREFIX}:${i}; fixed-address #{NETPREFIX}.${i}; }" /etc/dhcp/dhcpd.conf