From owner-freebsd-questions@FreeBSD.ORG Sun Apr 6 13:03:53 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 99BCD106566C for ; Sun, 6 Apr 2008 13:03:53 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (wojtek.tensor.gdynia.pl [IPv6:2001:4070:101:2::1]) by mx1.freebsd.org (Postfix) with ESMTP id B66608FC14 for ; Sun, 6 Apr 2008 13:03:46 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (localhost [IPv6:::1]) by wojtek.tensor.gdynia.pl (8.14.2/8.13.8) with ESMTP id m36D2rqs044428; Sun, 6 Apr 2008 15:02:53 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from localhost (wojtek@localhost) by wojtek.tensor.gdynia.pl (8.14.2/8.13.8/Submit) with ESMTP id m36D2i36042372; Sun, 6 Apr 2008 15:02:49 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Date: Sun, 6 Apr 2008 15:02:43 +0200 (CEST) From: Wojciech Puchar To: Derek Ragona In-Reply-To: <6.0.0.22.2.20080406073457.02527d90@mail.computinginnovations.com> Message-ID: <20080406150155.T37523@wojtek.tensor.gdynia.pl> References: <845c0f80804041321j44439881yb67458980edab102@mail.gmail.com> <6.0.0.22.2.20080406073457.02527d90@mail.computinginnovations.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Rance Hall , freebsd-questions@freebsd.org Subject: Re: need a shell script that can be executed manually or as part of the rc process. How can the script detect WHERE it is being called from to know how to handle various options. X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Apr 2008 13:03:53 -0000 > One simpler would be to use a cron job that runs @reboot > I believe these cron jobs would be run after the system is booted in i'm sure it's run when cron deamon is started. which is when system boots but - when doing say /etc/rc.d/cron restart - too.