aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/bash/function/device.sh
diff options
context:
space:
mode:
Diffstat (limited to 'resources/libraries/bash/function/device.sh')
-rw-r--r--resources/libraries/bash/function/device.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/resources/libraries/bash/function/device.sh b/resources/libraries/bash/function/device.sh
index 1ad113ddba..86d482068a 100644
--- a/resources/libraries/bash/function/device.sh
+++ b/resources/libraries/bash/function/device.sh
@@ -518,9 +518,11 @@ function get_pci_addr () {
PCI_ADDR=$(basename $(readlink /sys/class/net/${NETDEV}/device)) || {
die "Failed to get PCI address of linux network interface!"
}
- fi
- if [ ! -d /sys/bus/pci/devices/${PCI_ADDR} ]; then
- die "PCI device ${NETDEV} doesn't exist!"
+ if [ ! -d /sys/bus/pci/devices/${PCI_ADDR} ]; then
+ die "PCI device ${PCI_ADDR} doesn't exist!"
+ fi
+ else
+ die "Can't get device info of interface ${NETDEV}!"
fi
}