Check Support
This commit is contained in:
parent
51a506a494
commit
fdff7ead89
1 changed files with 12 additions and 4 deletions
|
@ -10,6 +10,18 @@ warn "Home Assistant as a VM or run Home Assistant Core"
|
|||
warn "via a Docker container."
|
||||
warn ""
|
||||
|
||||
# Check if we are running on a supported OS
|
||||
CURRENT_OS=$(lsb_release -d)
|
||||
if [[ $CURRENT_OS != *"Debian GNU/Linux 11 (bullseye)"* ]]; then
|
||||
error "Unsupported OS: $CURRENT_OS"
|
||||
fi
|
||||
|
||||
# Check if we are running on a supported architecture
|
||||
ARCH=$(uname -m)
|
||||
if [[ ! "i386|i686|x86_64|arm|armv6l|armv7l|aarch64" == *"$ARCH"* ]]; then
|
||||
error "${ARCH} is not supported!"
|
||||
fi
|
||||
|
||||
# Check if Modem Manager is enabled
|
||||
if systemctl is-enabled ModemManager.service &> /dev/null; then
|
||||
warn "ModemManager service is enabled. This might cause issue when using serial devices."
|
||||
|
@ -22,10 +34,6 @@ if [[ "$(sysctl --values kernel.dmesg_restrict)" != "0" ]]; then
|
|||
echo "kernel.dmesg_restrict=0" >> /etc/sysctl.conf
|
||||
fi
|
||||
|
||||
ARCH=$(uname -m)
|
||||
if [[ ! "i386|i686|x86_64|arm|armv6l|armv7l|aarch64" == *"$ARCH"* ]]; then
|
||||
error "${ARCH} is not supported!"
|
||||
fi
|
||||
|
||||
|
||||
dpkg-divert --package homeassistant-supervised --add --rename \
|
||||
|
|
Loading…
Reference in a new issue