Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Jul 2025 05:24:04 +0100
From:      Jamie Landeg-Jones <jamie@catflap.org>
To:        current@FreeBSD.org, bzeeb-lists@lists.zabbadoz.net
Subject:   Re: sysctl to prevent reboot?
Message-ID:  <202507110424.56B4O4UB053636@donotpassgo.dyslexicfish.net>
In-Reply-To: <o2o49n7o-793n-q70n-s017-5q9508r363q7@yvfgf.mnoonqbm.arg>

index | next in thread | previous in thread | raw e-mail

"Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net> wrote:

> I would find that very helpful for host systems running (multiple) bhyve
> instances.  Happened twice to me recently that I typed reboot in the wrong
> window and restarted my dev machine entirely rather than a guest.

Why not on the main machine, just do:

# mv /sbin/reboot /sbin/reboot-really-i-am-sure
# mv /rescue/reboot /rescue/reboot-really-i-am-sure

For safety, to stop an upgrade bringing reboot back (this would presumably
stop any upgrade in its tracks, so think of its use as a last resort to
remind you to repeat the process after a rebuild, or that you forget to
patch the src config) you could then do:

touch /sbin/reboot && chflags schg /sbin/reboot 
touch /rescue/reboot && chflags schg /rescue/reboot 



home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202507110424.56B4O4UB053636>