From 90c4c4811a9c2c9f5929a64cdc5f0e6ce06ffdc8 Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Mon, 13 Mar 2023 14:38:10 +0200 Subject: [PATCH] Fallback to ldconfig if ldconfig.real does not exist Signed-off-by: Evan Lezar --- internal/config/config.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/config/config.go b/internal/config/config.go index e4c12621..9340bb6a 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -173,5 +173,8 @@ func GetDefaultConfigToml() (*toml.Tree, error) { } func getLdConfigPath() string { - return "@/sbin/ldconfig.real" + if _, err := os.Stat("/sbin/ldconfig.real"); err == nil { + return "@/sbin/ldconfig.real" + } + return "@/sbin/ldconfig" }