Foxboron / sbctl

:computer: :lock: :key: Secure Boot key manager
MIT License
1.35k stars 71 forks source link

sbctl verify "does not exist" - entries are not scriptable (in an easy way) #320

Closed fabiscafe closed 4 days ago

fabiscafe commented 5 days ago

recently someone added lots and lots of files the sbctl database where the path changed or that were deleted and so they throw a 'does not exist' warning. A

sbctl verify --quiet

shows all of them. So I wanted to catch the paths and put them further down into a script to remove them/correct the paths. But I was unable to.

Lets say sbctl verify --quiet outputs a line

‼ /efi/EFI/Linux/archlinux-linux-lts-fallback.efi does not exist

This line is not easy to deal with as you can see here: grafik

# sbctl verify --quiet | awk '{ print $2 }'
‼ /efi/EFI/Linux/archlinux-linux-lts-fallback.efi does not exist

# sbctl verify --quiet | cut -d' ' -f2
‼ /efi/EFI/Linux/archlinux-linux-lts-fallback.efi does not exist

# sbctl verify --quiet | sed 's/‼//'
‼ /efi/EFI/Linux/archlinux-linux-lts-fallback.efi does not exist

It might be on my that I miss a very obvious thing here but I have no idea how to deal with this.

Foxboron commented 4 days ago

| acts on stdout. You want &|.

fabiscafe commented 4 days ago

Oh god, thanks! It never came to me that this was put to stderr. :facepalm: