]> git.ipfire.org Git - people/ms/network.git/blobdiff - functions.device
Change funtion to detect ppp devices.
[people/ms/network.git] / functions.device
index bb47baed3aa56709b3f55d0654bdb2495dc094f0..ff1412708d53c4e6cbc5bc5dfa9c25bed6edc9c3 100644 (file)
@@ -125,7 +125,12 @@ function device_has_virtuals() {
 function device_is_ppp() {
        local device=${1}
 
-       ip link show ${device} 2>/dev/null | grep -qE "<.*POINTOPOINT.*>"
+       local type=$(__device_get_file ${device} type)
+       if [ "${type}" = "512" ]; then
+               return ${EXIT_OK}
+       fi
+
+       return ${EXIT_ERROR}
 }
 
 # Check if the device is a loopback device