From owner-freebsd-current Tue Jan 8 2: 2:34 2002 Delivered-To: freebsd-current@freebsd.org Received: from infres.enst.fr (infres-192.enst.fr [137.194.192.1]) by hub.freebsd.org (Postfix) with ESMTP id 0E51A37B419; Tue, 8 Jan 2002 02:02:13 -0800 (PST) Received: from shalmaneser.enst.fr (shalmaneser.enst.fr [137.194.162.11]) by infres.enst.fr (Postfix) with ESMTP id 004A218B7; Tue, 8 Jan 2002 11:02:11 +0100 (MET) Received: by shalmaneser.enst.fr (Postfix, from userid 11117) id 68D43112ED; Tue, 8 Jan 2002 11:02:06 +0100 (CET) Date: Tue, 8 Jan 2002 11:02:06 +0100 From: Thomas Quinot To: freebsd-gnats-submit@freebsd.org Cc: current@freebsd.org Subject: conf/31358: Updated patch for -CURRENT Message-ID: <20020108110201.A36413@shalmaneser.enst.fr> Reply-To: Thomas Quinot Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.2.5i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Attached to this email is an update to the patch supplied with PR conf/31358, which fixes two issues: * amd can only be started when NFS client is enabled; * when nfs_client_enable is set and no NFS file systems are mounted at boot time from /etc/fstab, rc.network needs to ensure that the nfsclient module is loaded. Can someone please take a look at this PR? Thanks, Thomas. diff -u ../rc rc --- ../rc Tue Jan 8 10:11:48 2002 +++ rc Tue Jan 8 10:42:38 2002 @@ -103,6 +103,7 @@ } chkdepend amd amd_enable portmap portmap_enable +chkdepend amd amd_enable NFS nfs_client_enable chkdepend NFS nfs_server_enable portmap portmap_enable chkdepend NIS nis_server_enable portmap portmap_enable chkdepend NIS nis_client_enable portmap portmap_enable diff -u ../rc.network rc.network --- ../rc.network Tue Jan 8 10:11:48 2002 +++ rc.network Tue Jan 8 10:57:58 2002 @@ -712,8 +712,30 @@ ;; esac + # Handle absent nfs client support + if sysctl vfs.nfs >/dev/null 2>&1; then + nfsclient_in_kernel=1 + else + nfsclient_in_kernel=0 + fi + case ${nfs_client_enable} in [Yy][Ee][Ss]) + kldload nfsclient && nfsclient_in_kernel=1 + + case $nfsclient_in_kernel in + 1) + ;; + *) + echo 'Warning: NFS client kernel module failed to load' + nfs_client_enable=NO + ;; + esac + ;; + esac + + case "${nfs_client_enable}" in + [Yy][Ee][Ss]) if [ -n "${nfs_access_cache}" ]; then echo -n " NFS access cache time=${nfs_access_cache}" sysctl vfs.nfs.access_cache_timeout=${nfs_access_cache} >/dev/null @@ -732,6 +754,27 @@ echo -n ' rpc.lockd'; rpc.lockd ;; esac + + case ${amd_enable} in + [Yy][Ee][Ss]) + echo -n ' amd' + case ${amd_map_program} in + [Nn][Oo] | '') + ;; + *) + amd_flags="${amd_flags} `eval\ + ${amd_map_program}`" + ;; + esac + + if [ -n "${amd_flags}" ]; then + amd -p ${amd_flags}\ + > /var/run/amd.pid 2> /dev/null + else + amd 2> /dev/null + fi + ;; + esac ;; esac @@ -742,26 +785,6 @@ rpc.umntall -k fi - case ${amd_enable} in - [Yy][Ee][Ss]) - echo -n ' amd' - case ${amd_map_program} in - [Nn][Oo] | '') - ;; - *) - amd_flags="${amd_flags} `eval\ - ${amd_map_program}`" - ;; - esac - - if [ -n "${amd_flags}" ]; then - amd -p ${amd_flags}\ - > /var/run/amd.pid 2> /dev/null - else - amd 2> /dev/null - fi - ;; - esac ;; esac -- Thomas Quinot ** Département Informatique & Réseaux ** quinot@inf.enst.fr ENST // 46 rue Barrault // 75634 PARIS CEDEX 13 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message