Skip to content

Commit

Permalink
Merge pull request #85 from Broot-bite/test-order-machineID
Browse files Browse the repository at this point in the history
Sorted the order of file paths
  • Loading branch information
def committed May 20, 2024
2 parents fb023bb + bb35b99 commit 97d36da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func uname() (string, string, error) {
}

func machineID() string {
for _, p := range []string{"sys/devices/virtual/dmi/id/product_uuid", "etc/machine-id", "var/lib/dbus/machine-id"} {
for _, p := range []string{"etc/machine-id", "var/lib/dbus/machine-id", "sys/devices/virtual/dmi/id/product_uuid"} {
payload, err := os.ReadFile(path.Join("/proc/1/root", p))
if err != nil {
klog.Warningln("failed to read machine-id:", err)
Expand Down

0 comments on commit 97d36da

Please sign in to comment.