diff --git a/internal/osbuild2/stage.go b/internal/osbuild2/stage.go index 21d72225d..c392b5ca3 100644 --- a/internal/osbuild2/stage.go +++ b/internal/osbuild2/stage.go @@ -87,6 +87,8 @@ func (stage *Stage) UnmarshalJSON(data []byte) error { options = new(TimezoneStageOptions) case "org.osbuild.chrony": options = new(ChronyStageOptions) + case "org.osbuild.dracut": + options = new(DracutStageOptions) case "org.osbuild.dracut.conf": options = new(DracutConfStageOptions) case "org.osbuild.keymap": diff --git a/internal/osbuild2/stage_test.go b/internal/osbuild2/stage_test.go index 186c9e5fd..d6e2edda0 100644 --- a/internal/osbuild2/stage_test.go +++ b/internal/osbuild2/stage_test.go @@ -62,6 +62,16 @@ func TestStage_UnmarshalJSON(t *testing.T) { data: []byte(`{"type":"org.osbuild.chrony","options":{"timeservers":null}}`), }, }, + { + name: "dracut", + fields: fields{ + Type: "org.osbuild.dracut", + Options: &DracutStageOptions{}, + }, + args: args{ + data: []byte(`{"type":"org.osbuild.dracut","options":{"kernel":null}}`), + }, + }, { name: "dracut.conf", fields: fields{