Skip to content

Commit

Permalink
manifest: minor cleanups
Browse files Browse the repository at this point in the history
- Add comment explaining why we disable DefaultDependencies.
- Drop the unnecessary [:] from the mountpoints slice.
  • Loading branch information
achilleas-k committed May 13, 2024
1 parent 8eb77cd commit f40111c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/manifest/ostree_deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ func createMountpointService(serviceName string, mountpoints []string) *osbuild.
}
unit := osbuild.Unit{
Description: "Ensure custom filesystem mountpoints exist",
DefaultDependencies: common.ToPtr(false),
DefaultDependencies: common.ToPtr(false), // Default dependencies would interfere with our custom order (before mountpoints)
ConditionPathIsDirectory: conditionPathIsDirectory,
After: []string{"ostree-remount.service"},
}
Expand All @@ -523,7 +523,7 @@ func createMountpointService(serviceName string, mountpoints []string) *osbuild.
// compatibility with composefs, will require transient rootfs to be enabled too.
ExecStartPre: []string{"/bin/sh -c \"if grep -Uq composefs /run/ostree-booted; then chattr -i /; fi\""},
ExecStopPost: []string{"/bin/sh -c \"if grep -Uq composefs /run/ostree-booted; then chattr +i /; fi\""},
ExecStart: []string{"mkdir -p " + strings.Join(mountpoints[:], " ")},
ExecStart: []string{"mkdir -p " + strings.Join(mountpoints, " ")},
}

// For every mountpoint we want to ensure, we need to set a Before order on
Expand Down

0 comments on commit f40111c

Please sign in to comment.