From owner-freebsd-questions Fri Jan 4 12:27:22 2002 Delivered-To: freebsd-questions@freebsd.org Received: from ns1.infowest.com (ns1.infowest.com [204.17.177.10]) by hub.freebsd.org (Postfix) with ESMTP id E81B037B41B for ; Fri, 4 Jan 2002 12:27:17 -0800 (PST) Received: from Presarionb (unknown [208.186.109.158]) by ns1.infowest.com (Postfix) with SMTP id B56C322458; Fri, 4 Jan 2002 13:26:52 -0700 (MST) Date: Fri, 04 Jan 2002 13:26:16 -0700 To: Lord Raiden , freebsd-questions@FreeBSD.ORG From: Lorin Lund Subject: Re: Interesting user question Organization: W.B. Software Inc. X-Mailer: Opera 5.11 build 904 X-Priority: 3 (Normal) Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Message-Id: <20020104202652.B56C322458@ns1.infowest.com> 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 The way I would approach this is to have a the FreeBSD boxes check with the the Win98 box periodically. If the Win98 box is unreachable for an extended period of time - say 5 minutes assume it is dead and shut down. Now, what means would I use to confirm the Win98 box is up? One test would be simply to ping it. But I would probably write a UDP/IP program with PERL to run from the startup folder. Similarly on the FreeBSD side a cron job that runs every minute. I would make it send a UDP packet and wait a few seconds. If it gets a response mark the time in a file. If it doesn't get a response check the time in the file. It the last mark is more than 5 minutes old call init to shut things down. (My playing around with 'shutdown' makes me think that there are some conditions under which shutdown doesn't. I think it might test to see if it is tied to a terminal session.) 1/4/2002 12:06:38 PM, Lord Raiden wrote: > Ok, here's a question that just stumps me. I know how to do this to some >degree, but not in the way that the user wants. Ok, here's the gist. User >came to me today and asked for a way that he could use his MSwindows box >(running 98se) to remotely shut down each of his BSD boxes when his 98 >shuts down. > > That I thought was easy. But here's the catch. It can't call for the BSD >boxes to shut down EXCEPT when he's actually shutting down for the >night. Not during normal mid-day reboots, or shutdowns. Only when he >shuts down at 5pm and powers down his workstations for the night and only >when shutting down his win98se machine. Any ideas on this? Right now he >does all 4 by hand, but would like something that doesn't require him to >have to do this all the time. Any ideas? > > Personally I think it's silly, but it's got my curiosity, so I'm asking. :) > >To Unsubscribe: send mail to majordomo@FreeBSD.org >with "unsubscribe freebsd-questions" in the body of the message > > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message