[PATCH] Support nullglob in profile.sh.in
Dmitry V. Levin
ldv@altlinux.org
Mon May 13 12:19:50 GMT 2024
On Mon, May 13, 2024 at 02:04:04PM +0200, Andreas Schwab wrote:
> Don't block on stdin when /etc/debuginfod/*.certpath expands to nothing.
>
> Signed-off-by: Andreas Schwab <schwab@suse.de>
> ---
> config/profile.sh.in | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/config/profile.sh.in b/config/profile.sh.in
> index 911c7a43..5e86f433 100644
> --- a/config/profile.sh.in
> +++ b/config/profile.sh.in
> @@ -11,7 +11,7 @@ if [ -z "$DEBUGINFOD_URLS" ]; then
> fi
>
> if [ -z "$DEBUGINFOD_IMA_CERT_PATH" ]; then
> - DEBUGINFOD_IMA_CERT_PATH=$(cat "@sysconfdir@/debuginfod"/*.certpath 2>/dev/null | tr '\n' ':' || :)
> + DEBUGINFOD_IMA_CERT_PATH=$(cat /dev/null "@sysconfdir@/debuginfod"/*.certpath 2>/dev/null | tr '\n' ':' || :)
> [ -n "$DEBUGINFOD_IMA_CERT_PATH" ] && export DEBUGINFOD_IMA_CERT_PATH || unset DEBUGINFOD_IMA_CERT_PATH
> fi
> unset prefix
I slightly prefer "cat </dev/null" idiom as it stronger highlights the intent
but this variant is also fine.
--
ldv
More information about the Elfutils-devel
mailing list