Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Apr 2011 17:34:36 -0400 (EDT)
From:      Rick Macklem <rmacklem@uoguelph.ca>
To:        Doug Barton <dougb@FreeBSD.org>
Cc:        rc@freebsd.org
Subject:   Re: rc scripts change for review
Message-ID:  <1881889748.477841.1303594476291.JavaMail.root@erie.cs.uoguelph.ca>
In-Reply-To: <4DB3089E.3070304@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1881889748.477841.1303594476291.JavaMail.root>