1
0
mirror of https://github.com/pi-hole/pi-hole synced 2025-01-03 04:30:55 +00:00

Remove @ and following character from interface name

Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
This commit is contained in:
RD WebDesign 2022-03-30 21:32:18 -03:00
parent 329c161054
commit 5cebceadda

View File

@ -906,9 +906,11 @@ dig_at() {
# Removes all interfaces which are not UP # Removes all interfaces which are not UP
# s/^[0-9]*: //g; # s/^[0-9]*: //g;
# Removes interface index # Removes interface index
# s/@.*//g;
# Removes everything after @ (if found)
# s/: <.*//g; # s/: <.*//g;
# Removes everything after the interface name # Removes everything after the interface name
interfaces="$(ip link show | sed "/ master /d;/UP/!d;s/^[0-9]*: //g;s/: <.*//g;")" interfaces="$(ip link show | sed "/ master /d;/UP/!d;s/^[0-9]*: //g;s/@.*//g;s/: <.*//g;")"
while IFS= read -r iface ; do while IFS= read -r iface ; do
# Get addresses of current interface # Get addresses of current interface