Skip to content

Start Script Assumes Interface Name #5

Description

@vjkoskela

The script base/usr/local/sbin/homeseer assumes that the default network interface eth0 exists. On my system the default interface is bond0. I am having to run in host networking mode since multiple devices/plugins that I must depend on require UDP broadcast which is not supported without host networking mode.

Consequently, this command fails and I get an error starting up Homeseer:

ep 07 16:11:47 server docker[32944]: **********************************************************************
Sep 07 16:11:47 server docker[32944]:  HOMESEER CONTAINER - INITIALIZE
Sep 07 16:11:47 server docker[32944]: **********************************************************************
Sep 07 16:11:47 server docker[32944]: [1B blob data]
Sep 07 16:11:47 server docker[32944]:     1 pts/0    00:00:00 homeseer
Sep 07 16:11:47 server docker[32944]: [1B blob data]
Sep 07 16:11:47 server docker[32944]: **********************************************************************
Sep 07 16:11:47 server docker[32944]:  HOMESEER CONTAINER - IP ADDRESS
Sep 07 16:11:47 server docker[32944]: **********************************************************************
Sep 07 16:11:47 server docker[32944]: [1B blob data]
Sep 07 16:11:47 server docker[32944]: eth0: error fetching interface information: Device not found
Sep 07 16:11:48 server systemd[1]: homeseer.service: Main process exited, code=exited, status=1/FAILURE
Sep 07 16:11:48 server docker[33051]: homeseer.service
Sep 07 16:11:48 server systemd[1]: homeseer.service: Failed with result 'exit-code'.
Sep 07 16:11:48 server systemd[1]: homeseer.service: Service hold-off time over, scheduling restart.
Sep 07 16:11:48 server systemd[1]: homeseer.service: Scheduled restart job, restart counter is at 1.
Sep 07 16:11:48 server systemd[1]: Stopped homeseer.
Sep 07 16:11:48 server systemd[1]: Started homeseer.

Could this be accepted as an environment variable? (with a default to eth0)

Although it's unclear what the purpose of simply invoking ifconfig is, this will just output the interface information but not do anything with it. If it's for informational purposes, then perhaps it would be better to dump all interfaces? Or ignore if the command fails?

Happy to submit a pull request.

Ref:
https://github.com/HomeSeerLinux/homeseer-docker/blob/6d2f5d72c32d9e1a110491ac8f37adfeaea5ebb7/base/usr/local/sbin/homeseer#L57C3-L57C16

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions