mirror of
https://github.com/home-assistant/operating-system.git
synced 2025-07-27 23:16:31 +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
|
||||
if ls /mnt/config/network-* > /dev/null; then
|
||||
if [ -d /mnt/config/network ]; then
|
||||
echo "[Info] Update NetworkManager 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
|
||||
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
|
||||
if [ -f /mnt/config/known_hosts ]; then
|
||||
@ -32,7 +41,12 @@ fi
|
||||
|
||||
##
|
||||
# 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
|
||||
umount /mnt/config
|
||||
|
Loading…
x
Reference in New Issue
Block a user