From 4e1f2c49aa4504e33035b781a97f908c66db3772 Mon Sep 17 00:00:00 2001 From: torben Date: Mon, 3 Sep 2018 19:27:37 +0200 Subject: Interface now working without given parameter (auto detection!). --- ...ert-kcl-network-configuration-to-systemd-service-files.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/modules.d/systemd-networkd-ext/hooks/convert-kcl-network-configuration-to-systemd-service-files.sh b/modules.d/systemd-networkd-ext/hooks/convert-kcl-network-configuration-to-systemd-service-files.sh index 410a890e..308a3e38 100755 --- a/modules.d/systemd-networkd-ext/hooks/convert-kcl-network-configuration-to-systemd-service-files.sh +++ b/modules.d/systemd-networkd-ext/hooks/convert-kcl-network-configuration-to-systemd-service-files.sh @@ -147,7 +147,7 @@ EOF if [[ "$BOOTIF" != '' ]]; then echo "MACAddress=$BOOTIF" else - echo 'Path=enp*' + echo 'Path=enp* eth*' fi cat << EOF @@ -200,7 +200,7 @@ EOF if [[ "$WIRELESS_BOOTIF" != '' ]]; then echo "MACAddress=$WIRELESS_BOOTIF" else - echo 'Path=wlp*' + echo 'Path=wlp* wlan*' fi cat << EOF @@ -307,8 +307,10 @@ save_ip_config if [[ "$BOOTIF" != false ]]; then # Create the udev rule to rename the boot interface to the declared BOOTIF_NAME if [ "$BOOTIF" = '' ]; then - echo 'SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", NAME=="enp*", NAME="'$BOOTIF_NAME'"' \ + echo 'SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", KERNEL=="enp*", NAME="'$BOOTIF_NAME'"' \ > /etc/udev/rules.d/70-pxe-boot-interface.rules + echo 'SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", KERNEL=="eth*", NAME="'$BOOTIF_NAME'"' \ + > /etc/udev/rules.d/71-pxe-boot-interface.rules else echo 'SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="'$BOOTIF'", NAME="'$BOOTIF_NAME'"' \ > /etc/udev/rules.d/70-pxe-boot-interface.rules @@ -317,7 +319,9 @@ fi if [[ "$WIRELESS_BOOTIF" != false ]]; then # Create udev rule to rename the specifief wireless boot interface to WIRELESS_BOOTIF_NAME if [ "$WIRELESS_BOOTIF" = '' ]; then - echo 'SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", NAME=="wlp*", NAME="'$WIRELESS_BOOTIF_NAME'"' \ + echo 'SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", KERNEL=="wlp*", NAME="'$WIRELESS_BOOTIF_NAME'"' \ + > /etc/udev/rules.d/70-pxe-wireless-boot-interface.rules + echo 'SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", KERNEL=="wlan*", NAME="'$WIRELESS_BOOTIF_NAME'"' \ > /etc/udev/rules.d/70-pxe-wireless-boot-interface.rules else echo 'SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="'$WIRELESS_BOOTIF'", NAME="'$WIRELESS_BOOTIF_NAME'"' \ -- cgit v1.2.3-55-g7522