[openwrt/openwrt] base-files: Ignore exit code of uci.sh inclusion
LEDE Commits
lede-commits at lists.infradead.org
Fri Jun 7 12:49:16 PDT 2024
aparcar pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/17d8c5825e6f5c5d2e4d2c320c3b4b797f4ca0e9
commit 17d8c5825e6f5c5d2e4d2c320c3b4b797f4ca0e9
Author: Paul Spooren <mail at aparcar.org>
AuthorDate: Fri Jun 7 16:26:14 2024 +0200
base-files: Ignore exit code of uci.sh inclusion
When running unit tests this causes trouble since `/lib/config/uci.sh`
isn't available in those cases. Instead exit with a clean status fo the
unit test framework don't wrongly interpret things as an error.
Signed-off-by: Paul Spooren <mail at aparcar.org>
---
package/base-files/files/lib/functions.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh
index a009aa81e9..0fc8c07d1a 100644
--- a/package/base-files/files/lib/functions.sh
+++ b/package/base-files/files/lib/functions.sh
@@ -533,4 +533,4 @@ cmdline_get_var() {
done
}
-[ -z "$IPKG_INSTROOT" ] && [ -f /lib/config/uci.sh ] && . /lib/config/uci.sh
+[ -z "$IPKG_INSTROOT" ] && ( [ -f /lib/config/uci.sh ] && . /lib/config/uci.sh ) || true
More information about the lede-commits
mailing list