mirror of
https://github.com/home-assistant/operating-system.git
synced 2025-07-28 07:26:28 +00:00
Add support for new config shema
This commit is contained in:
parent
8d7608d6c8
commit
42f195e91c
@ -12,15 +12,24 @@ mount -o ro LABEL="hassos-config" /mnt/config
|
|||||||
|
|
||||||
##
|
##
|
||||||
# NetworkManager
|
# NetworkManager
|
||||||
if ls /mnt/config/network-* > /dev/null; then
|
if [ -d /mnt/config/network ]; then
|
||||||
echo "[Info] Update NetworkManager connections!"
|
echo "[Info] Update NetworkManager connections!"
|
||||||
|
|
||||||
rm -rf /etc/NetworkManager/system-connections/*
|
rm -rf /etc/NetworkManager/system-connections/*
|
||||||
cp -f /mnt/config/network-* /etc/NetworkManager/system-connections/
|
cp -f /mnt/config/network/* /etc/NetworkManager/system-connections/
|
||||||
|
|
||||||
nmcli con reload || true
|
nmcli con reload || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
##
|
||||||
|
# Modules
|
||||||
|
if [ -d /mnt/config/modules ]; then
|
||||||
|
echo "[Info] Update Modules configuration!"
|
||||||
|
|
||||||
|
rm -rf /etc/modules-load.d/*
|
||||||
|
cp -f /mnt/config/modules/* /etc/modules-load.d/*
|
||||||
|
fi
|
||||||
|
|
||||||
##
|
##
|
||||||
# SSH know hosts
|
# SSH know hosts
|
||||||
if [ -f /mnt/config/known_hosts ]; then
|
if [ -f /mnt/config/known_hosts ]; then
|
||||||
@ -32,7 +41,12 @@ fi
|
|||||||
|
|
||||||
##
|
##
|
||||||
# Firmware update
|
# Firmware update
|
||||||
|
if ls /mnt/config/*.rauc > /dev/null; then
|
||||||
|
echo "[Info] Performe a firmware update"
|
||||||
|
|
||||||
|
rauc_filename=$(ls /mnt/config/*.rauc | head -n 1)
|
||||||
|
rauc install /mnt/config/$rauc_filename
|
||||||
|
fi
|
||||||
|
|
||||||
# Cleanup config partition
|
# Cleanup config partition
|
||||||
umount /mnt/config
|
umount /mnt/config
|
||||||
|
Loading…
x
Reference in New Issue
Block a user