diff options
Diffstat (limited to 'meta-yadro/meta-nicole/recipes-phosphor/network/vlan-4004')
6 files changed, 53 insertions, 0 deletions
diff --git a/meta-yadro/meta-nicole/recipes-phosphor/network/vlan-4004/00-bmc-eth0.4004.0.network b/meta-yadro/meta-nicole/recipes-phosphor/network/vlan-4004/00-bmc-eth0.4004.0.network new file mode 100644 index 000000000..534cbe9b1 --- /dev/null +++ b/meta-yadro/meta-nicole/recipes-phosphor/network/vlan-4004/00-bmc-eth0.4004.0.network @@ -0,0 +1,8 @@ +[Match] +Name=eth0.4004 +KernelCommandLine=bmcposition=0 +[Network] +LinkLocalAddressing=yes +IPv6AcceptRA=true +DHCP=no +Address=fd59:4144:524f:5441:544c:494e:3:1/122 diff --git a/meta-yadro/meta-nicole/recipes-phosphor/network/vlan-4004/00-bmc-eth0.4004.1.network b/meta-yadro/meta-nicole/recipes-phosphor/network/vlan-4004/00-bmc-eth0.4004.1.network new file mode 100644 index 000000000..83a48eee7 --- /dev/null +++ b/meta-yadro/meta-nicole/recipes-phosphor/network/vlan-4004/00-bmc-eth0.4004.1.network @@ -0,0 +1,8 @@ +[Match] +Name=eth0.4004 +KernelCommandLine=bmcposition=1 +[Network] +LinkLocalAddressing=yes +IPv6AcceptRA=true +DHCP=no +Address=fd59:4144:524f:5441:544c:494e:3:2/122 diff --git a/meta-yadro/meta-nicole/recipes-phosphor/network/vlan-4004/00-bmc-eth0.network b/meta-yadro/meta-nicole/recipes-phosphor/network/vlan-4004/00-bmc-eth0.network new file mode 100644 index 000000000..f7c670743 --- /dev/null +++ b/meta-yadro/meta-nicole/recipes-phosphor/network/vlan-4004/00-bmc-eth0.network @@ -0,0 +1,9 @@ +[Match] +Name=eth0 +[Network] +VLAN=eth0.4004 +DHCP=true +LinkLocalAddressing=yes +IPv6AcceptRA=false +[DHCP] +ClientIdentifier=mac diff --git a/meta-yadro/meta-nicole/recipes-phosphor/network/vlan-4004/eth0.4004.netdev b/meta-yadro/meta-nicole/recipes-phosphor/network/vlan-4004/eth0.4004.netdev new file mode 100644 index 000000000..e315f5e8a --- /dev/null +++ b/meta-yadro/meta-nicole/recipes-phosphor/network/vlan-4004/eth0.4004.netdev @@ -0,0 +1,5 @@ +[NetDev] +Name=eth0.4004 +Kind=vlan +[VLAN] +Id=4004 diff --git a/meta-yadro/meta-nicole/recipes-phosphor/network/vlan-4004/setup-vlan4004.service b/meta-yadro/meta-nicole/recipes-phosphor/network/vlan-4004/setup-vlan4004.service new file mode 100644 index 000000000..871462480 --- /dev/null +++ b/meta-yadro/meta-nicole/recipes-phosphor/network/vlan-4004/setup-vlan4004.service @@ -0,0 +1,15 @@ +[Unit] +Description=Setup VLAN 4004 +DefaultDependencies=no +Conflicts=shutdown.target +After=systemd-remount-fs.service +Before=sysinit.target shutdown.target systemd-update-done.service +ConditionNeedsUpdate=/etc + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/usr/bin/setup-vlan4004.sh + +[Install] +WantedBy=sysinit.target diff --git a/meta-yadro/meta-nicole/recipes-phosphor/network/vlan-4004/setup-vlan4004.sh b/meta-yadro/meta-nicole/recipes-phosphor/network/vlan-4004/setup-vlan4004.sh new file mode 100755 index 000000000..1278769d1 --- /dev/null +++ b/meta-yadro/meta-nicole/recipes-phosphor/network/vlan-4004/setup-vlan4004.sh @@ -0,0 +1,8 @@ +#!/bin/sh -eu + +VLAN='VLAN=eth0.4004' +ETH0_CFG='/etc/systemd/network/00-bmc-eth0.network' + +if ( ! grep -q "${VLAN}" ${ETH0_CFG} ); then + sed -i "/^\[Network\]$/a ${VLAN}" ${ETH0_CFG} +fi |