[Bug 280941] The reboot command considered harmful
- In reply to: bugzilla-noreply_a_freebsd.org: "[Bug 280941] The reboot command considered harmful"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 20 Aug 2024 10:35:42 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=280941 bugs.freebsd.org@aljoscha.vollmerhaus.net changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugs.freebsd.org@aljoscha.v | |ollmerhaus.net --- Comment #2 from bugs.freebsd.org@aljoscha.vollmerhaus.net --- I'd like to add my experience here, as I was the reason for that discussion on the IRC channel. While trying to write an rc script for a program of mine, I spent hours trying to figure out why my shutdown procedure didn't work. Only after lengthy debugging, and with help from the kind folks on #freebsd, was I able to determine that the problem wasn't with my rc script but rather with the fact that I had been using "reboot" instead of "shutdown -r now." Although it was quickly pointed out that the behavior of "reboot" is clearly documented, I had no indication that I should even look at the docs for "reboot". Coming from a Linux background, I was under the assumption it would simply reboot the machine. And reboot it did, so nothing gave me any hint that I was doing something wrong. I had been restarting my FreeBSD machines using "reboot" for years at that point. This led me on a wild goose chase for a fault in my script that didn't exist. I was made aware that the meaning of "reboot" as "skip proper procedures" is a very old default and that changing this established behavior could disrupt old scripts and ingrained habits. However, at the very least, I believe a hint - such as printing something like "emergency reboot, skipping proper shutdown!" to stdout or stderr - should be added to the "reboot" command. -- You are receiving this mail because: You are the assignee for the bug.