Change name from PCI+USB to HW Location and set it as default

This commit is contained in:
Alex D. 2024-08-27 12:08:16 +00:00
parent 5cdea1d6dd
commit 8b2f6ee3fe
Signed by: caskd
GPG Key ID: F92BA85F61F4C173

View File

@ -19,7 +19,7 @@ func main() {
flag.StringVar(&ifnparam, "ifname", "", "Interface name to rename")
flag.BoolVar(&force, "force", false, "Force update name of interface")
flag.BoolVar(&info, "info", false, "Show interface details")
flag.IntVar((*int)(&main), "main", int(IfNameMAC), fmt.Sprintf("Main interface name to use: %v",
flag.IntVar((*int)(&main), "main", int(IfNameLoc), fmt.Sprintf("Main interface name to use: %v",
map[string]IfNameType{
"Kernel": IfNameKern,
"MAC": IfNameMAC,
@ -73,13 +73,13 @@ func main() {
}
if err = cif.ProcLoc(); err != nil {
mainlog.Println("Failed to process interface PCI+USB path:", err)
mainlog.Println("Failed to process interface HW Location path:", err)
}
// Just print information
if info {
mainlog.Println("Selected Interface:", ifname)
mainlog.Println("PCI+USB Name:", cif.names[IfNameLoc])
mainlog.Println("HW Location Name:", cif.names[IfNameLoc])
mainlog.Println("MAC Name:", cif.names[IfNameMAC])
return
}