From 7f66727008372e956f52808b5f80440ba64dcadc Mon Sep 17 00:00:00 2001 From: Mikita Iwanowski Date: Sat, 14 Dec 2024 01:14:29 +0100 Subject: [PATCH] =?UTF-8?q?follow-up=20debug:=20what's=20up=20with=20etc/s?= =?UTF-8?q?sh=20on=20these=20fedoras=20=F0=9F=95=B5=F0=9F=8F=BB=E2=80=8D?= =?UTF-8?q?=E2=99=82=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- providers/os/connection/device/device_connection.go | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/providers/os/connection/device/device_connection.go b/providers/os/connection/device/device_connection.go index 2fee0e440..13c3328ad 100644 --- a/providers/os/connection/device/device_connection.go +++ b/providers/os/connection/device/device_connection.go @@ -199,9 +199,18 @@ func tryDetectAsset(connId uint32, partition *snapshot.PartitionInfo, conf *inve // debug etc, err := os.ReadDir(path.Join(fsPath, "etc")) - log.Debug().Any("etc", etc).Err(err).Msg("device connection> etc dir") + etcs := make([]string, 0) + for _, e := range etc { + etcs = append(etcs, e.Name()) + } + log.Debug().Any("etc", etcs).Err(err).Msg("device connection> etc dir") + ssh, err := os.ReadDir(path.Join(fsPath, "etc", "ssh")) - log.Debug().Any("ssh", ssh).Err(err).Msg("device connection> etc/ssh dir") + 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") // create and initialize fs provider log.Debug().Str("path", fsPath).Msg("device connection> trying to detect asset")