Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Jul 2025 17:30:17 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>
Cc:        Zhenlei Huang <zlei@freebsd.org>, FreeBSD Current <current@freebsd.org>
Subject:   Re: sysctl to prevent reboot?
Message-ID:  <aG_OeXOdKQ9uAt7m@kib.kiev.ua>
In-Reply-To: <o0829s6o-7365-qn4n-8s39-0ro2r6173596@yvfgf.mnoonqbm.arg>
References:  <o2o49n7o-793n-q70n-s017-5q9508r363q7@yvfgf.mnoonqbm.arg> <1B1CD603-065D-436F-97D9-DDF65AB7F115@FreeBSD.org> <o0829s6o-7365-qn4n-8s39-0ro2r6173596@yvfgf.mnoonqbm.arg>

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

On Thu, Jul 10, 2025 at 01:51:47PM +0000, Bjoern A. Zeeb wrote:
> On Thu, 10 Jul 2025, Zhenlei Huang wrote:
> 
> Hi,
> 
> > I believe Konstantin's work [1] and  [2] are precisely what you need.
> > 
> > [1] https://cgit.freebsd.org/src/commit/?id=7fb88c20eccc3fd2118fda2ba58d7afe2b87f7e3 <https://cgit.freebsd.org/src/commit/?id=7fb88c20eccc3fd2118fda2ba58d7afe2b87f7e3>;   shutdown(8): refuse to run if /var/run/noshutdown is present
> > [2] https://cgit.freebsd.org/src/commit/?id=384d976725a5c29734a9227fcdb6ef0807485c91 <https://cgit.freebsd.org/src/commit/?id=384d976725a5c29734a9227fcdb6ef0807485c91>;  rc.d: Add precious_machine rc.conf knob to create /var/run/noshutdown
> 
> Thanks!  I was looking in the wrong place.
> 
> That doesn't catch reboot, does it?  For me that's the offending command
> as I type that at the loader prompt (if I am in the correct window).

Reboot is very different from shutdown.  I never use it except on nfs-booted
crash boxes, so I did not considered.

If you think it is useful, I can add the check there too.


home | help

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