Updated efg.pm (networking fixes), added rebootall.sh script.
authorZoltán Felleg <zoltan.felleg@userrendszerhaz.hu>
Fri, 8 Nov 2019 14:33:42 +0000 (15:33 +0100)
committerZoltán Felleg <zoltan.felleg@userrendszerhaz.hu>
Fri, 8 Nov 2019 14:33:42 +0000 (15:33 +0100)
scripts/rebootall.sh [new file with mode: 0755]
sources/efg.pm/config
sources/efg.pm/firstboot/01_setupnetworking.sh
sources/vhost1.usr/etc/lxc/lxc.conf [moved from sources/vhost1.usr/etc/lxc.conf with 100% similarity]
sources/vhost2.usr/etc/lxc/lxc.conf [moved from sources/vhost2.usr/etc/lxc.conf with 100% similarity]

diff --git a/scripts/rebootall.sh b/scripts/rebootall.sh
new file mode 100755 (executable)
index 0000000..3284811
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+
+lxc-ls -1 --running | while read CONTAINER
+do
+    echo "Rebooting $CONTAINER"
+    lxc-attach --name $CONTAINER -- reboot
+done
index 45d40e5bc819ceb63ebb9a425ebbafa1fc2b5462..f953548c0e8e0c5f2306a61f6e37fa4f98268089 100644 (file)
@@ -8,11 +8,14 @@ lxc.mount.auto = proc:rw sys:ro
 lxc.net.0.type = veth
 lxc.net.0.flags = up
 lxc.net.0.link = brh-dev
+lxc.net.0.name = eth0
 lxc.net.0.hwaddr = 02:0c:18:03:ad:fe
 
-lxc.net.1.type = phys
+lxc.net.1.type = veth
 lxc.net.1.flags = up
-lxc.net.1.link = bonde-dev
+lxc.net.1.link = bre-dev
+lxc.net.1.name = eth1
+lxc.net.0.hwaddr = 02:0c:18:03:28:92
 
 lxc.cgroup.devices.allow =
 lxc.cgroup.devices.deny =
index 2c140ad76fe0ec4a1236641a70f1652d13cf0eeb..8802b65070d3708af9fe2edddbf9de5b32c0dffa 100755 (executable)
@@ -17,15 +17,15 @@ done
 [ $WAITED -eq 1 ] && echo
 
 CONNECTION_DEVICES_UP=$(nmcli --terse connection show | grep -v ':$' | wc -l)
-#while [ $CONNECTION_DEVICES_UP -lt 2 ]
-while [ $CONNECTION_DEVICES_UP -lt 1 ]
+#while [ $CONNECTION_DEVICES_UP -lt 1 ]
+while [ $CONNECTION_DEVICES_UP -lt 2 ]
 do
     sleep 1
     nmcli --terse connection show
     CONNECTION_DEVICES_UP=$(nmcli --terse connection show | grep -v ':$' | wc -l)
 done
 
-EXTERNAL_DEVICE=efg
+EXTERNAL_DEVICE=eth1
 PERIMETER_DEVICE=eth0
 
 CONNECTIONS=$(nmcli --terse connection show | wc -l)
@@ -55,7 +55,7 @@ nmcli connection show
 
 nmcli connection add \
     connection.autoconnect yes \
-    connection.id dynamic \
+    connection.id external \
     connection.interface-name $EXTERNAL_DEVICE \
     connection.type 802-3-ethernet \
     ipv4.addresses "192.168.65.1/24, 194.149.40.146/28, 194.149.40.147/28, 194.149.40.148/28, 194.149.40.149/28, 194.149.40.150/28" \