From owner-freebsd-rc@FreeBSD.ORG Sat Apr 23 21:34:37 2011 Return-Path: Delivered-To: rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A07F71065670 for ; Sat, 23 Apr 2011 21:34:37 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-jnhn.mail.uoguelph.ca (esa-jnhn.mail.uoguelph.ca [131.104.91.44]) by mx1.freebsd.org (Postfix) with ESMTP id 564088FC12 for ; Sat, 23 Apr 2011 21:34:37 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApwEAK1Es02DaFvO/2dsb2JhbACET6IQiHCoPo9rgSmDUH0EjjU X-IronPort-AV: E=Sophos;i="4.64,259,1301889600"; d="scan'208";a="119298724" Received: from erie.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.206]) by esa-jnhn-pri.mail.uoguelph.ca with ESMTP; 23 Apr 2011 17:34:36 -0400 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id 5DDCAB3EB1; Sat, 23 Apr 2011 17:34:36 -0400 (EDT) Date: Sat, 23 Apr 2011 17:34:36 -0400 (EDT) From: Rick Macklem To: Doug Barton Message-ID: <1881889748.477841.1303594476291.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: <4DB3089E.3070304@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.91.203] X-Mailer: Zimbra 6.0.10_GA_2692 (ZimbraWebClient - IE7 (Win)/6.0.10_GA_2692) Cc: rc@freebsd.org Subject: Re: rc scripts change for review X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Apr 2011 21:34:37 -0000 > > So can you say a little more about what you're trying to accomplish? > It's not clear to me why instead of doing this: > > + if ! sysctl vfs.newnfs >/dev/null 2>&1; then > + force_depend nfssrv || return 1 > + fi > > you would not just do this: > > + if ! sysctl vfs.newnfs >/dev/null 2>&1; then > + load_kld nfsd > + fi > Well, I know diddly squat (a technical term:-) about shell programming. The above was just cribbed from what it already did for the regular NFS server using "nfsserver". (As far as I know, the only purpose of "nfsserver" is to make sure the module is loaded. It might have been done before the mountd and nfsd daemons knew to load the module, as required. I'll try the load_kld version.) > And finally a meta-note, I admire that you are at least checking for > success on your commands, but FYI rather than relying on return it's > helpful to use either warn for advisories or err for fatal errors to > provide more information about why things are failing. You can read up > on these in the comments in /etc/rc.subr, and/or look in /etc/rc.d for > examples of how they are used. > Ok, I'll take a look. (Again, I was just cribbing what was already there.) Thanks, rick