From owner-freebsd-questions Sun May 19 4: 6:31 2002 Delivered-To: freebsd-questions@freebsd.org Received: from axel.truedestiny.net (a185066.upc-a.chello.nl [62.163.185.66]) by hub.freebsd.org (Postfix) with ESMTP id 441F137B40A for ; Sun, 19 May 2002 04:06:20 -0700 (PDT) Received: by axel.truedestiny.net (Postfix, from userid 1000) id 6873349AB2; Sun, 19 May 2002 13:06:21 +0200 (CEST) Date: Sun, 19 May 2002 13:06:21 +0200 From: Axel Scheepers To: Peter Leftwich Cc: FreeBSD Questions LIST Subject: Re: rc.conf or loader.conf, at now + 30 minutes Message-ID: <20020519130621.C64761@mars.thuis> Reply-To: Axel Scheepers References: <20020518203532.Q710-100000@66-75-1-142.san.rr.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020518203532.Q710-100000@66-75-1-142.san.rr.com>; from Hostmaster@Video2Video.Com on Sat, May 18, 2002 at 08:39:54PM -0700 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sat, May 18, 2002 at 08:39:54PM -0700, Peter Leftwich wrote: > I want to put the following interactive command into a file that loads at > bootup: > > prompt$ at now + 30 minutes > echo "Uptime is 30 minutes" | wall > ^D > > Question 1- Is there a way to condense this into one command line? How about the following: #!/bin/sh # wall_uptime.sh sleep 30 echo "Uptime is 30 minutes" | wall and in your rc.local: /path/to/wall_uptime.sh & > Question 2- Can that condensed line go in /etc/rc.conf or similar? We used to put something like this in /etc/rc.local but that is deprecated, these days the best way to start your scripts will be /usr/local/etc/rc.d mind the syntax it has to be in then, though, you''l need to provide at least a 'start' and 'stop' option. For a starting point, just copy one which is already there. Notice that scripts you put in there will need to have a .sh extension to make them run. > Question 3- Will "wall" (write all) write to ttys waiting for a login: ? From man wall: DESCRIPTION Wall displays the contents of file or, by default, its standard input, on the terminals of all currently logged in users. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ There won't be any messages on other ttys, just for the users who are logged in at that moment. > > Thanks 1- Thanks bigtime. > Thanks 2- No, really; I mean it! :) > Thanks 3- There is no Thanks 3. > > -- > Peter Leftwich > President & Founder > Video2Video Services > Box 13692, La Jolla, CA, 92039 USA > +1-413-403-9555 > > Gr, -- Axel Scheepers UNIX System Administrator email: axel@axel.truedestiny.net a.scheepers@iae.nl http://axel.truedestiny.net/~axel ------------------------------------------ The world is coming to an end. Please log off. ------------------------------------------ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message