From 3d49b2fde70cd1dcf645884be9da439bd88ca19d Mon Sep 17 00:00:00 2001 From: ycharbi Date: Sun, 9 Jun 2024 18:44:19 +0200 Subject: [PATCH] =?UTF-8?q?M=C3=AAme=20modification=20que=20le=20commit=20?= =?UTF-8?q?pr=C3=A9c=C3=A9dent=20pour=20ifdown.sh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ifdown.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ifdown.sh b/ifdown.sh index 5596510..ef425d1 100755 --- a/ifdown.sh +++ b/ifdown.sh @@ -29,7 +29,7 @@ recupParams(){ # Récupération des données d'après le fichier de configuration if [ "${nom_param}" == "Interface" ]; then - if [[ $(ls /run/network/ | sed -e "s/ifstate//g" -e "s/^.//" -e "/^$/d" -e "/^lo$/d" | grep "${val_param}" 2> /dev/null) ]]; then + if [[ $(find /sys/class/net/ -type l ! -lname '*/devices/virtual/net/*' -printf '%f ' | grep "${val_param}" 2> /dev/null) ]]; then interface="${val_param}" interface_init=0 elif [[ $(ip link show "${val_param}" 2> /dev/null) ]]; then