From 9f23bddfc6c1cab8330e7db59ccf7919b0295377 Mon Sep 17 00:00:00 2001 From: Christian Goll Date: Wed, 21 Sep 2022 19:25:34 +0200 Subject: [PATCH] assume that there is just one primary netdev --- internal/app/wwctl/ssh/main.go | 9 --------- 1 file changed, 9 deletions(-) diff --git a/internal/app/wwctl/ssh/main.go b/internal/app/wwctl/ssh/main.go index c73ff7db..5bc39d82 100644 --- a/internal/app/wwctl/ssh/main.go +++ b/internal/app/wwctl/ssh/main.go @@ -38,20 +38,11 @@ func CobraRunE(cmd *cobra.Command, args []string) error { cmd.Usage() os.Exit(1) } - globalPrimary := "" for _, node := range nodes { var primaryNet string - if _, ok := node.NetDevs[globalPrimary]; ok { - if node.NetDevs[globalPrimary].Primary.GetB() { - primaryNet = globalPrimary - } - } for netName := range node.NetDevs { if node.NetDevs[netName].Primary.GetB() { primaryNet = netName - if globalPrimary == "" { - globalPrimary = netName - } break } }