diff options
author | freaj <freaj@riseup.net> | 2015-03-30 10:36:00 +0200 |
---|---|---|
committer | freaj <freaj@riseup.net> | 2015-03-30 10:36:00 +0200 |
commit | 7385c6143c1b587bca68deade6e5989d11879767 (patch) | |
tree | 6ccef2617293e9afd03c80d5de22fd8f9c260c70 /pcr/openrc-net/rpc.pipefs.initd | |
parent | 41c9dc8729840f45f174a14a08703e04d1f5717e (diff) | |
download | abslibre-7385c6143c1b587bca68deade6e5989d11879767.tar.gz abslibre-7385c6143c1b587bca68deade6e5989d11879767.tar.bz2 abslibre-7385c6143c1b587bca68deade6e5989d11879767.zip |
openrc-net-20150330-1: updating version
Diffstat (limited to 'pcr/openrc-net/rpc.pipefs.initd')
-rw-r--r-- | pcr/openrc-net/rpc.pipefs.initd | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/pcr/openrc-net/rpc.pipefs.initd b/pcr/openrc-net/rpc.pipefs.initd new file mode 100644 index 000000000..ebae3b915 --- /dev/null +++ b/pcr/openrc-net/rpc.pipefs.initd @@ -0,0 +1,33 @@ +#!/sbin/runscript +# 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.3 2014/06/20 04:33:57 vapier Exp $ + +MNT="/var/lib/nfs/rpc_pipefs" + +mount_pipefs() { + local fstype=rpc_pipefs + + # if things are already mounted, nothing to do + 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 ${MNT} + mount -t ${fstype} ${fstype} ${MNT} +} + +start() { + ebegin "Setting up RPC pipefs" + mount_pipefs + eend $? "make sure you have NFS/SUNRPC enabled in your kernel" +} + +stop() { + ebegin "Unmounting RPC pipefs" + umount ${MNT} + eend $? +} |