From: Jonatan Schlag Date: Sun, 4 Mar 2018 18:24:56 +0000 (+0000) Subject: device: add new function device_is_vti6 X-Git-Tag: 010~148 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bcba5d275fe29d0b23b544f3a88138ab264f7380;p=network.git device: add new function device_is_vti6 This functions checks if a device is a vti6 device. Signed-off-by: Jonatan Schlag Signed-off-by: Michael Tremer --- diff --git a/src/functions/functions.device b/src/functions/functions.device index 2de1ad94..a04111e1 100644 --- a/src/functions/functions.device +++ b/src/functions/functions.device @@ -286,6 +286,14 @@ device_is_vti() { [ "${type}" = "768" ] && return ${EXIT_OK} || return ${EXIT_ERROR} } +device_is_vti6() { + local device=${1} + + local type=$(__device_get_file ${device} type) + + [ "${type}" = "769" ] && return ${EXIT_OK} || return ${EXIT_ERROR} +} + device_get_phy() { local device="${1}"