From nobody Fri Jul 11 04:24:04 2025 X-Original-To: current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4bddrr4z3Kz620CC for ; Fri, 11 Jul 2025 04:24:12 +0000 (UTC) (envelope-from jamie@catflap.org) Received: from donotpassgo.dyslexicfish.net (donotpassgo.dyslexicfish.net [IPv6:2001:19f0:7400:8808:12:4:0:1]) by mx1.freebsd.org (Postfix) with ESMTP id 4bddrr20czz3FLG for ; Fri, 11 Jul 2025 04:24:12 +0000 (UTC) (envelope-from jamie@catflap.org) Authentication-Results: mx1.freebsd.org; none X-Catflap-Envelope-From: X-Catflap-Envelope-To: current@FreeBSD.org Received: from donotpassgo.dyslexicfish.net (donotpassgo.dyslexicfish.net [209.250.224.51]) by donotpassgo.dyslexicfish.net (8.14.5/8.14.5) with ESMTP id 56B4O4sf053637; Fri, 11 Jul 2025 05:24:04 +0100 (BST) (envelope-from jamie@donotpassgo.dyslexicfish.net) Received: (from jamie@localhost) by donotpassgo.dyslexicfish.net (8.14.5/8.14.5/Submit) id 56B4O4UB053636; Fri, 11 Jul 2025 05:24:04 +0100 (BST) (envelope-from jamie) From: Jamie Landeg-Jones Message-Id: <202507110424.56B4O4UB053636@donotpassgo.dyslexicfish.net> Date: Fri, 11 Jul 2025 05:24:04 +0100 Organization: Dyslexic Fish To: current@FreeBSD.org, bzeeb-lists@lists.zabbadoz.net Subject: Re: sysctl to prevent reboot? References: In-Reply-To: User-Agent: Heirloom mailx 12.4 7/29/08 List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.7 (donotpassgo.dyslexicfish.net [209.250.224.51]); Fri, 11 Jul 2025 05:24:04 +0100 (BST) X-Rspamd-Queue-Id: 4bddrr20czz3FLG X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:20473, ipnet:2001:19f0:7400::/38, country:US] "Bjoern A. Zeeb" 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