From owner-freebsd-current@FreeBSD.ORG Wed Jun 2 13:02:17 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 75A8516A4CE for ; Wed, 2 Jun 2004 13:02:17 -0700 (PDT) Received: from w250.z064001178.sjc-ca.dsl.cnc.net (adsl-67-125-87-154.dsl.snfc21.pacbell.net [67.125.87.154]) by mx1.FreeBSD.org (Postfix) with SMTP id EBE2043D54 for ; Wed, 2 Jun 2004 13:02:14 -0700 (PDT) (envelope-from jos@catnook.com) Received: (qmail 16525 invoked by uid 1000); 2 Jun 2004 20:02:36 -0000 Date: Wed, 2 Jun 2004 13:02:14 -0700 From: Jos Backus To: current@freebsd.org Message-ID: <20040602200236.GA72488@lizzy.catnook.com> Mail-Followup-To: current@freebsd.org References: <20040602134523.GA26835@genius.tao.org.uk> <20040602140148.GA27036@genius.tao.org.uk> <20040602140923.GA27070@genius.tao.org.uk> <20040603011806.E25331@gamplex.bde.org> <20040602161148.GA3067@dan.emsphone.com> <9C375698-B4CD-11D8-9C6A-003065ABFD92@mac.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9C375698-B4CD-11D8-9C6A-003065ABFD92@mac.com> User-Agent: Mutt/1.5.6i Subject: Re: Problems with periodic scripts in jails [Cron /usr/libexec/save-entropy] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: jos@catnook.com List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jun 2004 20:02:17 -0000 On Wed, Jun 02, 2004 at 03:46:58PM -0400, Charles Swiger wrote: > My suggestion would be to move the invocation of lockfile into the > runjob script itself, so that your crontab is smaller and less > cluttered, and your runjob scripts become smart enough to fend for > themselves. Or use a service controller (e.g. svc -o /service/foo). The service controller guarantees that only one instance of the service will be active at any one time. Combine this with starting the service just once. Bonus: no lock files needed at all. -- Jos Backus _/ _/_/_/ Sunnyvale, CA _/ _/ _/ _/ _/_/_/ _/ _/ _/ _/ jos at catnook.com _/_/ _/_/_/ require 'std/disclaimer'