Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Oct 2009 10:38:20 -0400
From:      "illoai@gmail.com" <illoai@gmail.com>
To:        Daniel Braniss <danny@cs.huji.ac.il>
Cc:        =?ISO-8859-1?Q?Dag=2DErling_Sm=F8rgrav?= <des@des.no>, FreeBSD Current <freebsd-current@freebsd.org>, d@delphij.net
Subject:   Re: [PATCH] Shutdown cooloff feature
Message-ID:  <d7195cff0910020738h44a91dafydfb6f2f98853e8ec@mail.gmail.com>
In-Reply-To: <E1Msd2e-0008MR-0w@kabab.cs.huji.ac.il>
References:  <4AC141B0.4090705@delphij.net> <E1MsXso-0005Eg-CY@kabab.cs.huji.ac.il> <86fxa6gg8l.fsf@ds4.des.no> <E1Msd2e-0008MR-0w@kabab.cs.huji.ac.il>

next in thread | previous in thread | raw e-mail | index | archive | help
2009/9/29 Daniel Braniss <danny@cs.huji.ac.il>:
>> > Xin LI <delphij@delphij.net> 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 <hostname> 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
--



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