Log efibootmgr errors to efibootmgr.error
authorMichael Prokop <mika@grml.org>
Fri, 5 Mar 2021 16:30:39 +0000 (17:30 +0100)
committerMichael Prokop <mika@grml.org>
Fri, 5 Mar 2021 16:36:44 +0000 (17:36 +0100)
On non-UEFI systems, we get an ugly error message:

| root@grml ~ # efibootmgr -v >/dev/null
| Could not parse device path: Invalid argument

Instead log stderr output to efibootmgr.error

grml-hwinfo

index ab2b295..4e1d9d5 100755 (executable)
@@ -241,7 +241,7 @@ cd "${OUTDIR}" || exit 1
   exectest lscpu    && lscpu -e > ./lscpu_extended
 
   # EFI
-  exectest efibootmgr && efibootmgr -v > efibootmgr
+  exectest efibootmgr && efibootmgr -v >efibootmgr 2>efibootmgr.error
 
   # net stuff, net-tools:
   exectest ifconfig && ifconfig -v -a > ./ifconfig