mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-26 02:26:30 +00:00
Downgrade protect
This commit is contained in:
parent
60b840df67
commit
2ebf1ebb87
@ -228,6 +228,13 @@ if [ $HASSIO_VERSION == $HOSTOS_VERSION ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# protect downgrade
|
||||
downgrade=$(awk -vn1=$HASSIO_VERSION -vn2=$HOSTOS_VERSION 'BEGIN{print (n1<n2) ? 0:1}')
|
||||
if [ $downgrade == 1 ]; then
|
||||
log ERROR "Downgrade are not supported"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Detect DATA_MOUNTPOINT
|
||||
if [ -d /mnt/data ]; then
|
||||
DATA_MOUNTPOINT=/mnt/data
|
||||
|
Loading…
x
Reference in New Issue
Block a user