From nobody Tue Jun 21 19:07:41 2022 X-Original-To: freebsd-arch@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 9B58486EDDD for ; Tue, 21 Jun 2022 19:07:56 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-vs1-xe2d.google.com (mail-vs1-xe2d.google.com [IPv6:2607:f8b0:4864:20::e2d]) (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 "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LSGHb5yrMz4b0Z for ; Tue, 21 Jun 2022 19:07:55 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-vs1-xe2d.google.com with SMTP id e7so7533567vsp.13 for ; Tue, 21 Jun 2022 12:07:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wgSw/e01kgtwoU6ds54nCYtVR6dVEHZ/DZIXbEGJxio=; b=AtrK5ILmccUW4XKNUAwcLL+cLCzfOhrjS2sWA/2S/+571hF1g6hXF/hbUAVINwmc5y dfC8pZxBuZDFtXcRU5/2aNRTmnj3QITeSq5srRo7d2qvozA9dCLI8Ky7oD1arWhx1va1 +4A9N76Z7yMIt6CXQKZCDYCcdqCe3GKdRQSgId5gkV1hHsutdNxjcN/0sma4p6tNQ733 wj9bW2SyitmH738ZM7YUd/D8uisrrb9KMuVaJOwbvVWibqLeakEDbvQsvHnmP/EcHujO Zl7nFwTAR4rVOVc0qMonUgClSDMjq+rXtrZppLOHmGDMdjYLyCy4zcjQHw2SeDCTcMlT zfoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wgSw/e01kgtwoU6ds54nCYtVR6dVEHZ/DZIXbEGJxio=; b=awLW8smqPQniTYZcZaXrzswzVoNWnWB5ZqwaTm7e5afjrA5VrwsKFGVI6kFcdQu8j/ RfQSpz/vTw7UpDs4Eig7YEmwF4cH+bytjzalbQISr0+YCD8dRTOwt+6B1UPDjUznxva0 aCvLGF4gHi3xtFRi4rNQCo0HqURdumK7bKFSWAD0jcTbVWB9NcN6UvLDt0wEGOb8j6fT tfJsBP5sT3ePukBkqN9LxP6eC5TM251rOJuLWNAe2KLDxWPNBZaV5PEb47sucO2VVEql CLWJfrPzYqFyKrxXxVK/jHJvhOn4ERqReFbqb9y/g9KsxMAoA2Wm144o0I5QeWFBeX5s xolw== X-Gm-Message-State: AJIora+TfSW8alJ/XVKDD5FIpCRP8PW6Lx0pcPXxaInMIAu8/Hdk3A3T WOHVLg1T1NB5pKUEs38jR1Z8erqMepdyO1Eg29lTSkVOibw= X-Google-Smtp-Source: AGRyM1suIQj2FnHCGHnEnhQA8WU2FL4NCoZJMAF9Rl1GdiVItIi95pj+6FexhOjD/zMI9lULpr9LsfIJHe6jhd3Za2o= X-Received: by 2002:a05:6102:c4f:b0:351:938d:6863 with SMTP id y15-20020a0561020c4f00b00351938d6863mr11195899vss.12.1655838475220; Tue, 21 Jun 2022 12:07:55 -0700 (PDT) List-Id: Discussion related to FreeBSD architecture List-Archive: https://lists.freebsd.org/archives/freebsd-arch List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arch@freebsd.org MIME-Version: 1.0 References: <202206211620.25LGKvbN053809@gndrsh.dnsmgr.net> In-Reply-To: <202206211620.25LGKvbN053809@gndrsh.dnsmgr.net> From: Warner Losh Date: Tue, 21 Jun 2022 13:07:41 -0600 Message-ID: Subject: Re: Updating reboot's default To: "Rodney W. Grimes" Cc: "freebsd-arch@freebsd.org" Content-Type: multipart/alternative; boundary="0000000000001f0f2405e1f9f081" X-Rspamd-Queue-Id: 4LSGHb5yrMz4b0Z X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20210112.gappssmtp.com header.s=20210112 header.b=AtrK5ILm; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::e2d) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-2.09 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20210112.gappssmtp.com:s=20210112]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-0.998]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arch@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20210112.gappssmtp.com:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::e2d:from]; NEURAL_HAM_SHORT(-0.09)[-0.088]; MLMMJ_DEST(0.00)[freebsd-arch]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; R_SPF_NA(0.00)[no SPF record]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N --0000000000001f0f2405e1f9f081 Content-Type: text/plain; charset="UTF-8" On Tue, Jun 21, 2022, 10:20 AM Rodney W. Grimes < freebsd-rwg@gndrsh.dnsmgr.net> wrote: > [ Charset UTF-8 unsupported, converting... ] > > On Tue, Jun 21, 2022 at 8:01 AM Warner Losh wrote: > > > > > 15 or 20 years ago, we talked about changing the default for reboot > from > > > 'right now' to being safe shutdown. There were arguments made against > it > > > due to tiny appliances and such. > > > > > > Time has past, and this oddity has persisted. It's time to revisit that > > > decision. > > > > > > I'd propose that we keep 'fastboot' and 'fasthalt' having the immediate > > > behavior. However, the 'reboot' command will switch from '-q' behavior > to > > > '-r' behavior. > > > > > > I'll update the man page, etc to reflect these new defaults. Most of > the > > > systems I've been on in the last 10-15 years have had some flavor of > 'alias > > > reboot reboot -r' in their login scripts and/or made shell scripts > that did > > > this. This will match what everybody else is doing, and will likely > result > > > in less astonishment rather than more, even though it changes a > > > long-standing default behavior. > > > > > > Comments? > > > > > > > I slightly misspoke here. I'm proposing we change the default to like > > 'shutodwn -r' not to re-root the system... Sorry for any confusion. > > Retract my prior objection based on reboot -r being a re-root. > > BUTT: > shutdown -r requires an argument of "time" > And what would the time be? > > aka if you alias reboot "shutdown -r", when I type > reboot I'll end up getting a usage error. > This is gona cause some confusion, perhaps you > mean to alias reboot "shutdown -r now"? > Yes. It would signal init to start the shutdown right now. Warner -- > Rod Grimes > rgrimes@freebsd.org > --0000000000001f0f2405e1f9f081 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Tue, Jun 21, 2022, 10:20 AM Rodney W. Grimes <freebsd-rwg@gndrsh.dnsmgr.ne= t> wrote:
[ Charset UTF-8 un= supported, converting... ]
> On Tue, Jun 21, 2022 at 8:01 AM Warner Losh <imp@bsdimp.com> wro= te:
>
> > 15 or 20 years ago, we talked about changing the default for rebo= ot from
> > 'right now' to being safe shutdown. There were arguments = made against it
> > due to tiny appliances and such.
> >
> > Time has past, and this oddity has persisted. It's time to re= visit that
> > decision.
> >
> > I'd propose that we keep 'fastboot' and 'fasthalt= ' having the immediate
> > behavior. However, the 'reboot' command will switch from = '-q' behavior to
> > '-r' behavior.
> >
> > I'll update the man page, etc to reflect these new defaults. = Most of the
> > systems I've been on in the last 10-15 years have had some fl= avor of 'alias
> > reboot reboot -r' in their login scripts and/or made shell sc= ripts that did
> > this. This will match what everybody else is doing, and will like= ly result
> > in less astonishment rather than more, even though it changes a > > long-standing default behavior.
> >
> > Comments?
> >
>
> I slightly misspoke here. I'm proposing we change the default to l= ike
> 'shutodwn -r' not to re-root the system... Sorry for any confu= sion.

Retract my prior objection based on reboot -r being a re-root.

BUTT:
shutdown -r requires an argument of "time"
And what would the time be?

aka if you alias reboot "shutdown -r", when I type
reboot I'll end up getting a usage error.
This is gona cause some confusion, perhaps you
mean to alias reboot "shutdown -r now"?

Yes. It would signal init = to start the shutdown right now.

Warner=C2=A0

<= br>
--
Rod Grimes=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=A0rgrimes@freebsd.org
--0000000000001f0f2405e1f9f081--