mirror of
https://github.com/cwinfo/matterbridge.git
synced 2025-07-06 10:44:04 +00:00
5
vendor/github.com/rs/xid/hostid_linux.go
generated
vendored
5
vendor/github.com/rs/xid/hostid_linux.go
generated
vendored
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user