Skip to content

Commit

Permalink
Use correct flags to open fstab file
Browse files Browse the repository at this point in the history
  • Loading branch information
upils committed Oct 26, 2023
1 parent 381615b commit 9a382e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/statemachine/classic_states.go
Original file line number Diff line number Diff line change
Expand Up @@ -1018,7 +1018,7 @@ func (stateMachine *StateMachine) customizeFstab() error {

fstabPath := filepath.Join(stateMachine.tempDirs.chroot, "etc", "fstab")

fstabIO, err := osOpenFile(fstabPath, os.O_CREATE|os.O_RDWR|os.O_TRUNC, 0644)
fstabIO, err := osOpenFile(fstabPath, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0644)
if err != nil {
return fmt.Errorf("Error opening fstab: %s", err.Error())
}
Expand Down

0 comments on commit 9a382e9

Please sign in to comment.