From owner-freebsd-questions@FreeBSD.ORG Wed Jun 20 13:02:45 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3BAC41065674 for ; Wed, 20 Jun 2012 13:02:45 +0000 (UTC) (envelope-from rwmaillists@googlemail.com) Received: from mail-ee0-f54.google.com (mail-ee0-f54.google.com [74.125.83.54]) by mx1.freebsd.org (Postfix) with ESMTP id B79418FC14 for ; Wed, 20 Jun 2012 13:02:44 +0000 (UTC) Received: by eeke49 with SMTP id e49so2812691eek.13 for ; Wed, 20 Jun 2012 06:02:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=date:from:to:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type:content-transfer-encoding; bh=eB7IQGcxhtQ0pMjiK++c/AmlsjGTYspsm0ckpdw8YwM=; b=eSHE/oDbrAgUrHksE4Y3uEkcwQYu/7eUHw1HqpLj0O+2Fo1u5Lyt15HheSmHRdnZDN G2cd2cwJIiOZaXrSB5R0sSetX1byScSy27sH/+/fctFmeAGYEOPCs0IQrOPcU9a3OlCB vyW3ViGdk7cDt2q8PYJ7hjWBXml1YjE1c9b42RR3fED6PQ//Q5HKzlrfF4qazbhIFzx/ r4NKWNNCwEATLMSB+Tgn59I8F66jC5/TgZzkZYxkhVMddO+9io6doxhZZ2SCNaq3s8+R hmNruABLWTEh3CArQ30oZ6zYd+Odbbp9tqOZZkI8QbqRyfIEEmY5Z63KqYSd1bASn6xa DOlA== Received: by 10.14.119.73 with SMTP id m49mr4591639eeh.187.1340197363773; Wed, 20 Jun 2012 06:02:43 -0700 (PDT) Received: from gumby.homeunix.com (87-194-105-247.bethere.co.uk. [87.194.105.247]) by mx.google.com with ESMTPS id v16sm88754466eem.17.2012.06.20.06.02.41 (version=SSLv3 cipher=OTHER); Wed, 20 Jun 2012 06:02:42 -0700 (PDT) Date: Wed, 20 Jun 2012 14:02:40 +0100 From: RW To: freebsd-questions@freebsd.org Message-ID: <20120620140240.6b6f660a@gumby.homeunix.com> In-Reply-To: <20120620080248.7f3cb6c9@scorpio> References: <4FE18D93.4060809@FreeBSD.org> <20120620124729.7f50b781@gumby.homeunix.com> <20120620080248.7f3cb6c9@scorpio> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.6; amd64-portbld-freebsd8.3) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: seems i cannot fully understand {/,/usr/local/}/etc/rc.d/* X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jun 2012 13:02:45 -0000 On Wed, 20 Jun 2012 08:02:48 -0400 Jerry wrote: > On Wed, 20 Jun 2012 12:47:29 +0100 > RW articulated: > > > On Wed, 20 Jun 2012 09:45:07 +0100 > > Matthew Seaman wrote: > > > > > #!/bin/sh > > > # > > > # Persuade vboxheadless to start before samba. > > > > > > # PROVIDE: precedence > > > # REQUIRE: vboxheadless > > > # BEFORE: samba > > > > > > : > > > > > > Make it executable. Note -- the ':' does seem to be necessary. > > > > Why? None of the dummy scripts in the base system have a ":". > > From "man rc" > > EXAMPLES > The following is a minimal rc.d/ style script. Most scripts > require lit- tle more than the following. > > #!/bin/sh > # > > # PROVIDE: foo > # REQUIRE: bar_service_required_to_precede_foo > > . /etc/rc.subr > > name="foo" > rcvar=`set_rcvar` > command="/usr/local/bin/foo" > > load_rc_config $name > run_rc_command "$1" > > You will notice the prominent use of ":". We were talking about the null command colon at the bottom of the script, not the colons in comments at the top.