// +build linux

package machineid

import "io/ioutil"

func getMachineID() (s string, err error) {
	paths := []string{
		"/var/lib/dbus/machine-id",
		"/etc/machine-id",
		"/proc/sys/kernel/random/uuid",
	}
	var (
		buf []byte
	)
	for _, p := range paths {
		if buf, err = ioutil.ReadFile(p); err == nil {
			s = string(buf)
			break
		}
	}
	return
}
