From c4ba1042aaf55b8718c1392f96cdb481cf982a26 Mon Sep 17 00:00:00 2001 From: Ludvig Michaelsson Date: Fri, 4 Oct 2024 16:40:37 +0200 Subject: [PATCH] udev: use printf for hex conversion Ubuntu 24.04 comes with a version of original-awk that no longer accepts hexadecimal values [1], pipe the field to printf instead. [1] https://github.com/onetrueawk/awk/blob/5c261eb19a5e92bb6d68e818cf575524067c1e6a/awk.1#L626-L628 --- udev/check.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/udev/check.sh b/udev/check.sh index 804a8843..5f2ed131 100755 --- a/udev/check.sh +++ b/udev/check.sh @@ -1,12 +1,12 @@ #!/bin/sh -u -# Copyright (c) 2020 Yubico AB. All rights reserved. +# Copyright (c) 2020-2024 Yubico AB. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. # SPDX-License-Identifier: BSD-2-Clause sort_by_id() { - awk '{ printf "%d\n", $3 }' | sort -Cnu + awk '{ printf "%s\n", $3 }' | xargs printf '%d\n' | sort -Cnu } if ! grep '^vendor' "$1" | sort_by_id; then