mirror of
https://github.com/outbackdingo/debos.git
synced 2026-01-27 10:18:47 +00:00
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 <christopher.obbard@linaro.org>
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user