Re: Should reboot(8) be modified so that it can become the recommended way to reboot a system?
Alexander Leidinger <[email protected]>
| Newsgroups | gmane.os.freebsd.architechture |
|---|---|
| Organization | No organization, this is a private message. |
| Message-ID | <[email protected]> |
Am 2025-02-10 18:04, schrieb Warner Losh: > On Sun, Feb 9, 2025 at 10:00 AM Poul-Henning Kamp <[email protected]> > wrote: > >> -------- >> Daniel Tameling writes: >> >>> Part of the problem is that reboot indeed reboots the system. >> >> I understand what you are saying, but there's no way it can be a >> "problem" that a command called "reboot" reboots the system :-) >> >> If we dont want to make this a flag-day and break a lot of scripts, >> and other automation, the only option, is to make reboot(8) and >> halt(8) print a message and sleep long enough that people can >> change their mind. >> >> My suggestion would be: >> >> If reboot(8) or halt(8) is invoked with any other argument than >> '-p', they behave as documented today. >> >> If they are invoked without arguments, or with only the '-p' argument, >> it goes something like: >> >> # reboot >> >> If you want things to be stop nicely: >> >> Press CTRL-C now, and use the shutdown(8) command instead. >> >> 3 >> 2 >> 1 >> rebooting >> >> That clearly communicates what the concern is, gives people a sensible >> chance to change their mind, and does not break any existing scripts. > > I have a contrary view. I think we should make some changes. But we > can't just exec shutdown, the args / history / evolution of reboot is > too complicated for that. I have scripts which rely on "reboot" to not kill processes or run scripts. Those are some kind of "automatic repair for bugs which are not easily fixed" scripts (those temporary fixes which stay forever). I have no problem to change that, but I expect that a lot of the situations where reboot is used, it is because of the hard reboot without caring about processes and stop scripts. If you do not come up with something makes people aware very loudly about this change, it may cause grief. Additionally I think there was a discussion about exactly the same topic in the past. Years ago. Maybe more than 10 years ago. There were similar concerns about POLA. Bye, Alexander. -- http://www.Leidinger.net [email protected]: PGP 0x8F31830F9F2772BF http://www.FreeBSD.org [email protected] : PGP 0x8F31830F9F2772BF
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEER9UlYXp1PSd08nWXEg2wmwP42IYFAmerDjIACgkQEg2wmwP4 2IbNXA/+OFr7xx79TWduG/isc8ardbcud2iK8epGrzzDoYP488fSnGQBUu88smIu il3I72z9DNDDOC4tvbQYCpSQETgquejLMxpQ91AxKl55HrZ6heA83HoPVYNohW27 UPQjQwScZcdHKlur1q2r6gF6xKfQdzyjtkHINk/bG3vUVX6QRrLjsyz2M9SX0tRX SjaUVH6BKzxVbiIT8BznAlQMvfkVdgBy/75TjE74WaqjdlbTmYSciJKD7w7TNjI1 JhEy4iaOHaB6QzjLowG34/MbweJjAiXkrmDCiqML8ew006xFld0HOWN7zjxEkgqt wHhAixSA29gN0CIppbNaTZSYxCV8M7ypuiJ+xeHWtOWLph4/lLDGz7x4RZFr49LT w1DL+aGjTIjXlKizw5/V/Q87WSctQW7Nitfi+ooGndtYNuD/+ELXBDUbMoiZLj+q KF/WcdypSFQ+VY/HgzLRqkMvnFfTO28eqk6gd2yC6VNjyS7Sp2wOuSUFMWdVYx2E D+v5EsiLFVy65xU00upbjP7wYtj1hUhS/ZnNRYx0e6F4NZWvLXrGWyHnAEeZhMih Z+5Q6w1yvMWn7FsIstDPQtkzWZQRufQHI/2KG0FhnXwQO1mOpXMMhUEcWZ/Nkhh4 a615zfV9qHX7p5Ygzc30NG6Hncix4vPjWI1ygxyNla+J1PDoTfk= =Y9eE -----END PGP SIGNATURE-----