From 82935916cffaba6c9867f5c1e223adb8b3a238e7 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Fri, 2 Aug 2024 15:00:43 +0200 Subject: [PATCH] Redirect stderr of parted to file parted.error Otherwise executing `parted -s /dev/nvme0n1 print` might throw something like this for empty disks: Error: /dev/nvme0n1: unrecognized disk label Related to grml/grml-hwinfo#12 --- grml-hwinfo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grml-hwinfo b/grml-hwinfo index 70ef14e..f5f398a 100755 --- a/grml-hwinfo +++ b/grml-hwinfo @@ -536,7 +536,7 @@ cd "${OUTDIR}" || exit 1 if exectest parted ; then echo -e "parted -s /dev/${disk}:\n" >> parted - parted -s "/dev/$disk" print >> ./parted + parted -s "/dev/$disk" print >> ./parted 2>> ./parted.error echo -e "\n\n" >> parted fi