HomeFreeBSD

nextboot: Write nextboot.conf safely

Description

nextboot: Write nextboot.conf safely

As in the old nextboot.sh script:

  • First write everything to a tempfile instead of /boot/nextboot.conf.
  • fsync() the tempfile before renaming it to nextboot.conf.

Fixes: fd6d47375a78 ("rescue,nextboot: Install nextboot as a link to reboot, rm nextboot.sh")
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D44572

Details

Provenance
markjAuthored on Apr 3 2024, 3:29 PM
Reviewer
imp
Differential Revision
D44572: nextboot: Write nextboot.conf safely
Parents
rG0238d3711d9b: tarfs: Fix 32-bit build.
Branches
Unknown
Tags
Unknown