Unmountings of filesystems are done by /etc/rc.d/init.d/halt during shutdown or reboot. Some filesystems are not unmounted but remounted read-only, e.g., the root filesystem. Unfortunately that does not imply that the buffers are flushed to disc. Suggested solution: Put a sync-command at appropriate place in /etc/rc.d/init.d/halt. I have never had any problem with this until I started using raid1 on the root-filesystem so that might be crucial for this bug to actually cause problem. I am unable to reproduce this bug in a certain way. However, sometimes changes in files close to a reboot are lost. Version: Redhat linux 6.2, i386, initscript-5.00-1. Other versions or platforms have not been tested.
After hints from some friends I checked the source code of the kernel and remount do sync the discs. If there is a bug here, it is not in the initscripts. My unability to reproduce the bug makes me suspect that I have made some mistake. At least I don't expect someone to spend time on this until I can produce a better bug report. Therefore I classify this as not-a-bug.