From d2c0a464084535af4393e7e2f444668e5e7b9e8a Mon Sep 17 00:00:00 2001 From: Joerg Hofrichter Date: Tue, 1 Sep 2020 09:52:03 +0200 Subject: mpm: systemd: create udev rules files for each MPM_DEVICE Simplify installation of udev rules by creating folders for each MPM_DEVICE. --- mpm/systemd/CMakeLists.txt | 18 +++--------------- mpm/systemd/udev/e31x/70-sfp-net.rules | 3 +++ mpm/systemd/udev/e320/70-sfp-net.rules | 3 +++ mpm/systemd/udev/e3xx/70-sfp-net.rules | 3 --- 4 files changed, 9 insertions(+), 18 deletions(-) create mode 100644 mpm/systemd/udev/e31x/70-sfp-net.rules create mode 100644 mpm/systemd/udev/e320/70-sfp-net.rules delete mode 100644 mpm/systemd/udev/e3xx/70-sfp-net.rules diff --git a/mpm/systemd/CMakeLists.txt b/mpm/systemd/CMakeLists.txt index 32461b7fb..8387c68cc 100644 --- a/mpm/systemd/CMakeLists.txt +++ b/mpm/systemd/CMakeLists.txt @@ -43,19 +43,7 @@ install(FILES ) # udev rules -if(MPM_DEVICE STREQUAL "n3xx") - install(FILES - ${CMAKE_CURRENT_SOURCE_DIR}/udev/n3xx/70-sfp-net.rules - DESTINATION ${UDEV_UDEVDIR}/rules.d -) -elseif(MPM_DEVICE STREQUAL "e320") - install(FILES - ${CMAKE_CURRENT_SOURCE_DIR}/udev/e3xx/70-sfp-net.rules - DESTINATION ${UDEV_UDEVDIR}/rules.d -) -elseif(MPM_DEVICE STREQUAL "e31x") - install(FILES - ${CMAKE_CURRENT_SOURCE_DIR}/udev/e3xx/70-sfp-net.rules - DESTINATION ${UDEV_UDEVDIR}/rules.d +install(FILES + ${CMAKE_CURRENT_SOURCE_DIR}/udev/${MPM_DEVICE}/70-sfp-net.rules + DESTINATION ${UDEV_UDEVDIR}/rules.d ) -endif(MPM_DEVICE STREQUAL "n3xx") diff --git a/mpm/systemd/udev/e31x/70-sfp-net.rules b/mpm/systemd/udev/e31x/70-sfp-net.rules new file mode 100644 index 000000000..3015dfdef --- /dev/null +++ b/mpm/systemd/udev/e31x/70-sfp-net.rules @@ -0,0 +1,3 @@ +SUBSYSTEM=="net", KERNELS=="40000000.ethernet", NAME="sfp0" +SUBSYSTEM=="net", KERNELS=="40008000.ethernet", NAME="sfp1" +SUBSYSTEM=="net", KERNELS=="40020000.ethernet", NAME="int0" diff --git a/mpm/systemd/udev/e320/70-sfp-net.rules b/mpm/systemd/udev/e320/70-sfp-net.rules new file mode 100644 index 000000000..3015dfdef --- /dev/null +++ b/mpm/systemd/udev/e320/70-sfp-net.rules @@ -0,0 +1,3 @@ +SUBSYSTEM=="net", KERNELS=="40000000.ethernet", NAME="sfp0" +SUBSYSTEM=="net", KERNELS=="40008000.ethernet", NAME="sfp1" +SUBSYSTEM=="net", KERNELS=="40020000.ethernet", NAME="int0" diff --git a/mpm/systemd/udev/e3xx/70-sfp-net.rules b/mpm/systemd/udev/e3xx/70-sfp-net.rules deleted file mode 100644 index 3015dfdef..000000000 --- a/mpm/systemd/udev/e3xx/70-sfp-net.rules +++ /dev/null @@ -1,3 +0,0 @@ -SUBSYSTEM=="net", KERNELS=="40000000.ethernet", NAME="sfp0" -SUBSYSTEM=="net", KERNELS=="40008000.ethernet", NAME="sfp1" -SUBSYSTEM=="net", KERNELS=="40020000.ethernet", NAME="int0" -- cgit v1.2.3