From owner-freebsd-stable@FreeBSD.ORG Tue Jun 14 15:33:56 2005 Return-Path: X-Original-To: stable@freebsd.org Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3FFF516A41C for ; Tue, 14 Jun 2005 15:33:56 +0000 (GMT) (envelope-from mitch@kuoi.asui.uidaho.edu) Received: from kuoi.asui.uidaho.edu (kuoi.asui.uidaho.edu [129.101.191.123]) by mx1.FreeBSD.org (Postfix) with SMTP id 0F19543D49 for ; Tue, 14 Jun 2005 15:33:56 +0000 (GMT) (envelope-from mitch@kuoi.asui.uidaho.edu) Received: (qmail 80623 invoked by uid 1010); 14 Jun 2005 15:33:54 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 14 Jun 2005 15:33:54 -0000 Date: Tue, 14 Jun 2005 08:33:54 -0700 (PDT) From: Mitch Parks To: "Michael W. Lucas" In-Reply-To: <20050614150240.GA62949@bewilderbeast.blackhelicopters.org> Message-ID: <20050614082632.L1139@kuoi.asui.uidaho.edu> References: <20050614150240.GA62949@bewilderbeast.blackhelicopters.org> X-Radio: KUOI MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: stable@freebsd.org Subject: Re: /usr/local/etc/rc.d/*.sh not working? 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: Tue, 14 Jun 2005 15:33:56 -0000 On Tue, 14 Jun 2005, Michael W. Lucas wrote: > > I'm certain this is documented somewhere, but danged if I can find it. > > I have a whole variety of custom scripts in /usr/local/etc/rc.d. For > years now, simply giving them a name ending in .sh and making them > executable has been sufficient to make them start on boot. > > On 5.x, it's not. And now, having upgraded to 4.11-s on some older > boxes and running portupgrade -a, it's not. > > Obviously these scripts need something else. There's no fancy rcNG > infrastructure in them; is rcNG a requirement for startup scripts now? > Any pointers on where I can find the right documentation? > You might want to look at `man rc.d`. There are example scripts there. When I went to 5.x I updated all of my rc.d scripts to use what's labeled there as the "old style" format like: The following is a simple, hypothetical example of an old-style /usr/local/etc/rc.d/ script, which would start a daemon at boot time, and kill it at shutdown time. #!/bin/sh - # # initialization/shutdown script for foobar package case "$1" in start) /usr/local/sbin/foo -d && echo -n ' foo' ;; stop) kill `cat /var/run/foo.pid` && echo -n ' foo' ;; *) echo "unknown option: $1 - should be 'start' or 'stop'" >&2 ;; esac SEE ALSO kill(1), rc.conf(5), init(8), rcorder(8), rc.subr(8), reboot(8), savecore(8) HISTORY The rc utility appeared in 4.0BSD. FreeBSD 5.4 November 4, 2002 FreeBSD 5.4 | Mitch Parks * mitch@uidaho.edu | "I bring you love and deeper understanding." - Kate Bush