Subject: Problem rebooting via a PERL script.
To: None <current-users@netbsd.org>
From: Damon Brodie <damon@fundy.net>
List: current-users
Date: 09/29/1998 16:16:02
Hello folks,

I've written a script that will reboot my server.
The perl script is essentially as follows:

#!/usr/local/bin/perl
while (1) {
   sleep 60;
   ...check for the existence of a particular file...
   system("reboot");
}

If I run the script on the console as root and backround it, it reboots
the server properly (when it detects the presence of the file).

If I call the script from /etc/rc.local, the machine locks up after the
script calls reboot.

I think its the lack of a controlling terminal that is causing this problem,
though I'm not sure.

Thanks in Advance for any pointers,

Damon Brodie
damon@fundy.net