mirror of
https://github.com/home-assistant/operating-system.git
synced 2025-07-26 14:36:30 +00:00
Improve log clarity and fix typos (#3896)
This commit is contained in:
parent
714ca8a344
commit
bdcc2b90d5
@ -10,7 +10,7 @@ while [ ! "$(docker ps -q -f name=hassio_cli)" ]; do
|
|||||||
sleep 1
|
sleep 1
|
||||||
i=$((i+1))
|
i=$((i+1))
|
||||||
if [ $i = 60 ]; then
|
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
|
exec /bin/ash -l
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
@ -7,7 +7,7 @@ USE_USB=0
|
|||||||
|
|
||||||
# Check and mount usb CONFIG to folder
|
# Check and mount usb CONFIG to folder
|
||||||
if findfs LABEL="CONFIG" > /dev/null 2>&1; then
|
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
|
systemctl start mnt-config.mount
|
||||||
if ! systemctl -q is-active mnt-config.mount; then
|
if ! systemctl -q is-active mnt-config.mount; then
|
||||||
@ -21,13 +21,14 @@ fi
|
|||||||
|
|
||||||
# Use boot CONFIG folder
|
# Use boot CONFIG folder
|
||||||
if [ ${USE_USB} = 0 ] && [ -d ${BOOT_CONFIG} ]; then
|
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}
|
CONFIG_DIR=${BOOT_CONFIG}
|
||||||
elif [ ${USE_USB} = 0 ]; then
|
elif [ ${USE_USB} = 0 ]; then
|
||||||
echo "[Warning] No config partition found"
|
echo "[Warning] No config partition found"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "[Info] Imported CONFIG succesfully"
|
||||||
|
|
||||||
##
|
##
|
||||||
# NetworkManager
|
# NetworkManager
|
||||||
@ -97,7 +98,7 @@ fi
|
|||||||
# Firmware update / Only USB
|
# Firmware update / Only USB
|
||||||
UPTIME=$(awk '{printf "%0.f", $1}' /proc/uptime)
|
UPTIME=$(awk '{printf "%0.f", $1}' /proc/uptime)
|
||||||
if ls ${USB_CONFIG}/*.raucb > /dev/null 2>&1 && [ "${UPTIME}" -ge "300" ]; then
|
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
|
# shellcheck disable=SC2012
|
||||||
rauc_filename=$(ls ${USB_CONFIG}/*.raucb | head -n 1)
|
rauc_filename=$(ls ${USB_CONFIG}/*.raucb | head -n 1)
|
||||||
@ -105,7 +106,7 @@ if ls ${USB_CONFIG}/*.raucb > /dev/null 2>&1 && [ "${UPTIME}" -ge "300" ]; then
|
|||||||
echo "[Info] Firmware update success"
|
echo "[Info] Firmware update success"
|
||||||
systemctl reboot
|
systemctl reboot
|
||||||
else
|
else
|
||||||
echo "[Error] Firmware update fails"
|
echo "[Error] Firmware update failed"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ if [ -z "${SUPERVISOR_IMAGE_ID}" ]; then
|
|||||||
# Pull failed, updater info might be corrupted or the release might have
|
# Pull failed, updater info might be corrupted or the release might have
|
||||||
# been removed from the container registry, delete the updater info
|
# been removed from the container registry, delete the updater info
|
||||||
# to start from scratch on next try.
|
# to start from scratch on next try.
|
||||||
echo "[ERROR] Supervisor downloading failed."
|
echo "[ERROR] Supervisor download failed."
|
||||||
rm -f "${SUPERVISOR_DATA}/updater.json"
|
rm -f "${SUPERVISOR_DATA}/updater.json"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user