From owner-freebsd-rc@FreeBSD.ORG Sun May 24 19:24:08 2009 Return-Path: Delivered-To: freebsd-rc@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C5F4710656B0; Sun, 24 May 2009 19:24:08 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 9A4F78FC2A; Sun, 24 May 2009 19:24:08 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from freefall.freebsd.org (gavin@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n4OJO8BB046422; Sun, 24 May 2009 19:24:08 GMT (envelope-from gavin@freefall.freebsd.org) Received: (from gavin@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n4OJO8qG046418; Sun, 24 May 2009 19:24:08 GMT (envelope-from gavin) Date: Sun, 24 May 2009 19:24:08 GMT Message-Id: <200905241924.n4OJO8qG046418@freefall.freebsd.org> To: gavin@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-rc@FreeBSD.org From: gavin@FreeBSD.org Cc: Subject: Re: conf/134918: rc.subr fails to detect perl daemons 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: Sun, 24 May 2009 19:24:10 -0000 Synopsis: rc.subr fails to detect perl daemons Responsible-Changed-From-To: freebsd-bugs->freebsd-rc Responsible-Changed-By: gavin Responsible-Changed-When: Sun May 24 19:23:13 UTC 2009 Responsible-Changed-Why: Over to maintainers http://www.freebsd.org/cgi/query-pr.cgi?pr=134918 From owner-freebsd-rc@FreeBSD.ORG Mon May 25 11:06:59 2009 Return-Path: Delivered-To: freebsd-rc@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F29A51065677 for ; Mon, 25 May 2009 11:06:59 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id DED518FC0A for ; Mon, 25 May 2009 11:06:59 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n4PB6xPn092941 for ; Mon, 25 May 2009 11:06:59 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n4PB6xl2092937 for freebsd-rc@FreeBSD.org; Mon, 25 May 2009 11:06:59 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 25 May 2009 11:06:59 GMT Message-Id: <200905251106.n4PB6xl2092937@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-rc@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-rc@FreeBSD.org 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: Mon, 25 May 2009 11:07:00 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o conf/134918 rc rc.subr fails to detect perl daemons o conf/134660 rc [patch] rc-script for initializing ng_netflow+ng_ipfw o conf/134333 rc PPP configuration problem in the rc.d scripts in combi o conf/134006 rc [patch] Unload console screensaver kernel modules if s o conf/133987 rc [rc.d] defaultroute broken with DHCP in some cases o conf/133890 rc [patch] sshd(8): add multiple profiles to the rc.d scr o conf/132766 rc wait_for_pids() in /etc/rc.subr is dull. o conf/132483 rc rc.subr(8) [patch] setfib(1) support for rc.subr o conf/132476 rc [rc.d] [patch] add support setfib(1) in rc.d/routing o conf/130414 rc [patch] rc services started with onestart are not stop o conf/128299 rc [patch] /etc/rc.d/geli does not mount partitions using o conf/127917 rc [patch] dumpon rejects on start with physmem>swap even o bin/126562 rc rcorder(8) fails to run unrelated startup scripts when o conf/126392 rc [patch] rc.conf ifconfig_xx keywords cannot be escaped o bin/126324 rc [patch] rc.d/tmp: Prevent mounting /tmp in second tim o conf/124747 rc [patch] savecore can't create dump from encrypted swap o conf/124248 rc [jail] [patch] add support for nice value for rc.d/jai o conf/123734 rc [patch] Chipset VIA CX700 requires extra initializatio o conf/123222 rc [patch] Add rtprio(1)/idprio(1) support to rc.subr(8). o conf/122477 rc [patch] /etc/rc.d/mdconfig and mdconfig2 are ignoring o conf/122170 rc [patch] [request] New feature: notify admin via page o o kern/121566 rc [nfs] [request] [patch] ethernet iface should be broug o conf/120431 rc [patch] devfs.rules are not initialized under certain o conf/120406 rc [devd] [patch] Handle newly attached pcm devices (eg. o conf/120228 rc [zfs] [patch] Split ZFS volume startup / ease ZFS swap o conf/120194 rc [patch] UFS volumes on ZVOLs cannot be fsck'd at boot o conf/119874 rc [patch] "/etc/rc.d/pf reload" fails if there are macro o conf/119076 rc [patch] [rc.d] /etc/rc.d/netif tries to remove alias a o bin/118325 rc [patch] [request] new periodic script to test statuses o conf/118255 rc savecore never finding kernel core dumps (rcorder prob o conf/117935 rc [patch] ppp fails to start at boot because of missing o conf/113915 rc [patch] ndis wireless driver fails to associate when i o conf/109980 rc /etc/rc.d/netif restart doesn't destroy cloned_interfa o conf/109562 rc [rc.d] [patch] [request] Make rc.d/devfs usable from c o conf/108589 rc rtsol(8) fails due to default ipfw rules o conf/106009 rc [ppp] [patch] [request] Fix pppoed startup script to p o conf/105689 rc [ppp] [request] syslogd starts too late at boot o conf/105568 rc [patch] [request] Add more flexibility to rc.conf, to o conf/105145 rc [ppp] [patch] [request] add redial function to rc.d/pp o conf/104549 rc [patch] rc.d/nfsd needs special _find_processes functi o conf/102700 rc [geli] [patch] Add encrypted /tmp support to GELI/GBDE o conf/99721 rc [patch] /etc/rc.initdiskless problem copy dotfile in s o conf/99444 rc [patch] Enhancement: rc.subr could easily support star o conf/96343 rc [patch] rc.d order change to start inet6 before pf o conf/93815 rc [patch] Adds in the ability to save ipfw rules to rc.d o conf/92523 rc [patch] allow rc scripts to kill process after a timeo o conf/89870 rc [patch] [request] make netif verbose rc.conf toggle o conf/89061 rc [patch] IPv6 6to4 auto-configuration enhancement o conf/88913 rc [patch] wrapper support for rc.subr o conf/85819 rc [patch] script allowing multiuser mode in spite of fsc o kern/81006 rc ipnat not working with tunnel interfaces on startup o conf/77663 rc Suggestion: add /etc/rc.d/addnetswap after addcritremo o conf/73677 rc [patch] add support for powernow states to power_profi o conf/58939 rc [patch] dumb little hack for /etc/rc.firewall{,6} o conf/56934 rc [patch] rc.firewall rules for natd expect an interface o conf/45226 rc [patch] Fix for rc.network, ppp-user annoyance o conf/44170 rc [patch] Add ability to run multiple pppoed(8) on start 57 problems total. From owner-freebsd-rc@FreeBSD.ORG Thu May 28 22:40:01 2009 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 6613E106564A for ; Thu, 28 May 2009 22:40:01 +0000 (UTC) (envelope-from rick@snowhite.cis.uoguelph.ca) Received: from gigi.cs.uoguelph.ca (gigi.cs.uoguelph.ca [131.104.94.210]) by mx1.freebsd.org (Postfix) with ESMTP id 23F288FC1B for ; Thu, 28 May 2009 22:40:00 +0000 (UTC) (envelope-from rick@snowhite.cis.uoguelph.ca) Received: from snowhite.cis.uoguelph.ca (snowhite.cis.uoguelph.ca [131.104.48.1]) by gigi.cs.uoguelph.ca (8.13.1/8.13.1) with ESMTP id n4SKlInK007940; Thu, 28 May 2009 16:47:18 -0400 Received: (from rick@localhost) by snowhite.cis.uoguelph.ca (8.9.3/8.9.3) id QAA12312; Thu, 28 May 2009 16:47:09 -0400 (EDT) Date: Thu, 28 May 2009 16:47:09 -0400 (EDT) From: Rick Macklem Message-Id: <200905282047.QAA12312@snowhite.cis.uoguelph.ca> To: rc@freebsd.org X-Scanned-By: MIMEDefang 2.63 on 131.104.94.210 Cc: rwatson@freebsd.org, kib@freebsd.org Subject: rc scripts for the new experimental nfs subsystem 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: Thu, 28 May 2009 22:40:01 -0000 Hi, I've just put the sources and man pages for an experimental alternative to the regular NFS subsystem in FreeBSD-CURRENT. I have some rc scripts that I use to run it, but I'm not much of a shell programmer, so I wondered if someone might be able to review them? Thanks in advance for any help, rick Essentially, if nfsv4_serversupport_enable is yes, the "-e" argument must be added to the argument list for nfsd and mountd, so that they run the experimental server. (The current versions of these functions are the only ones that know "-e" and they also know to load the correct modules, so I don't think the business of running "nfsserver" to get the module loaded is necessary for this case.) It also forces the startup of nfsuserd. nfsuserd is used by both client and server and nfscbd is optionally used by the client, for callback handling. They know to load the correct modules, as required. I've added the following variables to /etc/defaults/rc.conf: nfsv4_serversupport_enable="NO" # Enable support for NFSv4 nfsv4_cbd_enable="NO" # NFSv4 client side callback daemon nfsv4_cbd_flags="" # Flags for nfscbd nfsv4_userd_enable="NO" # NFSv4 user/group name mapping daemon nfsv4_userd_flags="" # Flags for nfsuserd and then there are 2 modified scripts for /etc/rc.d and two new ones. A modified nfsd: #!/bin/sh # # $FreeBSD: src/etc/rc.d/nfsd,v 1.16 2008/11/03 10:38:00 dfr Exp $ # # PROVIDE: nfsd # REQUIRE: mountd hostname gssd # KEYWORD: nojail shutdown . /etc/rc.subr name="nfsd" rcvar=`set_rcvar nfs_server` command="/usr/sbin/${name}" load_rc_config $name start_precmd="nfsd_precmd" sig_stop="USR1" nfsd_precmd() { # If nfsv4_serversupport_enable is yes, force use of the experimental # server # if checkyesno nfsv4_serversupport_enable; then rc_flags="-e ${nfs_server_flags}" else rc_flags="${nfs_server_flags}" fi if checkyesno nfsv4_serversupport_enable; then if ! checkyesno nfsv4_userd_enable && \ ! /etc/rc.d/nfsuserd forcestatus 1>/dev/null 2>&1 then force_depend nfsuserd || return 1 fi elif ! sysctl vfs.nfsrv >/dev/null 2>&1; then force_depend nfsserver || return 1 fi if ! checkyesno rpcbind_enable && \ ! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1 then force_depend rpcbind || return 1 fi if ! checkyesno mountd_enable && \ ! /etc/rc.d/mountd forcestatus 1>/dev/null 2>&1 then force_depend mountd || return 1 fi if ! checkyesno nfsv4_serversupport_enable && \ checkyesno nfs_reserved_port_only; then echo 'NFS on reserved port only=YES' sysctl vfs.nfsrv.nfs_privport=1 > /dev/null fi return 0 } run_rc_command "$1" A modified mountd: #!/bin/sh # # $FreeBSD: src/etc/rc.d/mountd,v 1.21 2008/07/16 19:50:29 dougb Exp $ # # PROVIDE: mountd # REQUIRE: NETWORKING nfsserver rpcbind quota # KEYWORD: nojail shutdown . /etc/rc.subr name="mountd" rcvar=`set_rcvar` command="/usr/sbin/${name}" pidfile="/var/run/${name}.pid" required_files="/etc/exports" start_precmd="mountd_precmd" extra_commands="reload" mountd_precmd() { if ! checkyesno rpcbind_enable && \ ! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1 then force_depend rpcbind || return 1 fi # mountd flags will differ depending on rc.conf settings # if checkyesno nfs_server_enable ; then if checkyesno weak_mountd_authentication; then rc_flags="${mountd_flags} -n" fi else if checkyesno mountd_enable; then checkyesno weak_mountd_authentication && rc_flags="-n" fi fi # If nfsv4_serversupport_enable is yes, force use of the experimental # server # if checkyesno nfsv4_serversupport_enable; then rc_flags="-e ${rc_flags}" fi if checkyesno zfs_enable; then rc_flags="${rc_flags} /etc/exports /etc/zfs/exports" fi rm -f /var/db/mountdtab ( umask 022 ; > /var/db/mountdtab ) return 0 } load_rc_config $name run_rc_command "$1" A new script for the nfsuserd: #!/bin/sh # # $FreeBSD$ # # PROVIDE: nfsuserd # KEYWORD: nojail . /etc/rc.subr name="nfsuserd" rcvar="nfsv4_userd_enable" command="/usr/sbin/${name}" load_rc_config $name command_args="${nfsv4_userd_flags}" sig_stop="USR1" run_rc_command "$1" and a new script for the nfscbd: #!/bin/sh # # $FreeBSD$ # # PROVIDE: nfscbd # KEYWORD: nojail . /etc/rc.subr name="nfscbd" rcvar="nfsv4_cbd_enable" command="/usr/sbin/${name}" load_rc_config $name command_args="${nfsv4_cbd_flags}" sig_stop="USR1" run_rc_command "$1" From owner-freebsd-rc@FreeBSD.ORG Thu May 28 23:41:50 2009 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B882F1065677 for ; Thu, 28 May 2009 23:41:50 +0000 (UTC) (envelope-from nslay@comcast.net) Received: from QMTA06.westchester.pa.mail.comcast.net (qmta06.westchester.pa.mail.comcast.net [76.96.62.56]) by mx1.freebsd.org (Postfix) with ESMTP id 645358FC17 for ; Thu, 28 May 2009 23:41:50 +0000 (UTC) (envelope-from nslay@comcast.net) Received: from OMTA03.westchester.pa.mail.comcast.net ([76.96.62.27]) by QMTA06.westchester.pa.mail.comcast.net with comcast id xB7n1b00B0bG4ec56BUbgh; Thu, 28 May 2009 23:28:35 +0000 Received: from LIGHTBULB.LOCAL ([69.244.210.117]) by OMTA03.westchester.pa.mail.comcast.net with comcast id xBUb1b0022YXfpR3PBUbxB; Thu, 28 May 2009 23:28:35 +0000 Message-ID: <4A1F1DA3.8010005@comcast.net> Date: Thu, 28 May 2009 19:26:27 -0400 From: Nathan Lay User-Agent: Thunderbird 2.0.0.21 (X11/20090406) MIME-Version: 1.0 To: freebsd-rc@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Profile rc idea 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: Thu, 28 May 2009 23:41:51 -0000 Hi list, It would be interesting if rc was extended to support profiles. Each profile would reflect a different system configuration. For example profiles could describe the computing environment at: home, work, friend's house, airplane, etc... The active profile the system uses could be chosen based on some contingency condition. For example, simply prompting the user to choose an rc profile at boot, or using hardware to choose the profile (e.g. like location based contingency using GPS hardware), or whatever... I guess this only pertains to booting though, but rc seems like a natural place to do this. Thoughts, comments? Yet another idea I have no time to try... Best Regards, Nathan Lay From owner-freebsd-rc@FreeBSD.ORG Fri May 29 04:37:16 2009 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 62049106564A for ; Fri, 29 May 2009 04:37:16 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id F13BC8FC13 for ; Fri, 29 May 2009 04:37:15 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: (qmail 11095 invoked by uid 399); 29 May 2009 04:10:35 -0000 Received: from localhost (HELO ?192.168.0.101?) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 29 May 2009 04:10:35 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4A1F603A.9080400@FreeBSD.org> Date: Thu, 28 May 2009 21:10:34 -0700 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: Nathan Lay References: <4A1F1DA3.8010005@comcast.net> In-Reply-To: <4A1F1DA3.8010005@comcast.net> X-Enigmail-Version: 0.95.7 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-rc@freebsd.org Subject: Re: Profile rc idea 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: Fri, 29 May 2009 04:37:16 -0000 Sounds great, we look forward to reviewing your patches. :) Seriously, lots of people have proposed this, no one has come up with a serious implementation yet. Depending on what variables you want to set a very simple implementation could be a script that prompts the user with a menu to choose their location and sets the variables accordingly. That script could be set to run first using the existing rc.d system. Doug Nathan Lay wrote: > Hi list, > It would be interesting if rc was extended to support profiles. Each > profile would reflect a different system configuration. For example > profiles could describe the computing environment at: home, work, > friend's house, airplane, etc... The active profile the system uses > could be chosen based on some contingency condition. For example, > simply prompting the user to choose an rc profile at boot, or using > hardware to choose the profile (e.g. like location based contingency > using GPS hardware), or whatever... I guess this only pertains to > booting though, but rc seems like a natural place to do this. Thoughts, > comments? Yet another idea I have no time to try... > > Best Regards, > Nathan Lay > > _______________________________________________ > freebsd-rc@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-rc > To unsubscribe, send any mail to "freebsd-rc-unsubscribe@freebsd.org" > From owner-freebsd-rc@FreeBSD.ORG Fri May 29 05:01:46 2009 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 0503B1065674 for ; Fri, 29 May 2009 05:01:46 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id ABCFA8FC14 for ; Fri, 29 May 2009 05:01:45 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: (qmail 7383 invoked by uid 399); 29 May 2009 04:32:17 -0000 Received: from localhost (HELO ?192.168.0.101?) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 29 May 2009 04:32:17 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4A1F654F.6000509@FreeBSD.org> Date: Thu, 28 May 2009 21:32:15 -0700 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: Rick Macklem References: <200905282047.QAA12312@snowhite.cis.uoguelph.ca> In-Reply-To: <200905282047.QAA12312@snowhite.cis.uoguelph.ca> X-Enigmail-Version: 0.95.7 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: kib@freebsd.org, rc@freebsd.org, rwatson@freebsd.org Subject: Re: rc scripts for the new experimental nfs subsystem 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: Fri, 29 May 2009 05:01:46 -0000 Overall this looks good, I've made a few comments in line based on a cursory inspection. Please review http://www.freebsd.org/doc/en_US.ISO8859-1/articles/rc-scripting/ as well. hth, Doug Rick Macklem wrote: > Hi, > > I've just put the sources and man pages for an experimental alternative > to the regular NFS subsystem in FreeBSD-CURRENT. I have some rc scripts > that I use to run it, but I'm not much of a shell programmer, so I > wondered if someone might be able to review them? > > Thanks in advance for any help, rick > > Essentially, if nfsv4_serversupport_enable Can we shorten the middle part of that? Not a requirement, but it's a bit long. > is yes, the "-e" argument must > be added to the argument list for nfsd and mountd, so that they run the > experimental server. (The current versions of these functions are the only > ones that know "-e" and they also know to load the correct modules, so I > don't think the business of running "nfsserver" to get the module loaded > is necessary for this case.) It also forces the startup of nfsuserd. > > nfsuserd is used by both client and server and nfscbd is optionally used > by the client, for callback handling. They know to load the correct modules, > as required. > > I've added the following variables to /etc/defaults/rc.conf: > nfsv4_serversupport_enable="NO" # Enable support for NFSv4 > nfsv4_cbd_enable="NO" # NFSv4 client side callback daemon > nfsv4_cbd_flags="" # Flags for nfscbd > nfsv4_userd_enable="NO" # NFSv4 user/group name mapping daemon > nfsv4_userd_flags="" # Flags for nfsuserd > > and then there are 2 modified scripts for /etc/rc.d Can you provide a unified diff? That's easier to review (at least for me). > and two new ones. > A modified nfsd: > #!/bin/sh > # > # $FreeBSD: src/etc/rc.d/nfsd,v 1.16 2008/11/03 10:38:00 dfr Exp $ > # > > # PROVIDE: nfsd > # REQUIRE: mountd hostname gssd > # KEYWORD: nojail shutdown > > . /etc/rc.subr > > name="nfsd" > rcvar=`set_rcvar nfs_server` > command="/usr/sbin/${name}" > > load_rc_config $name > start_precmd="nfsd_precmd" > sig_stop="USR1" > > nfsd_precmd() > { > # If nfsv4_serversupport_enable is yes, force use of the experimental > # server > # > if checkyesno nfsv4_serversupport_enable; then > rc_flags="-e ${nfs_server_flags}" > else > rc_flags="${nfs_server_flags}" > fi > > if checkyesno nfsv4_serversupport_enable; then > if ! checkyesno nfsv4_userd_enable && \ > ! /etc/rc.d/nfsuserd forcestatus 1>/dev/null 2>&1 > then > force_depend nfsuserd || return 1 > fi > elif ! sysctl vfs.nfsrv >/dev/null 2>&1; then > force_depend nfsserver || return 1 > fi > > if ! checkyesno rpcbind_enable && \ > ! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1 > then > force_depend rpcbind || return 1 > fi > > if ! checkyesno mountd_enable && \ > ! /etc/rc.d/mountd forcestatus 1>/dev/null 2>&1 > then > force_depend mountd || return 1 > fi > > if ! checkyesno nfsv4_serversupport_enable && \ > checkyesno nfs_reserved_port_only; then > echo 'NFS on reserved port only=YES' > sysctl vfs.nfsrv.nfs_privport=1 > /dev/null > fi > return 0 > } > > run_rc_command "$1" > > A modified mountd: > #!/bin/sh > # > # $FreeBSD: src/etc/rc.d/mountd,v 1.21 2008/07/16 19:50:29 dougb Exp $ > # > > # PROVIDE: mountd > # REQUIRE: NETWORKING nfsserver rpcbind quota > # KEYWORD: nojail shutdown > > . /etc/rc.subr > > name="mountd" > rcvar=`set_rcvar` > command="/usr/sbin/${name}" > pidfile="/var/run/${name}.pid" > required_files="/etc/exports" > start_precmd="mountd_precmd" > extra_commands="reload" > > mountd_precmd() > { > if ! checkyesno rpcbind_enable && \ > ! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1 > then > force_depend rpcbind || return 1 > fi > > # mountd flags will differ depending on rc.conf settings > # > if checkyesno nfs_server_enable ; then > if checkyesno weak_mountd_authentication; then > rc_flags="${mountd_flags} -n" > fi > else > if checkyesno mountd_enable; then > checkyesno weak_mountd_authentication && rc_flags="-n" > fi > fi > > # If nfsv4_serversupport_enable is yes, force use of the experimental > # server > # > if checkyesno nfsv4_serversupport_enable; then > rc_flags="-e ${rc_flags}" > fi > > if checkyesno zfs_enable; then > rc_flags="${rc_flags} /etc/exports /etc/zfs/exports" > fi > > rm -f /var/db/mountdtab > ( umask 022 ; > /var/db/mountdtab ) > return 0 > } > > load_rc_config $name > run_rc_command "$1" > > A new script for the nfsuserd: > #!/bin/sh > # > # $FreeBSD$ > # > > # PROVIDE: nfsuserd > # KEYWORD: nojail Since this seems to start a service, the shutdown KEYWORD is needed. Same thing with the script below as well. > . /etc/rc.subr > > name="nfsuserd" > rcvar="nfsv4_userd_enable" > command="/usr/sbin/${name}" > > load_rc_config $name > command_args="${nfsv4_userd_flags}" This defeats how command_args is supposed to work. I'm not sure off hand what's the best solution here though. In general it reduces confusion if you set $name, the name of the script file, and the PROVIDE line all to the same thing. What's your long term plan for this? Will the variables in rc.conf eventually be renamed nfsuserd_*? > sig_stop="USR1" > > run_rc_command "$1" > > and a new script for the nfscbd: > #!/bin/sh > # > # $FreeBSD$ > # > > # PROVIDE: nfscbd > # KEYWORD: nojail > > . /etc/rc.subr > > name="nfscbd" > rcvar="nfsv4_cbd_enable" > command="/usr/sbin/${name}" > > load_rc_config $name > command_args="${nfsv4_cbd_flags}" > sig_stop="USR1" > > run_rc_command "$1" > _______________________________________________ > freebsd-rc@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-rc > To unsubscribe, send any mail to "freebsd-rc-unsubscribe@freebsd.org" > From owner-freebsd-rc@FreeBSD.ORG Fri May 29 13:46:24 2009 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37F7E106566B for ; Fri, 29 May 2009 13:46:24 +0000 (UTC) (envelope-from yvesguerin@yahoo.ca) Received: from web56408.mail.re3.yahoo.com (web56408.mail.re3.yahoo.com [216.252.111.87]) by mx1.freebsd.org (Postfix) with SMTP id C1C858FC1A for ; Fri, 29 May 2009 13:46:22 +0000 (UTC) (envelope-from yvesguerin@yahoo.ca) Received: (qmail 58105 invoked by uid 60001); 29 May 2009 13:19:42 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.ca; s=s1024; t=1243603182; bh=UJ6tOQXwmXeIUNIvBQif9L8+303I5jTC9523tsRHY8o=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=TIZ884VHNiFIJtVDJl/MhR3OBf6Kw6svWfOm+W3YB/TYy1Co+kATDGHb6RrTfMdmDSxHfip1BMgGgQYyVwxQujR7xHrVUJrOTVuI5WqFAQqK4XsNttSt5rGsJQ2d57pZTboNFa4j7TeAxeG6UHJKYLYe1dpPW7umXRXU6e73CWk= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.ca; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=kMwWxQ3vDm97VIFxZKUVkGZd8goundCpinSfLyu6ePM0q/cuW0ezwIgebGgXXVnwFhw90A6p4IIhSsPxkRCMOloyljCtylF2J4cKs88vDw/2ZNUegt9XHctLAV5RHwsVE34F/S8EO0Lng59pSBWxwlEqVn2AMTIeZNDYKumdo84=; Message-ID: <302139.58064.qm@web56408.mail.re3.yahoo.com> X-YMail-OSG: HL0xwp8VM1n3YVc7xqiPr_YJN3fJO0elxbjZXTGLuODJFsmwfA4nvqk2QD0u1HLHNT93mL_wT4Cg7R7hQfIgnqmeyIwqtd522x9u3umJe9zzYj_HhMB4G8TEukbngRbDCuaqg873co6gamPiAntKoYoTawItjZPYd8htNr7I1pqPayyKR2csW3eUGOBqxvdG1gO2z7cYomnramdBxPNKN0e8nIy2Rt5nWj1vV644ljrstMa2hYsIIxcsWJttv3Vs7p3IQVeW_z9Q_D9OEHMH6TkFqLh9HCLitMUFplV9CipPoneRUYqfP9x_fbDSB_saDW5NVaRW3j5D4Q-- Received: from [198.168.152.20] by web56408.mail.re3.yahoo.com via HTTP; Fri, 29 May 2009 06:19:42 PDT X-Mailer: YahooMailClassic/5.3.9 YahooMailWebService/0.7.289.10 Date: Fri, 29 May 2009 06:19:42 -0700 (PDT) From: =?iso-8859-1?Q?Yves_Gu=E9rin?= To: freebsd-rc@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Fw : Re : Profile rc idea X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: yvesguerin@yahoo.ca 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: Fri, 29 May 2009 13:46:25 -0000 Hello, I forgot to cc to the list, sorry. Yves Guerin --- En date de : Ven 29.5.09, Yves Gu=E9rin a =E9crit= : De: Yves Gu=E9rin Objet: Re : Profile rc idea =C0: "Nathan Lay" Date: Vendredi 29 Mai 2009, 7h14 Dear Sir, I did something similar to your idea, I custom the boot menu (beastie.4th) = to choose between home, office, dhcp and default configuration for my netwo= rk interface on my laptop. I grab the answer or the choice via the kenv system call, and on my rc dire= ctory I start my own script just before netif to configure my network depen= ding on the answer I choose at boot time. So I think the idea can be modify= for every used that you can dream of. I am able to send you my configuration, the boot menu and the rc file. Regards, Yves Guerin --- En date de=A0: Ven 29.5.09, Nathan Lay a =E9crit=A0= : De: Nathan Lay Objet: Profile rc idea =C0:=0A freebsd-rc@freebsd.org Date: Vendredi 29 Mai 2009, 4h26 Hi list, It would be interesting if rc was extended to support profiles.=A0 Each pro= file would reflect a different system configuration.=A0 For example profile= s could describe the computing environment at: home, work, friend's house, = airplane, etc... The active profile the system uses could be chosen based o= n some contingency condition.=A0 For example, simply prompting the user to = choose an rc profile at boot, or using hardware to choose the profile (e.g.= like location based contingency using GPS hardware), or whatever...=A0 I g= uess this only pertains to booting though, but rc seems like a natural plac= e to do this.=A0 Thoughts, comments?=A0 Yet another idea I have no time to = try... Best Regards, Nathan Lay _______________________________________________ freebsd-rc@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-rc To unsubscribe, send any mail to "freebsd-rc-unsubscribe@freebsd.org" =0A=0A=0A=0A =0A=0A=0A From owner-freebsd-rc@FreeBSD.ORG Fri May 29 16:53:04 2009 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 B3CD7106566B; Fri, 29 May 2009 16:53:04 +0000 (UTC) (envelope-from rick@snowhite.cis.uoguelph.ca) Received: from skerryvore.cs.uoguelph.ca (skerryvore.cs.uoguelph.ca [131.104.94.204]) by mx1.freebsd.org (Postfix) with ESMTP id 75E968FC24; Fri, 29 May 2009 16:53:04 +0000 (UTC) (envelope-from rick@snowhite.cis.uoguelph.ca) Received: from snowhite.cis.uoguelph.ca (snowhite.cis.uoguelph.ca [131.104.48.1]) by skerryvore.cs.uoguelph.ca (8.13.1/8.13.1) with ESMTP id n4TGr2aG000832; Fri, 29 May 2009 12:53:02 -0400 Received: (from rick@localhost) by snowhite.cis.uoguelph.ca (8.9.3/8.9.3) id MAA15699; Fri, 29 May 2009 12:52:52 -0400 (EDT) Date: Fri, 29 May 2009 12:52:52 -0400 (EDT) From: Rick Macklem Message-Id: <200905291652.MAA15699@snowhite.cis.uoguelph.ca> To: dougb@FreeBSD.org X-Scanned-By: MIMEDefang 2.63 on 131.104.94.204 Cc: rwatson@FreeBSD.org, rc@FreeBSD.org, kib@FreeBSD.org Subject: Re: rc scripts for the new experimental nfs subsystem 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: Fri, 29 May 2009 16:53:04 -0000 > cursory inspection. Please review > http://www.freebsd.org/doc/en_US.ISO8859-1/articles/rc-scripting/ as well. Thanks. Very helpful. Ok, I've shortened nfsv4_serversupport_enable to nfsv4_server_enable and changed the names of the others to follow the FreeBSD tradition (now that I know about it:-). I also made the new scripts follow the traditions, I think? (I also simplified the if in nfsd, since I thought that's what you meant by "shorten" the first time I read the email. I think it's more readable this way, anyhow.) The "REQUIRE: NETWORKING" is debatable for nfsuserd, since it doesn't use networking itself. However, it calls functions like getpwent(), which usually use LDAP, NIS,... these days. Also, it's used by NFS, which is useless without networking, so I thought it made sense? Thanks for helping out, rick Here's a diff -u: --- rc.conf.sav 2009-05-29 11:27:49.000000000 -0400 +++ rc.conf 2009-05-29 11:27:17.000000000 -0400 @@ -311,6 +311,11 @@ rpc_ypupdated_enable="NO" # Run if NIS master and SecureRPC (or NO). keyserv_enable="NO" # Run the SecureRPC keyserver (or NO). keyserv_flags="" # Flags to keyserv (if enabled). +nfsv4_server_enable="NO" # Enable support for NFSv4 +nfscbd_enable="NO" # NFSv4 client side callback daemon +nfscbd_flags="" # Flags for nfscbd +nfsuserd_enable="NO" # NFSv4 user/group name mapping daemon +nfsuserd_flags="" # Flags for nfsuserd ### Network Time Services options: ### timed_enable="NO" # Run the time daemon (or NO). diff -u -N -r rc.d.sav/mountd rc.d/mountd --- rc.d.sav/mountd 2009-05-28 14:59:22.000000000 -0400 +++ rc.d/mountd 2009-05-29 11:55:38.000000000 -0400 @@ -37,6 +37,13 @@ fi fi + # If nfsv4_server_enable is yes, force use of the experimental + # server + # + if checkyesno nfsv4_server_enable; then + rc_flags="-e ${rc_flags}" + fi + if checkyesno zfs_enable; then rc_flags="${rc_flags} /etc/exports /etc/zfs/exports" fi diff -u -N -r rc.d.sav/nfscbd rc.d/nfscbd --- rc.d.sav/nfscbd 1969-12-31 19:00:00.000000000 -0500 +++ rc.d/nfscbd 2009-05-29 11:55:38.000000000 -0400 @@ -0,0 +1,19 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: nfscbd +# REQUIRE: NETWORKING +# KEYWORD: nojail shutdown + +. /etc/rc.subr + +name="nfscbd" +rcvar=`set_rcvar` +command="/usr/sbin/${name}" + +load_rc_config $name +sig_stop="USR1" + +run_rc_command "$1" diff -u -N -r rc.d.sav/nfsd rc.d/nfsd --- rc.d.sav/nfsd 2009-05-28 14:59:22.000000000 -0400 +++ rc.d/nfsd 2009-05-29 11:55:38.000000000 -0400 @@ -14,13 +14,30 @@ command="/usr/sbin/${name}" load_rc_config $name -command_args="${nfs_server_flags}" start_precmd="nfsd_precmd" sig_stop="USR1" nfsd_precmd() { - if ! sysctl vfs.nfsrv >/dev/null 2>&1; then + # If nfsv4_server_enable is yes, force use of the experimental + # server + # + if checkyesno nfsv4_server_enable; then + rc_flags="-e ${nfs_server_flags}" + else + rc_flags="${nfs_server_flags}" + fi + + if checkyesno nfsv4_server_enable; then + if ! checkyesno nfsuserd_enable && \ + ! /etc/rc.d/nfsuserd forcestatus 1>/dev/null 2>&1 + then + force_depend nfsuserd || return 1 + fi + fi + + if ! checkyesno nfsv4_server_enable && \ + ! sysctl vfs.nfsrv >/dev/null 2>&1; then force_depend nfsserver || return 1 fi @@ -36,7 +53,8 @@ force_depend mountd || return 1 fi - if checkyesno nfs_reserved_port_only; then + if ! checkyesno nfsv4_server_enable && \ + checkyesno nfs_reserved_port_only; then echo 'NFS on reserved port only=YES' sysctl vfs.nfsrv.nfs_privport=1 > /dev/null fi diff -u -N -r rc.d.sav/nfsuserd rc.d/nfsuserd --- rc.d.sav/nfsuserd 1969-12-31 19:00:00.000000000 -0500 +++ rc.d/nfsuserd 2009-05-29 11:55:38.000000000 -0400 @@ -0,0 +1,19 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: nfsuserd +# REQUIRE: NETWORKING +# KEYWORD: nojail shutdown + +. /etc/rc.subr + +name="nfsuserd" +rcvar=`set_rcvar` +command="/usr/sbin/${name}" + +load_rc_config $name +sig_stop="USR1" + +run_rc_command "$1" From owner-freebsd-rc@FreeBSD.ORG Fri May 29 19:19:17 2009 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED47D106566B for ; Fri, 29 May 2009 19:19:17 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id 7E5078FC13 for ; Fri, 29 May 2009 19:19:17 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: (qmail 14360 invoked by uid 399); 29 May 2009 19:19:12 -0000 Received: from localhost (HELO ?192.168.0.101?) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 29 May 2009 19:19:12 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4A203531.8020107@FreeBSD.org> Date: Fri, 29 May 2009 12:19:13 -0700 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: yvesguerin@yahoo.ca References: <302139.58064.qm@web56408.mail.re3.yahoo.com> In-Reply-To: <302139.58064.qm@web56408.mail.re3.yahoo.com> X-Enigmail-Version: 0.95.7 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Cc: freebsd-rc@freebsd.org Subject: Re: Profile rc idea 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: Fri, 29 May 2009 19:19:18 -0000 Yves Guérin wrote: > I did something similar to your idea, I custom the boot menu (beastie.4th) to choose between home, office, dhcp and default configuration for my network interface on my laptop. > I grab the answer or the choice via the kenv system call, and on my rc directory I start my own script just before netif to configure my network depending on the answer I choose at boot time. So I think the idea can be modify for every used that you can dream of. > > I am able to send you my configuration, the boot menu and the rc file. I really like the idea of leveraging the existing boot menu for this. Can you send your patches to the list? Doug From owner-freebsd-rc@FreeBSD.ORG Sat May 30 19:17:29 2009 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 4C5821065672 for ; Sat, 30 May 2009 19:17:29 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id 86DA28FC1A for ; Sat, 30 May 2009 19:17:27 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: (qmail 3967 invoked by uid 399); 30 May 2009 19:17:19 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 30 May 2009 19:17:19 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4A21863D.8040904@FreeBSD.org> Date: Sat, 30 May 2009 12:17:17 -0700 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.21 (X11/20090423) MIME-Version: 1.0 To: Rick Macklem References: <200905291652.MAA15699@snowhite.cis.uoguelph.ca> In-Reply-To: <200905291652.MAA15699@snowhite.cis.uoguelph.ca> X-Enigmail-Version: 0.95.7 OpenPGP: id=D5B2F0FB Content-Type: multipart/mixed; boundary="------------020701030504040605080407" Cc: kib@FreeBSD.org, rc@FreeBSD.org, rwatson@FreeBSD.org Subject: Re: rc scripts for the new experimental nfs subsystem 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, 30 May 2009 19:17:30 -0000 This is a multi-part message in MIME format. --------------020701030504040605080407 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Rick Macklem wrote: >> cursory inspection. Please review >> http://www.freebsd.org/doc/en_US.ISO8859-1/articles/rc-scripting/ as well. > > Thanks. Very helpful. GTH. > Ok, I've shortened nfsv4_serversupport_enable to nfsv4_server_enable and > changed the names of the others to follow the FreeBSD tradition (now that > I know about it:-). Well, that's what review is for, right? :) > I also made the new scripts follow the traditions, I > think? (I also simplified the if in nfsd, since I thought that's what > you meant by "shorten" the first time I read the email. I think it's more > readable this way, anyhow.) > > The "REQUIRE: NETWORKING" is debatable for nfsuserd, since it doesn't > use networking itself. However, it calls functions like getpwent(), which > usually use LDAP, NIS,... these days. Also, it's used by NFS, which is > useless without networking, so I thought it made sense? It sounds like what you really want to do is have nfsd REQUIRE nfsuserd. I'll only comment on a few things, the rest looks good. > diff -u -N -r rc.d.sav/nfscbd rc.d/nfscbd > --- rc.d.sav/nfscbd 1969-12-31 19:00:00.000000000 -0500 > +++ rc.d/nfscbd 2009-05-29 11:55:38.000000000 -0400 > @@ -0,0 +1,19 @@ > +#!/bin/sh > +# > +# $FreeBSD$ > +# > + > +# PROVIDE: nfscbd > +# REQUIRE: NETWORKING > +# KEYWORD: nojail shutdown > + > +. /etc/rc.subr > + > +name="nfscbd" > +rcvar=`set_rcvar` > +command="/usr/sbin/${name}" > + > +load_rc_config $name > +sig_stop="USR1" For consistency sake sig_stop should really be moved up between command and load_rc_config, but this is just cosmetic. > diff -u -N -r rc.d.sav/nfsd rc.d/nfsd I'm not sure why you added so many tests for the new variable. I've attached a streamlined version of your patch which I think will accomplish the same things. > diff -u -N -r rc.d.sav/nfsuserd rc.d/nfsuserd > --- rc.d.sav/nfsuserd 1969-12-31 19:00:00.000000000 -0500 > +++ rc.d/nfsuserd 2009-05-29 11:55:38.000000000 -0400 > @@ -0,0 +1,19 @@ > +#!/bin/sh > +# > +# $FreeBSD$ > +# > + > +# PROVIDE: nfsuserd > +# REQUIRE: NETWORKING > +# KEYWORD: nojail shutdown > + > +. /etc/rc.subr > + > +name="nfsuserd" > +rcvar=`set_rcvar` > +command="/usr/sbin/${name}" > + > +load_rc_config $name > +sig_stop="USR1" Same here with sig_stop. hope this helps, Doug -- This .signature sanitized for your protection --------------020701030504040605080407 Content-Type: text/plain; name="nfsd.diff" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="nfsd.diff" SW5kZXg6IG5mc2QKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gbmZzZAkocmV2aXNpb24gMTkyOTkxKQor KysgbmZzZAkod29ya2luZyBjb3B5KQpAQCAtMTQsMTQgKzE0LDMzIEBACiBjb21tYW5kPSIv dXNyL3NiaW4vJHtuYW1lfSIKIAogbG9hZF9yY19jb25maWcgJG5hbWUKLWNvbW1hbmRfYXJn cz0iJHtuZnNfc2VydmVyX2ZsYWdzfSIKIHN0YXJ0X3ByZWNtZD0ibmZzZF9wcmVjbWQiCiBz aWdfc3RvcD0iVVNSMSIKIAogbmZzZF9wcmVjbWQoKQogewotCWlmICEgc3lzY3RsIHZmcy5u ZnNydiA+L2Rldi9udWxsIDI+JjE7IHRoZW4KLQkJZm9yY2VfZGVwZW5kIG5mc3NlcnZlciB8 fCByZXR1cm4gMQorCWlmIGNoZWNreWVzbm8gbmZzdjRfc2VydmVyX2VuYWJsZTsgdGhlbgor CQkjIElmIG5mc3Y0X3NlcnZlcl9lbmFibGUgaXMgeWVzLCBmb3JjZSB1c2UKKwkJIyBvZiB0 aGUgZXhwZXJpbWVudGFsIHNlcnZlcgorCQkjCisJCXJjX2ZsYWdzPSItZSAke25mc19zZXJ2 ZXJfZmxhZ3N9IgorCisJCWlmICEgY2hlY2t5ZXNubyBuZnN1c2VyZF9lbmFibGUgICYmIFwK KwkJICAgICEgL2V0Yy9yYy5kL25mc3VzZXJkIGZvcmNlc3RhdHVzIDE+L2Rldi9udWxsIDI+ JjEKKwkJdGhlbgorCQkJZm9yY2VfZGVwZW5kIG5mc3VzZXJkIHx8IHJldHVybiAxCisJCWZp CisJZWxzZQorCQlyY19mbGFncz0iJHtuZnNfc2VydmVyX2ZsYWdzfSIKKworCQlpZiAhIHN5 c2N0bCB2ZnMubmZzcnYgPi9kZXYvbnVsbCAyPiYxOyB0aGVuCisJCQlmb3JjZV9kZXBlbmQg bmZzc2VydmVyIHx8IHJldHVybiAxCisJCWZpCisKKwkJaWYgY2hlY2t5ZXNubyBuZnNfcmVz ZXJ2ZWRfcG9ydF9vbmx5OyB0aGVuCisJCQllY2hvICdORlMgb24gcmVzZXJ2ZWQgcG9ydCBv bmx5PVlFUycKKwkJCXN5c2N0bCB2ZnMubmZzcnYubmZzX3ByaXZwb3J0PTEgPiAvZGV2L251 bGwKKwkJZmkKIAlmaQogCiAJaWYgISBjaGVja3llc25vIHJwY2JpbmRfZW5hYmxlICAmJiBc CkBAIC0zNSwxMSArNTQsNiBAQAogCXRoZW4KIAkJZm9yY2VfZGVwZW5kIG1vdW50ZCB8fCBy ZXR1cm4gMQogCWZpCi0KLQlpZiBjaGVja3llc25vIG5mc19yZXNlcnZlZF9wb3J0X29ubHk7 IHRoZW4KLQkJZWNobyAnTkZTIG9uIHJlc2VydmVkIHBvcnQgb25seT1ZRVMnCi0JCXN5c2N0 bCB2ZnMubmZzcnYubmZzX3ByaXZwb3J0PTEgPiAvZGV2L251bGwKLQlmaQogCXJldHVybiAw CiB9CiAK --------------020701030504040605080407-- From owner-freebsd-rc@FreeBSD.ORG Sat May 30 21:55:06 2009 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 570641065674 for ; Sat, 30 May 2009 21:55:06 +0000 (UTC) (envelope-from dougb@dougbarton.us) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id E61008FC22 for ; Sat, 30 May 2009 21:55:05 +0000 (UTC) (envelope-from dougb@dougbarton.us) Received: (qmail 23904 invoked by uid 399); 30 May 2009 21:28:23 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 30 May 2009 21:28:23 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4A21A4F6.5060709@dougbarton.us> Date: Sat, 30 May 2009 14:28:22 -0700 From: Doug Barton User-Agent: Thunderbird 2.0.0.21 (X11/20090423) MIME-Version: 1.0 To: freebsd-rc@freebsd.org, Brooks Davis X-Enigmail-Version: 0.95.7 OpenPGP: id=D5B2F0FB Content-Type: multipart/mixed; boundary="------------050308060703050404090808" Cc: Subject: Removal of deprecation for network_interfaces != AUTO 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, 30 May 2009 21:55:06 -0000 This is a multi-part message in MIME format. --------------050308060703050404090808 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Without objection I plan to commit the attached patch before the code slush, and to MFC the change. I've never seen the rationale for this, and I use a value other than AUTO personally for a script I have that tests to see if the wired interface is up and starts the wireless if not. I've also seen other users ask about this from time to time, so I'm sure I'm not alone. Doug --------------050308060703050404090808 Content-Type: text/plain; name="network.subr-diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="network.subr-diff" Index: network.subr =================================================================== --- network.subr (revision 193111) +++ network.subr (working copy) @@ -726,10 +726,6 @@ _tmplist="${_lo}${_tmplist}" ;; *) - if [ -z "$type" ]; then - warn "Values of network_interfaces other than" \ - "AUTO are deprecated" - fi _tmplist="${network_interfaces} ${cloned_interfaces}" ;; esac --------------050308060703050404090808--