github.com/k8snetworkplumbingwg/sriov-network-operator@v1.2.1-0.20240408194816-2d2e5a45d453/bindata/scripts/udev-find-sriov-pf.sh (about) 1 #!/bin/bash 2 3 cat <<'EOF' > /host/etc/udev/disable-nm-sriov.sh 4 #!/bin/bash 5 if [ ! -d "/sys/class/net/$1/device/physfn" ]; then 6 exit 0 7 fi 8 9 pf_path=$(readlink /sys/class/net/$1/device/physfn -n) 10 pf_pci_address=${pf_path##*../} 11 12 if [ "$2" == "$pf_pci_address" ]; then 13 echo "NM_UNMANAGED=1" 14 fi 15 EOF 16 17 chmod +x /host/etc/udev/disable-nm-sriov.sh