Files
operating-system/buildroot-external/rootfs-overlay/usr/sbin/hassio-config
2018-04-11 16:12:26 +02:00

31 lines
539 B
Bash

#!/bin/sh
set -e
# Check if hassio-config is present
if ! findfs LABEL="hassio-config" > /dev/null; then
echo "[Warning] No hassio-config partition found!"
exit 0
fi
# Mount config partition
mount -o ro LABEL="hassio-config" /mnt/config
##
# NetworkManager
##
# SSH know hosts
if [ -f /mnt/config/known_hosts ]; then
echo "[Info] Update SSH known_hosts!"
cp -f /mnt/config/known_hosts /root/.ssh/known_hosts
chmod 600 /root/.ssh/known_hosts
fi
##
# Firmware update
# Cleanup config partition
umount /mnt/config