Skip to content

Commit

Permalink
debug: machine-id detector
Browse files Browse the repository at this point in the history
  • Loading branch information
slntopp committed Dec 14, 2024
1 parent 7f66727 commit 5c05ed2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions providers/os/connection/device/device_connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,13 +205,18 @@ 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 {
sshs = append(sshs, s.Name())
}
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
Expand Down

0 comments on commit 5c05ed2

Please sign in to comment.