From owner-freebsd-stable@FreeBSD.ORG Sat Jan 27 15:23:57 2007 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D61AA16A400 for ; Sat, 27 Jan 2007 15:23:57 +0000 (UTC) (envelope-from swhetzel@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.184]) by mx1.freebsd.org (Postfix) with ESMTP id 7395C13C4B2 for ; Sat, 27 Jan 2007 15:23:57 +0000 (UTC) (envelope-from swhetzel@gmail.com) Received: by nf-out-0910.google.com with SMTP id m19so1415162nfc for ; Sat, 27 Jan 2007 07:23:56 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=sucva0U4z/LjVVtAdxmFtMmwqxv9XpnyhYbKwXGYL68qj9hx3RplLsYIfDHFSRhauCHPr5arJfgqiEi566rQyjxEy39rN+tSum0AeSZIJsDK2lksyZXR9nhUZBhmmA+tiq18cLLSVUqXqD7m5RpXRGTzC7hrwgMaqmdfnQxllUE= Received: by 10.82.118.2 with SMTP id q2mr2551837buc.1169911435340; Sat, 27 Jan 2007 07:23:55 -0800 (PST) Received: by 10.82.186.2 with HTTP; Sat, 27 Jan 2007 07:23:55 -0800 (PST) Message-ID: <790a9fff0701270723r10fa7fcen326214d393b174d8@mail.gmail.com> Date: Sat, 27 Jan 2007 09:23:55 -0600 From: "Scot Hetzel" To: "Vinny Abello" In-Reply-To: <45BAEFE0.3080408@tellurian.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <45BAEFE0.3080408@tellurian.com> Cc: freebsd-stable@freebsd.org Subject: Re: How to start rc script after sshd starts? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jan 2007 15:23:57 -0000 On 1/27/07, Vinny Abello wrote: > Hello, > > I think this is a relatively easy question to answer but couldn't find anything after some searching. > : > I have a daemon that apparently does a check using ssh-keyscan against the > loopback address when it starts up. The problem I have is that sshd is not started > when the script runs to start this daemon, so it fails and I end up having to start it > manually. What is the recommended way to get this script to start after sshd has > started up? I was hoping to not have to hack any rc scripts up from their defaults for > starting up the system if possible. It's a standard rc script in /usr/local/etc/rc.d. If it > matters, the daemon is smokeping. I can stop it from using ssh-keyscan completely > as I really don't use the probe at all in smokeping but I'm curious as to the proper > way of making this work. > > Any pointers are appreciated. > You need to add: # REQUIRE: sshd to the rc script in /usr/local/etc/rc.d that you want to start after sshd. Another option is to create a dummy script: #!/bin/sh # # PROVIDE: FAKESCRIPT # REQUIRE: sshd # BEFORE: # This is a dummy dependency, to ensure that general purpose daemons # are run _after_ the above are. Scot -- DISCLAIMER: No electrons were mamed while sending this message. Only slightly bruised.