mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-04-05 21:56:27 +02:00
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>
This commit is contained in:
committed by
GitHub
parent
b5a1b54555
commit
c5be20a4c3
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user