diff options
author | DmitriyEshenko <dmitriy.eshenko@vyos.io> | 2019-12-31 13:18:31 +0000 |
---|---|---|
committer | Kim Hagen <kim@sentrium.io> | 2021-09-26 07:16:24 -0500 |
commit | ccd513928c423d284ac91a7ca701817c080fc303 (patch) | |
tree | e3ed2dd961dcf3d1156111d0165f3617af9cb2f4 /tools | |
parent | 8d3da190caaba1a94739b1f5cb8f0a35ef4474ed (diff) | |
download | vyos-build-ccd513928c423d284ac91a7ca701817c080fc303.tar.gz vyos-build-ccd513928c423d284ac91a7ca701817c080fc303.zip |
Improve interface naming for EC saf51015I/saf51003I
Diffstat (limited to 'tools')
30 files changed, 30 insertions, 202 deletions
diff --git a/tools/saf51003I/11-eth1.link b/tools/saf51003I/11-eth1.link deleted file mode 100644 index 6bfc4908..00000000 --- a/tools/saf51003I/11-eth1.link +++ /dev/null @@ -1,6 +0,0 @@ -[Match] -Path=pci-0000:02:00.0* - -[Link] -Name=eth1 -Alias=LAN1 diff --git a/tools/saf51003I/12-eth2.link b/tools/saf51003I/12-eth2.link deleted file mode 100644 index 5b900781..00000000 --- a/tools/saf51003I/12-eth2.link +++ /dev/null @@ -1,6 +0,0 @@ -[Match] -Path=pci-0000:02:00.1* - -[Link] -Name=eth2 -Alias=LAN2 diff --git a/tools/saf51003I/13-eth3.link b/tools/saf51003I/13-eth3.link deleted file mode 100644 index 24f10e35..00000000 --- a/tools/saf51003I/13-eth3.link +++ /dev/null @@ -1,6 +0,0 @@ -[Match] -Path=pci-0000:02:00.2* - -[Link] -Name=eth3 -Alias=LAN3 diff --git a/tools/saf51003I/14-eth4.link b/tools/saf51003I/14-eth4.link deleted file mode 100644 index f2df4d44..00000000 --- a/tools/saf51003I/14-eth4.link +++ /dev/null @@ -1,6 +0,0 @@ -[Match] -Path=pci-0000:02:00.3* - -[Link] -Name=eth4 -Alias=LAN4 diff --git a/tools/saf51003I/15-eth5.link b/tools/saf51003I/15-eth5.link deleted file mode 100644 index 40bbe5c8..00000000 --- a/tools/saf51003I/15-eth5.link +++ /dev/null @@ -1,6 +0,0 @@ -[Match] -Path=pci-0000:05:00.0* - -[Link] -Name=eth5 -Alias=LAN5 diff --git a/tools/saf51003I/16-eth6.link b/tools/saf51003I/16-eth6.link deleted file mode 100644 index c9aa0ca5..00000000 --- a/tools/saf51003I/16-eth6.link +++ /dev/null @@ -1,6 +0,0 @@ -[Match] -Path=pci-0000:05:00.1* - -[Link] -Name=eth6 -Alias=LAN6 diff --git a/tools/saf51003I/17-eth7.link b/tools/saf51003I/17-eth7.link deleted file mode 100644 index 897f1c2e..00000000 --- a/tools/saf51003I/17-eth7.link +++ /dev/null @@ -1,6 +0,0 @@ -[Match] -Path=pci-0000:05:00.2* - -[Link] -Name=eth7 -Alias=LAN7 diff --git a/tools/saf51003I/18-eth8.link b/tools/saf51003I/18-eth8.link deleted file mode 100644 index b28cccec..00000000 --- a/tools/saf51003I/18-eth8.link +++ /dev/null @@ -1,6 +0,0 @@ -[Match] -Path=pci-0000:05:00.3* - -[Link] -Name=eth8 -Alias=LAN8 diff --git a/tools/saf51003I/19-eth9.link b/tools/saf51003I/19-eth9.link deleted file mode 100644 index 60dd0fff..00000000 --- a/tools/saf51003I/19-eth9.link +++ /dev/null @@ -1,6 +0,0 @@ -[Match] -Path=pci-0000:08:00.0* - -[Link] -Name=eth9 -Alias=DMZ diff --git a/tools/saf51003I/20-eth10.link b/tools/saf51003I/20-eth10.link deleted file mode 100644 index 7d6ac36d..00000000 --- a/tools/saf51003I/20-eth10.link +++ /dev/null @@ -1,6 +0,0 @@ -[Match] -Path=pci-0000:08:00.1* - -[Link] -Name=eth10 -Alias=WAN diff --git a/tools/saf51003I/90-saf51003I.chroot b/tools/saf51003I/90-saf51003I.chroot deleted file mode 100755 index aa4da964..00000000 --- a/tools/saf51003I/90-saf51003I.chroot +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -echo "ShowStatus=yes" >> /etc/systemd/system.conf - -echo I: Disable default link rule. -rm /lib/systemd/network/99-default.link -touch /lib/systemd/network/99-default.link -rm /lib/udev/rules.d/65-vyatta-net.rules -touch /lib/udev/rules.d/65-vyatta-net.rules -rm /lib/udev/rules.d/75-persistent-net-generator.rules -touch /lib/udev/rules.d/75-persistent-net-generator.rules - -echo I: Update initramfs. -update-initramfs -u diff --git a/tools/saf51003I/99-default.link b/tools/saf51003I/99-default.link deleted file mode 100644 index e69de29b..00000000 --- a/tools/saf51003I/99-default.link +++ /dev/null diff --git a/tools/saf51003I/saf51003I b/tools/saf51003I/saf51003I deleted file mode 100755 index 7dcaf034..00000000 --- a/tools/saf51003I/saf51003I +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh -e - -PREREQS="" - -prereqs() { echo "$PREREQS"; } - -case "$1" in - prereqs) - prereqs - exit 0 - ;; -esac - -. /usr/share/initramfs-tools/hook-functions - -mkdir -p $DESTDIR/etc/systemd/network -cp -p /etc/systemd/network/*.link $DESTDIR/etc/systemd/network/ - -mkdir -p $DESTDIR/lib/udev/rules.d -cp -p /lib/udev/rules.d/50-firmware.rules $DESTDIR/lib/udev/rules.d/ -cp -p /lib/udev/rules.d/50-udev-default.rules $DESTDIR/lib/udev/rules.d/ -cp -p /lib/udev/rules.d/55-dm.rules $DESTDIR/lib/udev/rules.d/ -cp -p /lib/udev/rules.d/60-cdrom_id.rules $DESTDIR/lib/udev/rules.d/ -cp -p /lib/udev/rules.d/60-persistent-storage-dm.rules $DESTDIR/lib/udev/rules.d/ -cp -p /lib/udev/rules.d/60-persistent-storage.rules $DESTDIR/lib/udev/rules.d/ -cp -p /lib/udev/rules.d/75-net-description.rules $DESTDIR/lib/udev/rules.d/ -cp -p /lib/udev/rules.d/80-drivers.rules $DESTDIR/lib/udev/rules.d/ -cp -p /lib/udev/rules.d/80-net-setup-link.rules $DESTDIR/lib/udev/rules.d/ diff --git a/tools/saf51015I/11-eth1.link b/tools/saf51015I/11-eth1.link deleted file mode 100644 index 16392247..00000000 --- a/tools/saf51015I/11-eth1.link +++ /dev/null @@ -1,5 +0,0 @@ -[Match] -Path=pci-0000:02:00.0* - -[Link] -Name=eth1 diff --git a/tools/saf51015I/12-eth2.link b/tools/saf51015I/12-eth2.link deleted file mode 100644 index 444f6c96..00000000 --- a/tools/saf51015I/12-eth2.link +++ /dev/null @@ -1,5 +0,0 @@ -[Match] -Path=pci-0000:03:00.0* - -[Link] -Name=eth2 diff --git a/tools/saf51015I/13-eth3.link b/tools/saf51015I/13-eth3.link deleted file mode 100644 index 2a2a41b8..00000000 --- a/tools/saf51015I/13-eth3.link +++ /dev/null @@ -1,5 +0,0 @@ -[Match] -Path=pci-0000:04:00.0* - -[Link] -Name=eth3 diff --git a/tools/saf51015I/14-eth4.link b/tools/saf51015I/14-eth4.link deleted file mode 100644 index 6a86ae67..00000000 --- a/tools/saf51015I/14-eth4.link +++ /dev/null @@ -1,5 +0,0 @@ -[Match] -Path=pci-0000:05:00.0* - -[Link] -Name=eth4 diff --git a/tools/saf51015I/15-eth5.link b/tools/saf51015I/15-eth5.link deleted file mode 100644 index 974084de..00000000 --- a/tools/saf51015I/15-eth5.link +++ /dev/null @@ -1,5 +0,0 @@ -[Match] -Path=pci-0000:06:00.0* - -[Link] -Name=eth5 diff --git a/tools/saf51015I/16-eth6.link b/tools/saf51015I/16-eth6.link deleted file mode 100644 index 26169369..00000000 --- a/tools/saf51015I/16-eth6.link +++ /dev/null @@ -1,5 +0,0 @@ -[Match] -Path=pci-0000:06:00.1* - -[Link] -Name=eth6 diff --git a/tools/saf51015I/17-eth7.link b/tools/saf51015I/17-eth7.link deleted file mode 100644 index 44346fb2..00000000 --- a/tools/saf51015I/17-eth7.link +++ /dev/null @@ -1,5 +0,0 @@ -[Match] -Path=pci-0000:06:00.2* - -[Link] -Name=eth7 diff --git a/tools/saf51015I/18-eth8.link b/tools/saf51015I/18-eth8.link deleted file mode 100644 index 12e3fa30..00000000 --- a/tools/saf51015I/18-eth8.link +++ /dev/null @@ -1,5 +0,0 @@ -[Match] -Path=pci-0000:06:00.3* - -[Link] -Name=eth8 diff --git a/tools/saf51015I/19-eth9.link b/tools/saf51015I/19-eth9.link deleted file mode 100644 index f67a3da9..00000000 --- a/tools/saf51015I/19-eth9.link +++ /dev/null @@ -1,5 +0,0 @@ -[Match] -Path=pci-0000:0a:00.0* - -[Link] -Name=eth9 diff --git a/tools/saf51015I/20-eth10.link b/tools/saf51015I/20-eth10.link deleted file mode 100644 index 1a6e959f..00000000 --- a/tools/saf51015I/20-eth10.link +++ /dev/null @@ -1,5 +0,0 @@ -[Match] -Path=pci-0000:0a:00.1* - -[Link] -Name=eth10 diff --git a/tools/saf51015I/21-eth11.link b/tools/saf51015I/21-eth11.link deleted file mode 100644 index e107e983..00000000 --- a/tools/saf51015I/21-eth11.link +++ /dev/null @@ -1,5 +0,0 @@ -[Match] -Path=pci-0000:0b:00.0* - -[Link] -Name=eth11 diff --git a/tools/saf51015I/22-eth12.link b/tools/saf51015I/22-eth12.link deleted file mode 100644 index e17caf5f..00000000 --- a/tools/saf51015I/22-eth12.link +++ /dev/null @@ -1,5 +0,0 @@ -[Match] -Path=pci-0000:0b:00.1* - -[Link] -Name=eth12 diff --git a/tools/saf51015I/90-saf51015I.chroot b/tools/saf51015I/90-saf51015I.chroot deleted file mode 100755 index aa4da964..00000000 --- a/tools/saf51015I/90-saf51015I.chroot +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -echo "ShowStatus=yes" >> /etc/systemd/system.conf - -echo I: Disable default link rule. -rm /lib/systemd/network/99-default.link -touch /lib/systemd/network/99-default.link -rm /lib/udev/rules.d/65-vyatta-net.rules -touch /lib/udev/rules.d/65-vyatta-net.rules -rm /lib/udev/rules.d/75-persistent-net-generator.rules -touch /lib/udev/rules.d/75-persistent-net-generator.rules - -echo I: Update initramfs. -update-initramfs -u diff --git a/tools/saf51015I/99-default.link b/tools/saf51015I/99-default.link deleted file mode 100644 index e69de29b..00000000 --- a/tools/saf51015I/99-default.link +++ /dev/null diff --git a/tools/saf51015I/saf51015I b/tools/saf51015I/saf51015I deleted file mode 100755 index 7dcaf034..00000000 --- a/tools/saf51015I/saf51015I +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh -e - -PREREQS="" - -prereqs() { echo "$PREREQS"; } - -case "$1" in - prereqs) - prereqs - exit 0 - ;; -esac - -. /usr/share/initramfs-tools/hook-functions - -mkdir -p $DESTDIR/etc/systemd/network -cp -p /etc/systemd/network/*.link $DESTDIR/etc/systemd/network/ - -mkdir -p $DESTDIR/lib/udev/rules.d -cp -p /lib/udev/rules.d/50-firmware.rules $DESTDIR/lib/udev/rules.d/ -cp -p /lib/udev/rules.d/50-udev-default.rules $DESTDIR/lib/udev/rules.d/ -cp -p /lib/udev/rules.d/55-dm.rules $DESTDIR/lib/udev/rules.d/ -cp -p /lib/udev/rules.d/60-cdrom_id.rules $DESTDIR/lib/udev/rules.d/ -cp -p /lib/udev/rules.d/60-persistent-storage-dm.rules $DESTDIR/lib/udev/rules.d/ -cp -p /lib/udev/rules.d/60-persistent-storage.rules $DESTDIR/lib/udev/rules.d/ -cp -p /lib/udev/rules.d/75-net-description.rules $DESTDIR/lib/udev/rules.d/ -cp -p /lib/udev/rules.d/80-drivers.rules $DESTDIR/lib/udev/rules.d/ -cp -p /lib/udev/rules.d/80-net-setup-link.rules $DESTDIR/lib/udev/rules.d/ diff --git a/tools/vendors_udev/64-vyos-SAF51003I-net.rules b/tools/vendors_udev/64-vyos-SAF51003I-net.rules new file mode 100644 index 00000000..0da995d0 --- /dev/null +++ b/tools/vendors_udev/64-vyos-SAF51003I-net.rules @@ -0,0 +1,14 @@ +ATTR{[dmi/id]board_name}!="SAF51003I", GOTO="end_ec_nic" + +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:02:00.0", ENV{VYOS_IFNAME}="eth1", ATTR{ifalias}="LAN1" +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:02:00.1", ENV{VYOS_IFNAME}="eth2", ATTR{ifalias}="LAN2" +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:02:00.2", ENV{VYOS_IFNAME}="eth3", ATTR{ifalias}="LAN3" +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:02:00.3", ENV{VYOS_IFNAME}="eth4", ATTR{ifalias}="LAN4" +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:05:00.0", ENV{VYOS_IFNAME}="eth5", ATTR{ifalias}="LAN5" +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:05:00.1", ENV{VYOS_IFNAME}="eth6", ATTR{ifalias}="LAN6" +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:05:00.2", ENV{VYOS_IFNAME}="eth7", ATTR{ifalias}="LAN7" +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:05:00.3", ENV{VYOS_IFNAME}="eth8", ATTR{ifalias}="LAN8" +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:08:00.0", ENV{VYOS_IFNAME}="eth9", ATTR{ifalias}="DMZ" +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:08:00.1", ENV{VYOS_IFNAME}="eth10", ATTR{ifalias}="WAN" + +LABEL="end_ec_nic"
\ No newline at end of file diff --git a/tools/vendors_udev/64-vyos-SAF51015I-net.rules b/tools/vendors_udev/64-vyos-SAF51015I-net.rules new file mode 100644 index 00000000..eab23bdb --- /dev/null +++ b/tools/vendors_udev/64-vyos-SAF51015I-net.rules @@ -0,0 +1,16 @@ +ATTR{[dmi/id]board_name}!="SAF51015I-0318-EC", GOTO="end_ec_nic" + +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:02:00.0", ENV{VYOS_IFNAME}="eth1" +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:03:00.0", ENV{VYOS_IFNAME}="eth2" +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:04:00.0", ENV{VYOS_IFNAME}="eth3" +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:05:00.0", ENV{VYOS_IFNAME}="eth4" +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:06:00.0", ENV{VYOS_IFNAME}="eth5" +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:06:00.1", ENV{VYOS_IFNAME}="eth6" +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:06:00.2", ENV{VYOS_IFNAME}="eth7" +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:06:00.3", ENV{VYOS_IFNAME}="eth8" +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:0a:00.0", ENV{VYOS_IFNAME}="eth9" +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:0a:00.1", ENV{VYOS_IFNAME}="eth10" +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:0b:00.0", ENV{VYOS_IFNAME}="eth11" +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:0b:00.1", ENV{VYOS_IFNAME}="eth12" + +LABEL="end_ec_nic" |