Rename OS (#16)

Rename OS
This commit is contained in:
Pascal Vizeli
2018-05-14 22:37:39 +02:00
committed by GitHub
parent 4577d01a46
commit 3a5d2de705
82 changed files with 216 additions and 215 deletions

View File

@@ -0,0 +1,38 @@
#!/bin/sh
set -e
# Check if hassos-config is present
if ! findfs LABEL="hassos-config" > /dev/null; then
echo "[Warning] No hassos-config partition found!"
exit 0
fi
# Mount config partition
mount -o ro LABEL="hassos-config" /mnt/config
##
# NetworkManager
if ls /mnt/config/network-* > /dev/null; then
echo "[Info] Update NetworkManager connections!"
rm -rf /etc/NetworkManager/system-connections/*
cp -f /mnt/config/network-* /etc/NetworkManager/system-connections/
nmcli con reload || true
fi
##
# 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