Skip to content

Commit

Permalink
Redirect stderr of parted to file parted.error
Browse files Browse the repository at this point in the history
Otherwise executing `parted -s /dev/nvme0n1 print` might throw something
like this for empty disks:

  Error: /dev/nvme0n1: unrecognized disk label

Related to #12
  • Loading branch information
mika committed Aug 2, 2024
1 parent 6bfd6dd commit 8293591
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion grml-hwinfo
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 8293591

Please sign in to comment.