Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 May 2002 13:06:21 +0200
From:      Axel Scheepers <axel@axel.truedestiny.net>
To:        Peter Leftwich <Hostmaster@Video2Video.Com>
Cc:        FreeBSD Questions LIST <FreeBSD-Questions@FreeBSD.Org>
Subject:   Re: rc.conf or loader.conf, at now + 30 minutes
Message-ID:  <20020519130621.C64761@mars.thuis>
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
References:  <20020518203532.Q710-100000@66-75-1-142.san.rr.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




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