vapier 14/06/20 04:33:57 Modified: rpc.pipefs.initd Log: Unmount rpc.pipefs on stop as it is in /var #491714 by Jan Lam. (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key D2E96200)
Revision Changes Path 1.3 net-fs/nfs-utils/files/rpc.pipefs.initd file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-fs/nfs-utils/files/rpc.pipefs.initd?rev=1.3&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-fs/nfs-utils/files/rpc.pipefs.initd?rev=1.3&content-type=text/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-fs/nfs-utils/files/rpc.pipefs.initd?r1=1.2&r2=1.3 Index: rpc.pipefs.initd =================================================================== RCS file: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/rpc.pipefs.initd,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- rpc.pipefs.initd 19 Jun 2011 23:04:36 -0000 1.2 +++ rpc.pipefs.initd 20 Jun 2014 04:33:57 -0000 1.3 @@ -1,21 +1,23 @@ #!/sbin/runscript -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/rpc.pipefs.initd,v 1.2 2011/06/19 23:04:36 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/rpc.pipefs.initd,v 1.3 2014/06/20 04:33:57 vapier Exp $ + +MNT="/var/lib/nfs/rpc_pipefs" mount_pipefs() { - local fstype=rpc_pipefs mntpoint=/var/lib/nfs/rpc_pipefs + local fstype=rpc_pipefs # if things are already mounted, nothing to do - mountinfo -q ${mntpoint} && return 0 + mountinfo -q ${MNT} && return 0 # if rpc_pipefs is not available, try to load sunrpc for it #219566 grep -qs ${fstype} /proc/filesystems || modprobe -q sunrpc # if still not available, the `mount` will issue an error for the user # now just do it for kicks - mkdir -p ${mntpoint} - mount -t ${fstype} ${fstype} ${mntpoint} + mkdir -p ${MNT} + mount -t ${fstype} ${fstype} ${MNT} } start() { @@ -23,3 +25,9 @@ mount_pipefs eend $? "make sure you have NFS/SUNRPC enabled in your kernel" } + +stop() { + ebegin "Unmounting RPC pipefs" + umount ${MNT} + eend $? +}
