This article is from a FAQ concerning SCO operating systems. While some of the information may be applicable to any OS, or any Unix or Linux OS, it may be specific to SCO Xenix, Open There is lots of Linux, Mac OS X and general Unix info elsewhere on this site: Search this site is the best way to find anything.
Yes. haltsys and reboot are both the same file. In some versions, they are a binary, but rest assured that they do sync(). In other versions, they are a shell script and you can look at them to determine that they do call /bin/sync.
If it's at all possible to use shutdown to shut the system down, rather than using haltsys or reboot, do so. shutdown is the proper way to do it; it goes out and kills processes and attempts to shut the system down as cleanly as possible. haltsys and reboot, on the other hand, try to shut the system down as quickly as possible, and any programs which are running will be rudely interrupted.
Also, if you're using a caching hard drive controller, be aware that it may not realize the system has been shut down, so even though Xenix or Unix tells you it's *** Safe to power down ***, there may still be data left in the hardware cache that isn't flushed to disk yet. A good, but not foolproof, precaution is to press a key to allow the system to reboot, and not power down until the Boot: prompt comes up. The added time and disk activity may allow the controller to flush its cache. If your caching controller has a specific driver for SCO and you're using that driver, then it can communicate with the operating system to ensure that its buffers are all flushed, and this problem does not arise.
Note that using a caching hard drive controller on a caching operating system is generally of little or no use, though there are certainly some cases in which it makes a significant performance difference (but only by defeating the order in which write requests were made by the kernel or the application, possibly decreasing data integrity somewhat if the system crashes).
If you found something useful today, please consider a small donation.
Got something to add? Send me email.