From 86c010ff49e8c092345dd9ac28695fa876e8a9d9 Mon Sep 17 00:00:00 2001 From: Carter Dodd Date: Tue, 3 May 2022 09:08:35 -0500 Subject: [PATCH] Use SetNetName instead of SetNetDev when performing netdel --- internal/app/wwctl/profile/set/main.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/app/wwctl/profile/set/main.go b/internal/app/wwctl/profile/set/main.go index f14df079..9ef58ee1 100644 --- a/internal/app/wwctl/profile/set/main.go +++ b/internal/app/wwctl/profile/set/main.go @@ -233,18 +233,18 @@ func CobraRunE(cmd *cobra.Command, args []string) error { } if SetNetDevDel { - if SetNetDev == "" { + if SetNetName == "" { wwlog.Printf(wwlog.ERROR, "You must include the '--netname' option\n") os.Exit(1) } - if _, ok := p.NetDevs[SetNetDev]; !ok { - wwlog.Printf(wwlog.ERROR, "Profile '%s': network Device doesn't exist: %s\n", p.Id.Get(), SetNetDev) + if _, ok := p.NetDevs[SetNetName]; !ok { + wwlog.Printf(wwlog.ERROR, "Profile '%s': network Device doesn't exist: %s\n", p.Id.Get(), SetNetName) os.Exit(1) } - wwlog.Printf(wwlog.VERBOSE, "Profile %s: Deleting network device: %s\n", p.Id.Get(), SetNetDev) - delete(p.NetDevs, SetNetDev) + wwlog.Printf(wwlog.VERBOSE, "Profile %s: Deleting network device: %s\n", p.Id.Get(), SetNetName) + delete(p.NetDevs, SetNetName) } if len(SetTags) > 0 {