diff options
author | Wim <wim@42.be> | 2021-04-03 19:16:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-03 19:16:46 +0200 |
commit | 21eb37e471c338a90f2e23c86106f7e49e2d1196 (patch) | |
tree | e7d1cfa89f31fcf0578edae7727f2230bba744a2 /vendor/github.com/rs/xid/hostid_linux.go | |
parent | d3b60cc445e5871971b543fde9483dba3924bf68 (diff) | |
download | matterbridge-msglm-21eb37e471c338a90f2e23c86106f7e49e2d1196.tar.gz matterbridge-msglm-21eb37e471c338a90f2e23c86106f7e49e2d1196.tar.bz2 matterbridge-msglm-21eb37e471c338a90f2e23c86106f7e49e2d1196.zip |
Update vendor (#1446)
* Update vendor
* Use upstream emoji lib again
Diffstat (limited to 'vendor/github.com/rs/xid/hostid_linux.go')
-rw-r--r-- | vendor/github.com/rs/xid/hostid_linux.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/vendor/github.com/rs/xid/hostid_linux.go b/vendor/github.com/rs/xid/hostid_linux.go index 7d0c4a9e..837b2043 100644 --- a/vendor/github.com/rs/xid/hostid_linux.go +++ b/vendor/github.com/rs/xid/hostid_linux.go @@ -5,6 +5,9 @@ package xid import "io/ioutil" func readPlatformMachineID() (string, error) { - b, err := ioutil.ReadFile("/sys/class/dmi/id/product_uuid") + b, err := ioutil.ReadFile("/etc/machine-id") + if err != nil || len(b) == 0 { + b, err = ioutil.ReadFile("/sys/class/dmi/id/product_uuid") + } return string(b), err } |