From owner-freebsd-current@FreeBSD.ORG Sun Sep 7 09:03:27 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1CB0E8A8; Sun, 7 Sep 2014 09:03:27 +0000 (UTC) Received: from mail-ig0-x236.google.com (mail-ig0-x236.google.com [IPv6:2607:f8b0:4001:c05::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D49711752; Sun, 7 Sep 2014 09:03:26 +0000 (UTC) Received: by mail-ig0-f182.google.com with SMTP id a13so1372656igq.15 for ; Sun, 07 Sep 2014 02:03:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=u8iA3YJLTESzRYZTO/x1m1Z68BlfjUP0Bb/IAAMmQ2M=; b=MOqYw8y4bq/zBoY+E38SCRRAn8Bz5pbAubCI/KxfGPgmL0DHyPD5QKw1vvzicHrB8s l9LmwF07JA79hbzOM6RJW0xJxwam+TLCK9cNpMmX8+pBeQA+acymYhphpNPCeDJfiAEf xvQEdK9jqCrVgcMSYdKn9kPsU3FxECfQDuP+jaQqvPuBQ8E5F2Sd/KNiwm/jUCILIFSL jOeGjy84O4itMPlp/aI+ywIsKSZVYzrVwjneT27jxTKw0gz8R24X1wbdORTfOO0sXwYP v9G1kAe4CqPmtKAXKlzGRU0ydi2svkMRaohrsMa4oJQDosRXoSMeHs6H1j5dKx58EEtf I6xQ== MIME-Version: 1.0 X-Received: by 10.42.82.6 with SMTP id b6mr24616662icl.51.1410080605990; Sun, 07 Sep 2014 02:03:25 -0700 (PDT) Received: by 10.50.122.42 with HTTP; Sun, 7 Sep 2014 02:03:25 -0700 (PDT) In-Reply-To: References: <20140907090321.12bbc428.ohartman@zedat.fu-berlin.de> <20140907153342.2366ad8b@X220.alogt.com> <20140907094308.6c466d9f.ohartman@zedat.fu-berlin.de> Date: Sun, 7 Sep 2014 04:03:25 -0500 Message-ID: Subject: Re: service doen't get started at boottime, but can start manually From: Scot Hetzel To: "O. Hartmann" Content-Type: text/plain; charset=ISO-8859-1 Cc: FreeBSD CURRENT , FreeBSD Ports , Erich Dollansky X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2014 09:03:27 -0000 On Sun, Sep 7, 2014 at 3:39 AM, Scot Hetzel wrote: > I had a look at scripts/refdb.in, it is not a proper rc script for > FreeBSD, as it is missing several keywords: > > # PROVIDE: <- all scripts need this > # REQUIRE: > # BEFORE: > # KEYWORD: <- optional > > Which tells rcorder where to put refdb in the startup order. Since > these are missing, rcorder doesn't place it in the startup list. > I looked again, and it is not rcorder, it's /etc/rc and /etc/rc.subr that determine which script to run. /etc/rc calls find_local_scripts_new from /etc/rc.subr. find_local_scripts_new checks each rc script to make sure that they have at least a "# PROVIDE: " keyword. If it does, then it adds that script to ${local_rc}. Then /etc/rc runs: files=`rcorder /etc/rc.d/* ${local_rc}` to get the startup order for these scripts. Then /etc/rc starts the scripts in the proper order. Since, /usr/local/etc/rc.d/refdb{,.sh.dist} is missing the "# PROVIDE: ", the script is skipped on startup. Since, rc.d/refdb is not a proper rc script, adding refdb_enable=YES to /etc/rc.conf{,.local} will not control the starting of this script. Someone should fix service, so that it checks the rc script has a "# PROVIDE: ", and displays an error message if it doesn't. -- DISCLAIMER: No electrons were maimed while sending this message. Only slightly bruised.