From 612660de66653991395896c952228c457c344ba4 Mon Sep 17 00:00:00 2001 From: consp Date: Mon, 16 May 2022 21:28:18 +0200 Subject: [PATCH] Fix 'remove: ' in zpool status by ignoring it, the same for nvme drives in ledctl --- leds.go | 3 +++ zparse.go | 2 ++ 2 files changed, 5 insertions(+) diff --git a/leds.go b/leds.go index d2a75c4..56997a6 100644 --- a/leds.go +++ b/leds.go @@ -153,6 +153,9 @@ func setDevLeds(devandled map[string]ibpiID) { notify.Print(notifier.DEBUG, "skipping missing device LED: ", dev) continue } + if strings.Contains(devled.path, "nvme") { + continue + } // reset unknown status to normal if devled.state == IBPI_UNKNOWN { devled.state = IBPI_NORMAL diff --git a/zparse.go b/zparse.go index 22143ba..0019e66 100644 --- a/zparse.go +++ b/zparse.go @@ -288,6 +288,8 @@ func parseZpoolStatus(zpoolStatusOutput string) (pools []*PoolType, err error) { poolinfostr = "" pools = append(pools, curpool) s = stSTART + case line[:8] == "remove: ": + continue default: notify.Printf(notifier.CRIT, "invalid line %d in status output: %s", lineno+1, line) notify.Attach(notifier.CRIT, zpoolStatusOutput)