diff --git a/node.go b/node.go index 480ac0d..216ee3a 100644 --- a/node.go +++ b/node.go @@ -6,11 +6,8 @@ package sysinfo import ( "bufio" - "crypto/rand" - "fmt" "os" "strings" - "time" ) // Node information. @@ -58,19 +55,6 @@ func (si *SysInfo) getSetMachineID() { si.Node.MachineID = systemdMachineID return } - - // Generate and write fresh new machine ID to both locations, conforming to the DBUS specification: - // https://dbus.freedesktop.org/doc/dbus-specification.html#uuids - - random := make([]byte, 12) - if _, err := rand.Read(random); err != nil { - return - } - newMachineID := fmt.Sprintf("%x%x", random, time.Now().Unix()) - - spewFile(pathSystemdMachineID, newMachineID, 0444) - spewFile(pathDbusMachineID, newMachineID, 0444) - si.Node.MachineID = newMachineID } func (si *SysInfo) getTimezone() {