diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-11-25 19:53:01 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-11-25 19:53:01 +0000 |
commit | f078515bcd692dc00251e100046cbdad722cf7bd (patch) | |
tree | 5303ce9e0fd1bd6bbce7aa46521853adebb700ef /net-fs/nfs-utils/files | |
parent | stable on ppc64 (diff) | |
download | gentoo-2-f078515bcd692dc00251e100046cbdad722cf7bd.tar.gz gentoo-2-f078515bcd692dc00251e100046cbdad722cf7bd.tar.bz2 gentoo-2-f078515bcd692dc00251e100046cbdad722cf7bd.zip |
let init.d script create needed dirs #113486
(Portage version: 2.0.53_rc7)
Diffstat (limited to 'net-fs/nfs-utils/files')
-rwxr-xr-x | net-fs/nfs-utils/files/nfs | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/net-fs/nfs-utils/files/nfs b/net-fs/nfs-utils/files/nfs index 1fafe55f5590..07e68475e979 100755 --- a/net-fs/nfs-utils/files/nfs +++ b/net-fs/nfs-utils/files/nfs @@ -1,7 +1,7 @@ #!/sbin/runscript # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/nfs,v 1.11 2005/10/08 20:34:06 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/nfs,v 1.12 2005/11/25 19:53:01 vapier Exp $ #--------------------------------------------------------------------------- # This script starts/stops the following @@ -35,10 +35,16 @@ depend() { after quota } +mkdir_nfsdirs() { + local d + for d in /var/lib/nfs/{rpc_pipefs,v4recovery,v4root} ; do + [[ ! -d ${d} ]] && mkdir -p "${d}" + done +} + mount_pipefs() { if grep -q rpc_pipefs /proc/filesystems ; then if ! grep -q "rpc_pipefs /var/lib/nfs/rpc_pipefs" /proc/mounts ; then - [[ ! -d /var/lib/nfs/rpc_pipefs ]] && mkdir -p /var/lib/nfs/rpc_pipefs ebegin "Mounting RPC pipefs" mount -t rpc_pipefs rpc_pipefs /var/lib/nfs/rpc_pipefs eend $? @@ -140,7 +146,7 @@ waitfor_exportfs() { start() { # Make sure nfs support is loaded in the kernel #64709 - if [ -e /proc/modules ] ; then + if [[ -e /proc/modules ]] && ! grep -qs nfsd /proc/filesystems ; then modprobe nfsd &> /dev/null fi @@ -154,6 +160,8 @@ start() { fi # now that nfsd is mounted inside /proc, we can safely start mountd later + mkdir_nfsdirs + mount_pipefs start_idmapd start_gssd |