Ticket #59 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

OpenRC (0.2.2) doesn't respect the /forcefsck file

Reported by: Jakub Januszkiewicz <jakub.januszkiewicz@gmail.com> Owned by: roy
Priority: normal Milestone:
Component: init.d scripts Version:
Keywords: Cc:

Description

OpenRC's fsck init script doesn't respect the /forcefsck file created by 'shutdown -F'.

According to 'man shutdown':
"The -F flag means 'force fsck'. This only creates an advisory file /forcefsck which can be tested by the system when it comes up again. The boot rc file can test if this file is present, and decide to run fsck(1) with a special 'force' flag so that even properly unmounted filesystems get checked. After that, the boot process should remove /forcefsck."

Attachments

openrc-forcefsck.patch Download (0 bytes) - added by Jakub Januszkiewicz <jakub.januszkiewicz@gmail.com> 2 years ago.
a patch for this issue

Change History

Changed 2 years ago by Jakub Januszkiewicz <jakub.januszkiewicz@gmail.com>

a patch for this issue

comment:268 Changed 2 years ago by Jakub Januszkiewicz <jakub.januszkiewicz@gmail.com>

Created an attachment (id=21)
a patch for this issue

This patch:

  • adds -f to fsck_opts if /forcefsck exists
  • changes ebegin message to indicate the check is forced
  • removes /forcefsck

What might be improved is that I think /forcefsck should only be removed if the fsck succeeds (so that if it is interrupted or fails, it runs again on the next boot), but I don't know how to check for it in init.d/root.

comment:269 Changed 2 years ago by roy

  • Status changed from new to resolved
  • Resolution set to fixed

Comitted, thanks.

If you wanted to force fsck again during the next reboot then simply shutdown -F again I'd say.

Note: See TracTickets for help on using tickets.