Skip to content

Commit

Permalink
Improve log clarity and fix typos (#3896)
Browse files Browse the repository at this point in the history
  • Loading branch information
pisanvs authored Feb 25, 2025
1 parent 714ca8a commit bdcc2b9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion buildroot-external/rootfs-overlay/usr/sbin/hassos-cli
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ while [ ! "$(docker ps -q -f name=hassio_cli)" ]; do
sleep 1
i=$((i+1))
if [ $i = 60 ]; then
echo "[WARN] Home Assistant CLI not starting! Jump into emergency console..."
echo "[WARN] Home Assistant CLI not starting! Jumping into emergency console..."
exec /bin/ash -l
fi
done
Expand Down
9 changes: 5 additions & 4 deletions buildroot-external/rootfs-overlay/usr/sbin/hassos-config
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ USE_USB=0

# Check and mount usb CONFIG to folder
if findfs LABEL="CONFIG" > /dev/null 2>&1; then
echo "[Info] Use USB stick for import CONFIG"
echo "[Info] Attempting to import CONFIG from USB stick"

systemctl start mnt-config.mount
if ! systemctl -q is-active mnt-config.mount; then
Expand All @@ -21,13 +21,14 @@ fi

# Use boot CONFIG folder
if [ ${USE_USB} = 0 ] && [ -d ${BOOT_CONFIG} ]; then
echo "[Info] Use boot partition for import CONFIG"
echo "[Info] Attempting to import CONFIG from boot partition"
CONFIG_DIR=${BOOT_CONFIG}
elif [ ${USE_USB} = 0 ]; then
echo "[Warning] No config partition found"
exit 0
fi

echo "[Info] Imported CONFIG succesfully"

##
# NetworkManager
Expand Down Expand Up @@ -97,15 +98,15 @@ fi
# Firmware update / Only USB
UPTIME=$(awk '{printf "%0.f", $1}' /proc/uptime)
if ls ${USB_CONFIG}/*.raucb > /dev/null 2>&1 && [ "${UPTIME}" -ge "300" ]; then
echo "[Info] Performe a firmware update"
echo "[Info] Performing a firmware update"

# shellcheck disable=SC2012
rauc_filename=$(ls ${USB_CONFIG}/*.raucb | head -n 1)
if rauc install "${rauc_filename}"; then
echo "[Info] Firmware update success"
systemctl reboot
else
echo "[Error] Firmware update fails"
echo "[Error] Firmware update failed"
fi
fi

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ if [ -z "${SUPERVISOR_IMAGE_ID}" ]; then
# Pull failed, updater info might be corrupted or the release might have
# been removed from the container registry, delete the updater info
# to start from scratch on next try.
echo "[ERROR] Supervisor downloading failed."
echo "[ERROR] Supervisor download failed."
rm -f "${SUPERVISOR_DATA}/updater.json"
exit 1
fi
Expand Down

0 comments on commit bdcc2b9

Please sign in to comment.