From 0159549e44a0cc260765f558496bcedde99f0d3d Mon Sep 17 00:00:00 2001 From: Christopher Obbard Date: Tue, 17 Dec 2024 16:00:25 +0000 Subject: [PATCH] actions: filesystem-deploy: Be consistent with paths in log The paths used aren't consistent in the log, e.g.: 2024/12/17 15:56:10 ==== Deploy onto image ==== 2024/12/17 15:56:21 Setting up fstab 2024/12/17 15:56:21 Setting up /etc/kernel/cmdline For all log and error messages, use the full path to fstab and cmdline. Signed-off-by: Christopher Obbard --- actions/filesystem_deploy_action.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/actions/filesystem_deploy_action.go b/actions/filesystem_deploy_action.go index 5721559..a03879b 100644 --- a/actions/filesystem_deploy_action.go +++ b/actions/filesystem_deploy_action.go @@ -59,7 +59,7 @@ func (fd *FilesystemDeployAction) setupFSTab(context *debos.DebosContext) error return errors.New("Fstab not generated, missing image-partition action?") } - log.Print("Setting up fstab") + log.Print("Setting up /etc/fstab") err := os.MkdirAll(path.Join(context.Rootdir, "etc"), 0755) if err != nil { @@ -70,13 +70,13 @@ func (fd *FilesystemDeployAction) setupFSTab(context *debos.DebosContext) error f, err := os.OpenFile(fstab, os.O_RDWR|os.O_CREATE, 0755) if err != nil { - return fmt.Errorf("Couldn't open fstab: %v", err) + return fmt.Errorf("Couldn't open /etc/fstab: %v", err) } _, err = io.Copy(f, &context.ImageFSTab) if err != nil { - return fmt.Errorf("Couldn't write fstab: %v", err) + return fmt.Errorf("Couldn't write /etc/fstab: %v", err) } f.Close() @@ -97,7 +97,7 @@ func (fd *FilesystemDeployAction) setupKernelCmdline(context *debos.DebosContext f, err := os.OpenFile(path, os.O_RDWR|os.O_CREATE, 0755) if err != nil { - log.Fatalf("Couldn't open kernel cmdline: %v", err) + log.Fatalf("Couldn't open /etc/kernel/cmdline: %v", err) } cmdline = append(cmdline, strings.TrimSpace(string(current))) @@ -109,7 +109,7 @@ func (fd *FilesystemDeployAction) setupKernelCmdline(context *debos.DebosContext _, err = f.WriteString(strings.Join(cmdline, " ") + "\n") if err != nil { - return fmt.Errorf("Couldn't write kernel/cmdline: %v", err) + return fmt.Errorf("Couldn't write /etc/kernel/cmdline: %v", err) } f.Close()