From owner-freebsd-current@FreeBSD.ORG Fri Oct 2 14:38:22 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A1F7106566B for ; Fri, 2 Oct 2009 14:38:22 +0000 (UTC) (envelope-from illoai@gmail.com) Received: from mail-yw0-f197.google.com (mail-yw0-f197.google.com [209.85.211.197]) by mx1.freebsd.org (Postfix) with ESMTP id C29B08FC16 for ; Fri, 2 Oct 2009 14:38:21 +0000 (UTC) Received: by ywh35 with SMTP id 35so2234313ywh.7 for ; Fri, 02 Oct 2009 07:38:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=Xc0Wgcx0sL32+mQZ0eZhZjiks5TlvshDb5z99bLEmFo=; b=eSmLsmJiAKgrcKHs4hSnZedMkcyKgnas9s8IitsQIhWi6q/KnOul8Qa6sm4V+rGbyB +lTPBqsQj/OI8yUdxvLsoPOV/G3ni9I2FXw9I5tWrewt8Ayj6pU7K4sUZaPIVhfz4mMb RUWeY+0wqfhfrJqYnqwcJt0dk8f2YixYxlP/k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=Tazr9GWKpNH6IZrB55kcblPa/hfLUDtMoBEABk3oB2S+V1PDTR493oEhOvENTt5Xu+ 6JfyAHHHueGW2U8/jsD3hEUcA3rew+tSXCGI9GBU1pd48ZmQCWfxQAQnnPcFvurSYoaP 6LiRbhPKWUCdYEHDZ4A/u+yUfws+LXrIrhpDY= MIME-Version: 1.0 Received: by 10.91.55.14 with SMTP id h14mr1505276agk.67.1254494300674; Fri, 02 Oct 2009 07:38:20 -0700 (PDT) In-Reply-To: References: <4AC141B0.4090705@delphij.net> <86fxa6gg8l.fsf@ds4.des.no> Date: Fri, 2 Oct 2009 10:38:20 -0400 Message-ID: From: "illoai@gmail.com" To: Daniel Braniss Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: =?ISO-8859-1?Q?Dag=2DErling_Sm=F8rgrav?= , FreeBSD Current , d@delphij.net Subject: Re: [PATCH] Shutdown cooloff feature X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Oct 2009 14:38:22 -0000 2009/9/29 Daniel Braniss : >> > Xin LI writes: >> > > I'm not sure if anyone would find this useful: >> > > > > > =A0- If a shutdown is initiated from a tty -and- >> > > =A0- It's not a restart -and- >> > > =A0- The time parameter is set to "now" >> > > >> > > Then, the shutdown(8) program would give something like this: >> > > >> > > Shutting down NOW, press ^C within 5 seconds to cancel... >> > > >> > > So the user would get a chance to terminate it before it's too late. >> > I know we are living in a virtual world, where even shutting down >> > a computer is just a 'wish', but lets keep some sanity, now means now. > >> The "now" is not an issue; I think his point is that you *really* don't >> want to accidentally type "shutdown -h now" or "shutdown now" instead of >> "shutdown -r now" in an ssh session to a remote system - especially at 6 >> pm on a Friday night when the machine is in a colo center that's only >> manned during business hours. > > I understand what is at stake, my problem is that in other *Unixes, sysV/= Solaris > 'shutdown now' is actually sometime in the future :-), and it does not he= lp > much if you are far away and the link is slow, so the 5 sec. grace is act= ually > taken up by the bandwidth - or you are connected via an iphone, how do yo= u > hit ^C :-) > > what if the machine is compromised and you really want to power it off, > now the intruder has another 5 seconds ... > > thankfully +0 works, or are there plans to change that too? :-) > > careful! bikeshead ahead % cat ~/bin/bikeshed #!/bin/sh echo "It's all gone pear-shaped!" sleep 5 shutdown -p now --=20 --