From c5be20a4c3a2d002f0702759588f5328ea8a757c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 2 Apr 2026 14:23:59 +0000 Subject: [PATCH 1/2] Fix BusyBox grep -Z incompatibility in 00-banner.sh and fix bash vs source in maintainerr ha_entrypoint.sh Agent-Logs-Url: https://github.com/alexbelgium/hassio-addons/sessions/76d4cd88-b038-47fa-9de0-71afaf1dd19b Co-authored-by: alexbelgium <44178713+alexbelgium@users.noreply.github.com> --- .templates/00-banner.sh | 4 ++-- maintainerr/rootfs/ha_entrypoint.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.templates/00-banner.sh b/.templates/00-banner.sh index 5ecba7c1f..ab9b37769 100755 --- a/.templates/00-banner.sh +++ b/.templates/00-banner.sh @@ -17,8 +17,8 @@ if ! bashio::supervisor.ping 2>/dev/null; then bashio::log.blue "Config source: ENV + /data/options.json" bashio::log.blue '-----------------------------------------------------------' cp -rf /usr/local/lib/bashio-standalone.sh /usr/bin/bashio - grep -rlZ "^#!.*bashio" /etc | - while IFS= read -r -d '' f; do + grep -rl "^#!.*bashio" /etc | + while IFS= read -r f; do grep -qF "source /usr/local/lib/bashio-standalone.sh" "$f" && continue sed -i '1a source /usr/local/lib/bashio-standalone.sh' "$f" done diff --git a/maintainerr/rootfs/ha_entrypoint.sh b/maintainerr/rootfs/ha_entrypoint.sh index 95b2b361f..c37814804 100755 --- a/maintainerr/rootfs/ha_entrypoint.sh +++ b/maintainerr/rootfs/ha_entrypoint.sh @@ -21,7 +21,7 @@ if [ -d /etc/cont-init.d ]; then # Source the script so it inherits bashio functions from bashio-standalone. # Using bash "$script" would spawn a new process without bashio:: functions, # causing "command not found" failures under set -e. - bash "$script" + source "$script" done fi From dcc5784e1a7500d905a590fedab2b2f50f67c6e1 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Thu, 2 Apr 2026 16:58:35 +0200 Subject: [PATCH 2/2] Update maintainerr/rootfs/ha_entrypoint.sh Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- maintainerr/rootfs/ha_entrypoint.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/maintainerr/rootfs/ha_entrypoint.sh b/maintainerr/rootfs/ha_entrypoint.sh index c37814804..b252544c8 100755 --- a/maintainerr/rootfs/ha_entrypoint.sh +++ b/maintainerr/rootfs/ha_entrypoint.sh @@ -21,6 +21,7 @@ if [ -d /etc/cont-init.d ]; then # Source the script so it inherits bashio functions from bashio-standalone. # Using bash "$script" would spawn a new process without bashio:: functions, # causing "command not found" failures under set -e. + # shellcheck disable=SC1090 source "$script" done fi