From a4be663e1342b5d8567a60223101def139594ad0 Mon Sep 17 00:00:00 2001 From: Clayton Craft Date: Fri, 17 Feb 2023 23:30:17 -0800 Subject: [PATCH] filelist/*.List(): print to stdout when starting to generate FileList --- internal/filelist/hookfiles/hookfiles.go | 1 + internal/filelist/hookscripts/hookscripts.go | 3 +++ internal/filelist/modules/modules.go | 2 ++ internal/filelist/osksdl/osksdl.go | 2 ++ 4 files changed, 8 insertions(+) diff --git a/internal/filelist/hookfiles/hookfiles.go b/internal/filelist/hookfiles/hookfiles.go index 8e06959..aae9567 100644 --- a/internal/filelist/hookfiles/hookfiles.go +++ b/internal/filelist/hookfiles/hookfiles.go @@ -23,6 +23,7 @@ func New(filePath string) *HookFiles { } func (h *HookFiles) List() ([]string, error) { + log.Println("- Including files") fileInfo, err := os.ReadDir(h.filePath) if err != nil { return nil, fmt.Errorf("getHookFiles: unable to read hook file dir: %w", err) diff --git a/internal/filelist/hookscripts/hookscripts.go b/internal/filelist/hookscripts/hookscripts.go index 141bdae..74c3d73 100644 --- a/internal/filelist/hookscripts/hookscripts.go +++ b/internal/filelist/hookscripts/hookscripts.go @@ -2,6 +2,7 @@ package hookscripts import ( "fmt" + "log" "os" "path/filepath" ) @@ -20,6 +21,8 @@ func New(scriptsDir string) *HookScripts { func (h *HookScripts) List() ([]string, error) { files := []string{} + log.Println("- Including hook scripts") + fileInfo, err := os.ReadDir(h.scriptsDir) if err != nil { return nil, fmt.Errorf("getHookScripts: unable to read hook script dir: %w", err) diff --git a/internal/filelist/modules/modules.go b/internal/filelist/modules/modules.go index 55108de..1101b2f 100644 --- a/internal/filelist/modules/modules.go +++ b/internal/filelist/modules/modules.go @@ -26,6 +26,8 @@ func New(modules []string) *Modules { } func (m *Modules) List() ([]string, error) { + log.Println("- Including kernel modules") + kernVer, err := misc.GetKernelVersion() if err != nil { return nil, err diff --git a/internal/filelist/osksdl/osksdl.go b/internal/filelist/osksdl/osksdl.go index f3aa4ec..1771f8e 100644 --- a/internal/filelist/osksdl/osksdl.go +++ b/internal/filelist/osksdl/osksdl.go @@ -3,6 +3,7 @@ package osksdl import ( "bufio" "fmt" + "log" "os" "path/filepath" "strings" @@ -28,6 +29,7 @@ func (s *OskSdl) List() ([]string, error) { if !misc.Exists("/usr/bin/osk-sdl") { return nil, nil } + log.Println("- Including osk-sdl support") confFiles := []string{ "/etc/osk.conf",