Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion toolkit/tools/pkg/imagecustomizerlib/customizeutils.go
Comment thread
liulanze marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func doCustomizations(buildDir string, baseConfigPath string, config *imagecusto
return err
}

err = enableVerityPartition(imageChroot)
err = enableVerityPartition(config.SystemConfig.Verity, imageChroot)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 on doing the check before the function call to avoid adding an argument.

if err != nil {
return err
}
Expand Down
6 changes: 5 additions & 1 deletion toolkit/tools/pkg/imagecustomizerlib/customizeverity.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,13 @@ import (
"github.com/microsoft/CBL-Mariner/toolkit/tools/internal/shell"
)

func enableVerityPartition(imageChroot *safechroot.Chroot) error {
func enableVerityPartition(verity *imagecustomizerapi.Verity, imageChroot *safechroot.Chroot) error {
var err error

if verity == nil {
return nil
}

// Integrate systemd veritysetup dracut module into initramfs img.
systemdVerityDracutModule := "systemd-veritysetup"
err = buildDracutModule(systemdVerityDracutModule, imageChroot)
Expand Down