From owner-freebsd-questions@FreeBSD.ORG Sat Aug 9 21:01:01 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 226381065696 for ; Sat, 9 Aug 2008 21:01:01 +0000 (UTC) (envelope-from sahil@tandon.net) Received: from aegis.hamla.org (aegis.hamla.org [206.251.255.39]) by mx1.freebsd.org (Postfix) with ESMTP id 074388FC2A for ; Sat, 9 Aug 2008 21:01:00 +0000 (UTC) (envelope-from sahil@tandon.net) Received: from localhost (localhost [127.0.0.1]) by aegis.hamla.org (Postfix) with ESMTP id BC1115C5F; Sat, 9 Aug 2008 17:01:27 -0400 (EDT) X-Virus-Scanned: by ClamAV at aegis.hamla.org Received: from aegis.hamla.org ([127.0.0.1]) by localhost (aegis.hamla.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id UB2KHPi1tvY3; Sat, 9 Aug 2008 17:01:22 -0400 (EDT) Date: Sat, 9 Aug 2008 17:00:54 -0400 From: Sahil Tandon To: Michael Grant Message-ID: <20080809210054.GD71266@shepherd> References: <62b856460808091322m38558ec2o1359fff91ae68a79@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <62b856460808091322m38558ec2o1359fff91ae68a79@mail.gmail.com> Cc: FreeBSD Questions Subject: Re: shutdown/reboot suggestion X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: "freebsd-questions@freebsd.org" List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Aug 2008 21:01:01 -0000 Michael Grant wrote: > More than once, through carelessness, and I'm sure I'm not alone, I > have inadvertently shutdown or rebooted the wrong machine. I'm sure > some of you know that all too familiar feeling when you see > "Connection closed" instead of your desktop being rebooted. > > I have a suggestion with respect to these commands. What if they > could be modified to require the hostname of the machine as their > first argument, otherwise, they refuse to bring the machine down? Write two scripts that check for those additional arguments and name them 'shutdown' and 'reboot'. Then ensure that they exist earlier in your PATH than the actual shutdown and reboot binaries. -- Sahil Tandon