From nobody Thu Jul 10 14:01:57 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 4bdGkK5yG2z615bj for ; Thu, 10 Jul 2025 14:02:17 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bdGkK2105z42m6 for ; Thu, 10 Jul 2025 14:02:12 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-747fba9f962so951330b3a.0 for ; Thu, 10 Jul 2025 07:02:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1752156129; x=1752760929; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=uvOIqjQZ2ggzaKIU+kbg5izfL/7Yigujt+thTYxM60o=; b=1AiFEw666bTxJYFTHjm57AQH5mBFlHEiap7xl9zA0iBn6Kpk4lHxqweZuw2QvVoFpQ vFb+Ga97iajwMlo5Ltxp0KSWa/wZ416ZaHYAHZ7gKUkDvTqw7ROhhz8swqTPszMOAMwW W/mg6na5gd29J60X5qfFw573p1QgcLF91F0emtsJ7MvWtchFz/vihEVVySWP0nLlw7iX bDaNFmoXCKPb0XyodxeGl1NfB3PF59bJTcksbOxX0JGp0LmiS4aS14jrSGHc5qeYbSTG 30Vs0/gQ0F5x53XPHyb/X9SMFrmZCYbtHA7/XmELrmRkuRHjnWqXnSJ0RXtbPi8hoS+I z2Xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752156129; x=1752760929; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=uvOIqjQZ2ggzaKIU+kbg5izfL/7Yigujt+thTYxM60o=; b=hD1bW56CszFbql/hMZcPRP2nAXbpaP/RAMxn83FK3Ix466WmnNpXaoHfes+X/RPQmS BaOIATw48+/13rfoZLFOvx/sxfRFhXX0zSbMCm4AMhF1Y/ZW9iH9v1obDWdf4wj5Z/VS xAiCTBhhm8GcNtIA8nQ970ssUK4k66X3VuWbVORSg4wua+o1sJ3gunpWq2kw+QzUTmpf uaDcYHcpVScKStz/UtQ19VTCqfLMkVB/K2waOBhRRLnoXaw76zwSj/77tQWlfa4KEgTp kKvXXDzcnC4fwXPtSebOkv2QJy7GCjFBsGGoU0YRmvi+T4jbqYOl4Zbpb0y34wlFHlPY b15w== X-Forwarded-Encrypted: i=1; AJvYcCWxP+gDQVikjKlc7YFt3fzs3JID6Q0p5VFvz8fQmUnej5xRnDLqtgqiIYe7+zHWsSSZI5x/+LvV@freebsd.org X-Gm-Message-State: AOJu0Yx66VVRZfKUv6kAoIQJ/I+dNI1u0ptH9wdShXzR+22bRu862/e3 Lq8qHGkEOMhaY1NgJAqoYX8Kuf52h3lA6owkbL7QFBI2HScusS/bwlntoh7guzsDDOGbEEPPNDJ XsZWQqybiiF5C4vRUwYxIQFPXFNGdAT22M3I3XkiN/A== X-Gm-Gg: ASbGncvEYDRuE5XhPnOXSTt5kudQ9aqdjY+OjPfXhivXbXQ+hiC4m+kX0ifwLUlaNkv LDgsRO0cRMiiRD0f4IiQaNnxJ9m95/o5tpP3Vb0JDwGJ4V1q3tQMJaxIZ/ftp56EQ7+/AesSuuJ KU8T4TxqKCYEEo319FEkDfJcWhettiMe1rwqpFJh+gKa8L2P/C7rogU2BL7cX41rn6LAmGP72Hz Q== X-Google-Smtp-Source: AGHT+IGYX6h8GNfR7wWcq92U1/sa3Q2G3SjmC6bqAit18tK5SAJ+em1E3OYH48F+AD9jgzqMQLBwlILamgVr1lvd0Ec= X-Received: by 2002:a05:6a21:6e4c:b0:21c:fa68:9da6 with SMTP id adf61e73a8af0-22fc2c0d18amr5798945637.8.1752156129080; Thu, 10 Jul 2025 07:02:09 -0700 (PDT) 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 References: <1B1CD603-065D-436F-97D9-DDF65AB7F115@FreeBSD.org> In-Reply-To: From: Warner Losh Date: Thu, 10 Jul 2025 08:01:57 -0600 X-Gm-Features: Ac12FXxl8VlQ5cuGbzMCPAFTgKhnVVwYImrdWcxGP-KygIYrQJ0cgewQkGi0OY8 Message-ID: Subject: Re: sysctl to prevent reboot? To: "Bjoern A. Zeeb" Cc: Zhenlei Huang , FreeBSD Current , Konstantin Belousov Content-Type: multipart/alternative; boundary="000000000000aa5a79063993a306" X-Rspamd-Queue-Id: 4bdGkK2105z42m6 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:15169, ipnet:2607:f8b0::/32, country:US] --000000000000aa5a79063993a306 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Jul 10, 2025, 7:52=E2=80=AFAM 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=3D7fb88c20eccc3fd2118fda2ba58d7af= e2b87f7e3 > < > https://cgit.freebsd.org/src/commit/?id=3D7fb88c20eccc3fd2118fda2ba58d7af= e2b87f7e3> > shutdown(8): refuse to run if /var/run/noshutdown is present > > [2] > https://cgit.freebsd.org/src/commit/?id=3D384d976725a5c29734a9227fcdb6ef0= 807485c91 > < > https://cgit.freebsd.org/src/commit/?id=3D384d976725a5c29734a9227fcdb6ef0= 807485c91> > 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). > 'alias reboot shurdown -r' has other benefits as well Warner /bz > > -- > Bjoern A. Zeeb r15:7 > > --000000000000aa5a79063993a306 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Thu, Jul 10, 2025, 7:52=E2=80= =AFAM Bjoern A. Zeeb <= bzeeb-lists@lists.zabbadoz.net> wrote:
On Thu, 10 Jul 2025, Zhenlei Huang wrote:

Hi,

> I believe Konstantin's work [1] and=C2=A0 [2] are precisely what y= ou need.
>
> [1] https://cgit.freebsd.org/src/commit/?id=3D7fb88c20eccc3fd2118fda2ba58d7af= e2b87f7e3 <https://cgit.freebsd.org/src/commit/?id=3D7fb88c20eccc3fd2118fd= a2ba58d7afe2b87f7e3>=C2=A0 =C2=A0shutdown(8): refuse to run if /var/= run/noshutdown is present
> [2] https://cgit.freebsd.org/src/commit/?id=3D384d976725a5c29734a9227fcdb6ef0= 807485c91 <https://cgit.freebsd.org/src/commit/?id=3D384d976725a5c29734a92= 27fcdb6ef0807485c91>=C2=A0 rc.d: Add precious_machine rc.conf knob t= o create /var/run/noshutdown

Thanks!=C2=A0 I was looking in the wrong place.

That doesn't catch reboot, does it?=C2=A0 For me that's the offendi= ng command
as I type that at the loader prompt (if I am in the correct window).

'al= ias reboot shurdown -r' has other benefits as well

Warner

/bz

--
Bjoern A. Zeeb=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0r15:7

--000000000000aa5a79063993a306--