Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-fs/nfs-utils/files: rpc.pipefs.initd
Date: Fri, 20 Jun 2014 04:34:04
Message-Id: 20140620043358.004A92004E@flycatcher.gentoo.org
1 vapier 14/06/20 04:33:57
2
3 Modified: rpc.pipefs.initd
4 Log:
5 Unmount rpc.pipefs on stop as it is in /var #491714 by Jan Lam.
6
7 (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key D2E96200)
8
9 Revision Changes Path
10 1.3 net-fs/nfs-utils/files/rpc.pipefs.initd
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-fs/nfs-utils/files/rpc.pipefs.initd?rev=1.3&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-fs/nfs-utils/files/rpc.pipefs.initd?rev=1.3&content-type=text/plain
14 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-fs/nfs-utils/files/rpc.pipefs.initd?r1=1.2&r2=1.3
15
16 Index: rpc.pipefs.initd
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/rpc.pipefs.initd,v
19 retrieving revision 1.2
20 retrieving revision 1.3
21 diff -u -r1.2 -r1.3
22 --- rpc.pipefs.initd 19 Jun 2011 23:04:36 -0000 1.2
23 +++ rpc.pipefs.initd 20 Jun 2014 04:33:57 -0000 1.3
24 @@ -1,21 +1,23 @@
25 #!/sbin/runscript
26 -# Copyright 1999-2011 Gentoo Foundation
27 +# Copyright 1999-2014 Gentoo Foundation
28 # Distributed under the terms of the GNU General Public License v2
29 -# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/rpc.pipefs.initd,v 1.2 2011/06/19 23:04:36 vapier Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/rpc.pipefs.initd,v 1.3 2014/06/20 04:33:57 vapier Exp $
31 +
32 +MNT="/var/lib/nfs/rpc_pipefs"
33
34 mount_pipefs() {
35 - local fstype=rpc_pipefs mntpoint=/var/lib/nfs/rpc_pipefs
36 + local fstype=rpc_pipefs
37
38 # if things are already mounted, nothing to do
39 - mountinfo -q ${mntpoint} && return 0
40 + mountinfo -q ${MNT} && return 0
41
42 # if rpc_pipefs is not available, try to load sunrpc for it #219566
43 grep -qs ${fstype} /proc/filesystems || modprobe -q sunrpc
44 # if still not available, the `mount` will issue an error for the user
45
46 # now just do it for kicks
47 - mkdir -p ${mntpoint}
48 - mount -t ${fstype} ${fstype} ${mntpoint}
49 + mkdir -p ${MNT}
50 + mount -t ${fstype} ${fstype} ${MNT}
51 }
52
53 start() {
54 @@ -23,3 +25,9 @@
55 mount_pipefs
56 eend $? "make sure you have NFS/SUNRPC enabled in your kernel"
57 }
58 +
59 +stop() {
60 + ebegin "Unmounting RPC pipefs"
61 + umount ${MNT}
62 + eend $?
63 +}