Detecting IFACE

Hi all
First a great congratulations and big thanks for this amazing script.

I’ve got a problem in the set of the IFACE, it seems that this commit doesn’t work right in my lab.

Esxi -> ProxMox -> Ubuntu -> Quickbox
In this enviroment the IFACE returned is “eth0@if5”.

I would cut before the @ with “cut -d@ -f 1”, this way :
ip link show|grep -i broadcast|grep UP|cut -d: -f 2|cut -d@ -f 1|sed -e ‘s/ //g’

This is the execution :

[m@Ubuntu]:(0b)~$ ip link show|grep -i broadcast|grep UP|cut -d: -f 2|sed -e ‘s/ //g’
eth0@if5
[m@Ubuntu]:(0b)~$ ip link show|grep -i broadcast|grep UP|cut -d: -f 2|cut -d@ -f 1|sed -e ‘s/ //g’
eth0

Hope this help.

Best Regards

1 Like

Thanks for the contribution on this one @Beachsun! I will run a few trials across various environment and OS to ensure it’s validity (just a precaution). I don’t think we have had many ProxMox users so this is a welcome addition to those that are using it for containers. :slight_smile:

1 Like

Glad to help.
Thank you very much for considering this.

Keep on good work.

Regards