summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/rs/xid/hostid_linux.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2021-04-03 19:16:46 +0200
committerGitHub <noreply@github.com>2021-04-03 19:16:46 +0200
commit21eb37e471c338a90f2e23c86106f7e49e2d1196 (patch)
treee7d1cfa89f31fcf0578edae7727f2230bba744a2 /vendor/github.com/rs/xid/hostid_linux.go
parentd3b60cc445e5871971b543fde9483dba3924bf68 (diff)
downloadmatterbridge-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.go5
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
}