From 5c05ed284bee169bbbd8d87f25732e0d3b11a8de Mon Sep 17 00:00:00 2001 From: Mikita Iwanowski Date: Sat, 14 Dec 2024 01:41:05 +0100 Subject: [PATCH] debug: machine-id detector --- providers/os/connection/device/device_connection.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/providers/os/connection/device/device_connection.go b/providers/os/connection/device/device_connection.go index 13c3328ad..2ec6d408f 100644 --- a/providers/os/connection/device/device_connection.go +++ b/providers/os/connection/device/device_connection.go @@ -205,6 +205,7 @@ func tryDetectAsset(connId uint32, partition *snapshot.PartitionInfo, conf *inve } log.Debug().Any("etc", etcs).Err(err).Msg("device connection> etc dir") + // debug ssh, err := os.ReadDir(path.Join(fsPath, "etc", "ssh")) sshs := make([]string, 0) for _, s := range ssh { @@ -212,6 +213,10 @@ func tryDetectAsset(connId uint32, partition *snapshot.PartitionInfo, conf *inve } log.Debug().Any("ssh", sshs).Err(err).Msg("device connection> etc/ssh dir") + // debug + _, err = os.Stat(path.Join(fsPath, "etc", "machine-id")) + log.Debug().Err(err).Msg("device connection> machine-id existance check") + // create and initialize fs provider log.Debug().Str("path", fsPath).Msg("device connection> trying to detect asset") conf.Options["path"] = fsPath