added machine type select
This commit is contained in:
parent
5b93bc93d9
commit
ad3ff121f6
3 changed files with 21 additions and 3 deletions
0
homeassistant-supervised/DEBIAN/control
Normal file → Executable file
0
homeassistant-supervised/DEBIAN/control
Normal file → Executable file
|
@ -3,6 +3,7 @@ set -e
|
||||||
function info { echo -e "\e[32m[info] $*\e[39m"; }
|
function info { echo -e "\e[32m[info] $*\e[39m"; }
|
||||||
function warn { echo -e "\e[33m[warn] $*\e[39m"; }
|
function warn { echo -e "\e[33m[warn] $*\e[39m"; }
|
||||||
function error { echo -e "\e[31m[error] $*\e[39m"; exit 1; }
|
function error { echo -e "\e[31m[error] $*\e[39m"; exit 1; }
|
||||||
|
. /usr/share/debconf/confmodule
|
||||||
ARCH=$(uname -m)
|
ARCH=$(uname -m)
|
||||||
|
|
||||||
BINARY_DOCKER=/usr/bin/docker
|
BINARY_DOCKER=/usr/bin/docker
|
||||||
|
@ -44,19 +45,32 @@ case $ARCH in
|
||||||
;;
|
;;
|
||||||
"arm" |"armv6l")
|
"arm" |"armv6l")
|
||||||
if [ -z $MACHINE ]; then
|
if [ -z $MACHINE ]; then
|
||||||
error "Please set machine for $ARCH"
|
db_input critical ha/machine-type | true
|
||||||
|
db_go || true
|
||||||
|
db_get ha/machine-type || true
|
||||||
|
MACHINE="$RET"
|
||||||
|
db_stop
|
||||||
fi
|
fi
|
||||||
HASSIO_DOCKER="$DOCKER_REPO/armhf-hassio-supervisor"
|
HASSIO_DOCKER="$DOCKER_REPO/armhf-hassio-supervisor"
|
||||||
;;
|
;;
|
||||||
"armv7l")
|
"armv7l")
|
||||||
if [ -z $MACHINE ]; then
|
if [ -z $MACHINE ]; then
|
||||||
error "Please set machine for $ARCH"
|
db_input critical ha/machine-type | true
|
||||||
|
db_go || true
|
||||||
|
db_get ha/machine-type || true
|
||||||
|
MACHINE="$RET"
|
||||||
|
db_stop
|
||||||
fi
|
fi
|
||||||
HASSIO_DOCKER="$DOCKER_REPO/armv7-hassio-supervisor"
|
HASSIO_DOCKER="$DOCKER_REPO/armv7-hassio-supervisor"
|
||||||
;;
|
;;
|
||||||
"aarch64")
|
"aarch64")
|
||||||
if [ -z $MACHINE ]; then
|
if [ -z $MACHINE ]; then
|
||||||
error "Please set machine for $ARCH"
|
db_input critical ha/machine-type | true
|
||||||
|
db_go || true
|
||||||
|
db_get ha/machine-type || true
|
||||||
|
MACHINE="$RET"
|
||||||
|
db_stop
|
||||||
|
|
||||||
fi
|
fi
|
||||||
HASSIO_DOCKER="$DOCKER_REPO/aarch64-hassio-supervisor"
|
HASSIO_DOCKER="$DOCKER_REPO/aarch64-hassio-supervisor"
|
||||||
;;
|
;;
|
||||||
|
|
4
homeassistant-supervised/DEBIAN/templates
Executable file
4
homeassistant-supervised/DEBIAN/templates
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
Template: ha/machine-type
|
||||||
|
Type: Select
|
||||||
|
Choices: generic-x86-64, odroid-c2, odroid-n2, odroid-xu, qemuarm, qemuarm-64, qemux86, qemux86-64, raspberrypi, raspberrypi2, raspberrypi3, raspberrypi4, raspberrypi3-64, raspberrypi4-64, tinker, khadas-vim3
|
||||||
|
Description: Select machine type
|
Loading…
Reference in a new issue