mirror of
https://github.com/home-assistant/operating-system.git
synced 2025-07-24 13:36:31 +00:00
Add OS agent (#1269)
* Add OS Agent * Do go vendoring as part of the buildroot build * Allow to skip confirmation in datactl
This commit is contained in:
parent
55f8704523
commit
0a2fdf47b3
@ -6,3 +6,4 @@ source "$BR2_EXTERNAL_HASSOS_PATH/package/qemu-guest-agent/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/intel-e1000e/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/rpi-eeprom/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/rtl8812au/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/os-agent/Config.in"
|
||||
|
@ -39,6 +39,7 @@ BR2_PACKAGE_JQ=y
|
||||
BR2_PACKAGE_E2FSPROGS=y
|
||||
BR2_PACKAGE_E2FSPROGS_E2IMAGE=y
|
||||
BR2_PACKAGE_SQUASHFS=y
|
||||
BR2_PACKAGE_OS_AGENT=y
|
||||
BR2_PACKAGE_LINUX_FIRMWARE=y
|
||||
BR2_PACKAGE_LINUX_FIRMWARE_USB_SERIAL_TI=y
|
||||
BR2_PACKAGE_RPI_FIRMWARE=y
|
||||
|
4
buildroot-external/package/os-agent/Config.in
Normal file
4
buildroot-external/package/os-agent/Config.in
Normal file
@ -0,0 +1,4 @@
|
||||
config BR2_PACKAGE_OS_AGENT
|
||||
bool "Home Assistant OS Agent"
|
||||
help
|
||||
Install the Home Assistant OS Agent
|
27
buildroot-external/package/os-agent/os-agent.mk
Normal file
27
buildroot-external/package/os-agent/os-agent.mk
Normal file
@ -0,0 +1,27 @@
|
||||
################################################################################
|
||||
#
|
||||
# foo
|
||||
#
|
||||
################################################################################
|
||||
|
||||
OS_AGENT_VERSION = 0cb548c6acfb7e0a9542e6c85ffbce626af04cce
|
||||
OS_AGENT_SITE = $(call github,home-assistant,os-agent,$(OS_AGENT_VERSION))
|
||||
OS_AGENT_LICENSE = Apache License 2.0
|
||||
OS_AGENT_LICENSE_FILES = LICENSE
|
||||
OS_AGENT_GOMOD = github.com/home-assistant/os-agent
|
||||
|
||||
define OS_AGENT_INSTALL_INIT_SYSTEMD
|
||||
$(INSTALL) -D -m 0644 $(@D)/contrib/io.homeassistant.conf \
|
||||
$(TARGET_DIR)/etc/dbus-1/system.d/io.homeassistant.conf
|
||||
$(INSTALL) -D -m 0644 $(@D)/contrib/haos-agent.service \
|
||||
$(TARGET_DIR)/usr/lib/systemd/system/haos-agent.service
|
||||
endef
|
||||
|
||||
define OS_AGENT_GO_VENDORING
|
||||
(cd $(@D); \
|
||||
$(HOST_DIR)/bin/go mod vendor)
|
||||
endef
|
||||
|
||||
OS_AGENT_POST_PATCH_HOOKS += OS_AGENT_GO_VENDORING
|
||||
|
||||
$(eval $(golang-package))
|
@ -28,12 +28,14 @@ if [ "${1}" = "move" ] && [ -e "${2}" ]; then
|
||||
fi
|
||||
|
||||
# Flag device
|
||||
echo "WARNING: All partitions on ${NEW_DEVICE_ROOT} will be deleted!"
|
||||
printf "Enter \"yes\" to confirm: "
|
||||
read -r confirm
|
||||
if [ "${confirm}" != "yes" ]; then
|
||||
echo "Aborting."
|
||||
exit 1
|
||||
if [ -z "${DATACTL_NOCONFIRM}" ]; then
|
||||
echo "WARNING: All partitions on ${NEW_DEVICE_ROOT} will be deleted!"
|
||||
printf "Enter \"yes\" to confirm: "
|
||||
read -r confirm
|
||||
if [ "${confirm}" != "yes" ]; then
|
||||
echo "Aborting."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Create GPT partition table with a single data partition
|
||||
|
Loading…
x
Reference in New Issue
Block a user