package/mender: fix install path for identity and inventory scripts

These scripts are used to generate the device identity and to populate
the the device inventory. The Mender client will call these and at least
the mender-device-identity is required to be present at the correct
location. Inventory scripts are there as an example and not
actually required.

Example output from identity script:

    $ ./mender-device-identity
    mac=de:ad:ca:fe:00:01
    cpuid=1112233

Example output from inventory script:

    $ ./mender-inventory-network
    mac_br-fbfdad18c33c=02:42:7e:74:96:85
    network_interfaces=br-fbfdad18c33c
    ipv4_br-fbfdad18c33c=172.21.0.1/16
    mac_enp0s25=de:ad:be:ef:bb:05
    network_interfaces=enp0s25
    ipv4_enp0s25=123.22.0.197/16
    ipv4_enp0s25=10.20.20.105/16
    ipv6_enp0s25=fe80::2aad:beff:feef:bb05/64

Inventory and device identity data is presented on the Mender server
front-end.

Signed-off-by: Mirza Krak <mirza.krak@northern.tech>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Mirza Krak 2018-08-20 15:09:01 +02:00 committed by Thomas Petazzoni
parent 551454efff
commit 3a9fd97d43

View File

@ -14,12 +14,13 @@ define MENDER_INSTALL_CONFIG_FILES
$(TARGET_DIR)/etc/mender/tenant.conf
$(INSTALL) -D -m 0644 package/mender/server.crt \
$(TARGET_DIR)/etc/mender/server.crt
$(INSTALL) -D -m 0755 package/mender/mender-device-identity \
$(TARGET_DIR)/var/share/mender/identity/mender-device-identity
$(TARGET_DIR)/usr/share/mender/identity/mender-device-identity
$(INSTALL) -D -m 0755 package/mender/mender-inventory-network \
$(TARGET_DIR)/var/share/mender/inventory/mender-inventory-network
$(TARGET_DIR)/usr/share/mender/inventory/mender-inventory-network
$(INSTALL) -D -m 0755 package/mender/mender-inventory-hostinfo \
$(TARGET_DIR)/var/share/mender/inventory/mender-inventory-hostinfo
$(TARGET_DIR)/usr/share/mender/inventory/mender-inventory-hostinfo
endef
MENDER_POST_INSTALL_TARGET_HOOKS += MENDER_INSTALL_CONFIG_FILES