Change name from PCI+USB to HW Location and set it as default
This commit is contained in:
parent
5cdea1d6dd
commit
8b2f6ee3fe
6
main.go
6
main.go
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user