From f7e91a540c9eb9b9b49e698786789296583f9ee6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zolt=C3=A1n=20Felleg?= Date: Tue, 9 Jul 2019 13:43:56 +0200 Subject: [PATCH] Added cvmb.usr.f30. --- sources/cvmb.usr.f29/01_setupnetworking.sh | 24 ---------- sources/cvmb.usr.f30/01_setupnetworking.sh | 48 +++++++++++++++++++ sources/cvmb.usr.f30/99_setupsystem.sh | 6 +++ sources/cvmb.usr.f30/etc/lxc.conf | 1 + sources/cvmb.usr.f30/etc/sysctl.d/01-lxc.conf | 8 ++++ .../etc/systemd/network/10-efg.link | 5 ++ .../etc/systemd/network/10-ifg.link | 5 ++ .../etc/systemd/network/10-ins.link | 5 ++ .../etc/systemd/network/10-internal.link | 5 ++ .../etc/systemd/network/10-ldap.link | 5 ++ .../etc/systemd/network/10-pns.link | 5 ++ .../etc/systemd/network/10-svc.link | 5 ++ .../etc/systemd/network/10-vpn.link | 5 ++ sources/cvmb.usr.f30/packages.txt | 5 ++ 14 files changed, 108 insertions(+), 24 deletions(-) delete mode 100755 sources/cvmb.usr.f29/01_setupnetworking.sh create mode 100755 sources/cvmb.usr.f30/01_setupnetworking.sh create mode 100755 sources/cvmb.usr.f30/99_setupsystem.sh create mode 100644 sources/cvmb.usr.f30/etc/lxc.conf create mode 100644 sources/cvmb.usr.f30/etc/sysctl.d/01-lxc.conf create mode 100644 sources/cvmb.usr.f30/etc/systemd/network/10-efg.link create mode 100644 sources/cvmb.usr.f30/etc/systemd/network/10-ifg.link create mode 100644 sources/cvmb.usr.f30/etc/systemd/network/10-ins.link create mode 100644 sources/cvmb.usr.f30/etc/systemd/network/10-internal.link create mode 100644 sources/cvmb.usr.f30/etc/systemd/network/10-ldap.link create mode 100644 sources/cvmb.usr.f30/etc/systemd/network/10-pns.link create mode 100644 sources/cvmb.usr.f30/etc/systemd/network/10-svc.link create mode 100644 sources/cvmb.usr.f30/etc/systemd/network/10-vpn.link create mode 100644 sources/cvmb.usr.f30/packages.txt diff --git a/sources/cvmb.usr.f29/01_setupnetworking.sh b/sources/cvmb.usr.f29/01_setupnetworking.sh deleted file mode 100755 index df80106..0000000 --- a/sources/cvmb.usr.f29/01_setupnetworking.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh - - -CONNECTION_LINE=$(nmcli --terse connection show | grep '^internal:') -CONNECTION_UUID=$(echo $CONNECTION_LINE | cut -f 2 -d ':') - -USR_DEVICE=internal - -nmcli connection delete uuid "$CONNECTION_UUID" - -nmcli connection add \ - connection.autoconnect yes \ - connection.id internal \ - connection.interface-name $USR_DEVICE \ - connection.type 802-3-ethernet \ - ipv4.addresses "10.228.92.52/16" \ - ipv4.dns "10.228.109.104, 10.228.109.253" \ - ipv4.dns-search "usr.user.hu" \ - ipv4.gateway "10.228.109.254" \ - ipv4.method "manual" \ - ipv6.method "ignore" \ - save yes - -nmcli connection show diff --git a/sources/cvmb.usr.f30/01_setupnetworking.sh b/sources/cvmb.usr.f30/01_setupnetworking.sh new file mode 100755 index 0000000..c65a613 --- /dev/null +++ b/sources/cvmb.usr.f30/01_setupnetworking.sh @@ -0,0 +1,48 @@ +#!/bin/sh + + +INTERNAL_DEVICE=internal +CONNECTION_LINE=$(nmcli --terse connection show | grep "${INTERNAL_DEVICE}$") +CONNECTION_UUID=$(echo $CONNECTION_LINE | cut -f 2 -d ':') + +nmcli connection delete uuid "$CONNECTION_UUID" + +nmcli connection add \ + connection.autoconnect yes \ + connection.id internal \ + connection.interface-name $INTERNAL_DEVICE \ + connection.type 802-3-ethernet \ + ipv4.addresses "10.228.92.52/16" \ + ipv4.dns "10.228.109.104, 10.228.109.253" \ + ipv4.dns-search "usr.user.hu" \ + ipv4.gateway "10.228.109.254" \ + ipv4.method "manual" \ + ipv6.method "ignore" \ + save yes + +HOST_BRIDGE_DEVICE=brh +CONNECTION_LINE=$(nmcli --terse connection show | grep "${HOST_BRIDGE_DEVICE}$") +CONNECTION_UUID=$(echo $CONNECTION_LINE | cut -f 2 -d ':') + +nmcli connection delete uuid "$CONNECTION_UUID" + +nmcli connection add \ + connection.autoconnect yes \ + connection.id brh \ + connection.interface-name $HOST_BRIDGE_DEVICE \ + connection.type bridge \ + save yes + +nmcli connection show + +for LXC_DEVICE in efgd efgs ifg svc ldap vpn pns ins +do + CONNECTION_LINE=$(nmcli --terse connection show | grep "${LXC_DEVICE}$") + if [ -n "$CONNECTION_LINE" ] + then + CONNECTION_UUID=$(echo $CONNECTION_LINE | cut -f 2 -d ':') + nmcli connection delete uuid "$CONNECTION_UUID" + fi +done + +nmcli connection show diff --git a/sources/cvmb.usr.f30/99_setupsystem.sh b/sources/cvmb.usr.f30/99_setupsystem.sh new file mode 100755 index 0000000..88aac25 --- /dev/null +++ b/sources/cvmb.usr.f30/99_setupsystem.sh @@ -0,0 +1,6 @@ +#!/bin/sh + + +hostnamectl set-hostname cvmb.usr.user.hu +systemctl enable lxc.service +systemctl start lxc.service diff --git a/sources/cvmb.usr.f30/etc/lxc.conf b/sources/cvmb.usr.f30/etc/lxc.conf new file mode 100644 index 0000000..48f7ddf --- /dev/null +++ b/sources/cvmb.usr.f30/etc/lxc.conf @@ -0,0 +1 @@ +lxc.lxcpath = /lxc/containers diff --git a/sources/cvmb.usr.f30/etc/sysctl.d/01-lxc.conf b/sources/cvmb.usr.f30/etc/sysctl.d/01-lxc.conf new file mode 100644 index 0000000..77fcb19 --- /dev/null +++ b/sources/cvmb.usr.f30/etc/sysctl.d/01-lxc.conf @@ -0,0 +1,8 @@ +#fs.inotify.max_queued_events = 16384 +# This is the default. + +fs.inotify.max_user_instances = 1024 +# The default is 128. + +#fs.inotify.max_user_watches = 8192 +# This is the default. diff --git a/sources/cvmb.usr.f30/etc/systemd/network/10-efg.link b/sources/cvmb.usr.f30/etc/systemd/network/10-efg.link new file mode 100644 index 0000000..f5569cb --- /dev/null +++ b/sources/cvmb.usr.f30/etc/systemd/network/10-efg.link @@ -0,0 +1,5 @@ +[Match] +MACAddress=00:50:56:9e:c2:01 + +[Link] +Name=efg diff --git a/sources/cvmb.usr.f30/etc/systemd/network/10-ifg.link b/sources/cvmb.usr.f30/etc/systemd/network/10-ifg.link new file mode 100644 index 0000000..3ffc0b1 --- /dev/null +++ b/sources/cvmb.usr.f30/etc/systemd/network/10-ifg.link @@ -0,0 +1,5 @@ +[Match] +MACAddress=00:50:56:9e:6d:fe + +[Link] +Name=ifg diff --git a/sources/cvmb.usr.f30/etc/systemd/network/10-ins.link b/sources/cvmb.usr.f30/etc/systemd/network/10-ins.link new file mode 100644 index 0000000..9ce7bf0 --- /dev/null +++ b/sources/cvmb.usr.f30/etc/systemd/network/10-ins.link @@ -0,0 +1,5 @@ +[Match] +MACAddress=00:50:56:9e:6d:68 + +[Link] +Name=ins diff --git a/sources/cvmb.usr.f30/etc/systemd/network/10-internal.link b/sources/cvmb.usr.f30/etc/systemd/network/10-internal.link new file mode 100644 index 0000000..2b8b7db --- /dev/null +++ b/sources/cvmb.usr.f30/etc/systemd/network/10-internal.link @@ -0,0 +1,5 @@ +[Match] +MACAddress=00:50:56:9e:5c:34 + +[Link] +Name=internal diff --git a/sources/cvmb.usr.f30/etc/systemd/network/10-ldap.link b/sources/cvmb.usr.f30/etc/systemd/network/10-ldap.link new file mode 100644 index 0000000..36781b0 --- /dev/null +++ b/sources/cvmb.usr.f30/etc/systemd/network/10-ldap.link @@ -0,0 +1,5 @@ +[Match] +MACAddress=00:50:56:9e:6d:fc + +[Link] +Name=ldap diff --git a/sources/cvmb.usr.f30/etc/systemd/network/10-pns.link b/sources/cvmb.usr.f30/etc/systemd/network/10-pns.link new file mode 100644 index 0000000..dbafaba --- /dev/null +++ b/sources/cvmb.usr.f30/etc/systemd/network/10-pns.link @@ -0,0 +1,5 @@ +[Match] +MACAddress=00:50:56:9e:6d:ae + +[Link] +Name=pns diff --git a/sources/cvmb.usr.f30/etc/systemd/network/10-svc.link b/sources/cvmb.usr.f30/etc/systemd/network/10-svc.link new file mode 100644 index 0000000..f07d4b0 --- /dev/null +++ b/sources/cvmb.usr.f30/etc/systemd/network/10-svc.link @@ -0,0 +1,5 @@ +[Match] +MACAddress=00:50:56:9e:6d:fd + +[Link] +Name=svc diff --git a/sources/cvmb.usr.f30/etc/systemd/network/10-vpn.link b/sources/cvmb.usr.f30/etc/systemd/network/10-vpn.link new file mode 100644 index 0000000..c4db4d8 --- /dev/null +++ b/sources/cvmb.usr.f30/etc/systemd/network/10-vpn.link @@ -0,0 +1,5 @@ +[Match] +MACAddress=00:50:56:9e:6d:ec + +[Link] +Name=vpn diff --git a/sources/cvmb.usr.f30/packages.txt b/sources/cvmb.usr.f30/packages.txt new file mode 100644 index 0000000..5c28527 --- /dev/null +++ b/sources/cvmb.usr.f30/packages.txt @@ -0,0 +1,5 @@ +lxc +lxc-templates +mercurial +screen +vim-enhanced -- 2.54.0