~alpine/aports

1

[alpine-aports] [PATCH 1/2] main/nfs-utils: upgrade to 2.1.1

Details
Message ID
<20170504111810.31247-1-soeren+git@soeren-tempel.net>
Sender timestamp
1493896689
DKIM signature
missing
Download raw message
Patch: +9 -39
---
 main/nfs-utils/APKBUILD | 48 +++++++++---------------------------------------
 1 file changed, 9 insertions(+), 39 deletions(-)

diff --git a/main/nfs-utils/APKBUILD b/main/nfs-utils/APKBUILD
index b24269ef92..80eadaaf09 100644
--- a/main/nfs-utils/APKBUILD
+++ b/main/nfs-utils/APKBUILD
@@ -1,9 +1,9 @@
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=nfs-utils
pkgver=1.3.4
pkgver=2.1.1
_basever=$pkgver
pkgrel=1
pkgrel=0
pkgdesc="kernel-mode NFS"
url="http://nfs.sourceforge.net/"
arch="all"
@@ -35,14 +35,13 @@ source="http://downloads.sourceforge.net/nfs/$pkgname-$_basever.tar.bz2
builddir="$srcdir/$pkgname-$_basever"

prepare() {
	default_prepare || return 1
	default_prepare
	cd $builddir
	./autogen.sh || return 1
	./autogen.sh
}

build() {
	cd $builddir

	./configure \
		--build=$CBUILD \
		--host=$CHOST \
@@ -55,21 +54,18 @@ build() {
		--enable-nfsv4 \
		--enable-uuid \
		--enable-gss \
		--enable-libmount-mount \
		|| return 1

	make || return 1
		--enable-libmount-mount
	make
}

package() {
	cd $builddir

	make -j1 DESTDIR="$pkgdir" install

	local i=
	for i in nfs rpc.pipefs rpc.svcgssd nfsmount rpc.idmapd rpc.gssd \
			rpc.statd; do
		install -m755 -D "$srcdir"/$i.initd "$pkgdir"/etc/init.d/$i \
			|| return 1
		install -m755 -D "$srcdir"/$i.initd "$pkgdir"/etc/init.d/$i
	done

	install -m644 -D "$srcdir"/nfs.confd "$pkgdir"/etc/conf.d/nfs
@@ -82,33 +78,7 @@ rpcgen() {
	install -m755 -D tools/rpcgen/rpcgen "$subpkgdir"/usr/bin/rpcgen
}

md5sums="2fabdadb8ff415a1eafcfb12ab1bf781  nfs-utils-1.3.4.tar.bz2
5994a46367486129e2892c73dcdc82c2  0011-exportfs-only-do-glibc-specific-hackery-on-glibc.patch
2b2d228f9947581c924a691a84664fa1  nfs-utils-mtab-sym.patch
b2a716619a34194afbf0dc1c2371b478  musl-getservbyport.patch
ed57597c7b837ff447f476c4864b086e  nfs.initd
92b6ebdcde5870db4146510a7dfa2de5  nfsmount.initd
178966f91c4a8cdab083950a9b64f7c3  rpc.gssd.initd
1d68810f7781913a84cd7cfef5fe271e  rpc.idmapd.initd
6a0d78db91b27f58bf223f1f256244f3  rpc.pipefs.initd
62216c2c2391cfdd0d520a8af462b211  rpc.statd.initd
7820607185d8f6b9b15ad841c8ac02fa  rpc.svcgssd.initd
09135438d6df50b868bbe5a2260f973c  nfs.confd
4f1bb7b2412ce5952ecb5ec22d8ed99d  nfs.exports"
sha256sums="c529c82a82320daae811f3d3a143f83d2714d7e7a43beadd42fcd6022c17d590  nfs-utils-1.3.4.tar.bz2
0bd62ea53c980369990f04b620db725259fa919a351b8ed44e081a8b7a1c221e  0011-exportfs-only-do-glibc-specific-hackery-on-glibc.patch
5a1c6875f43ecc93d5db7bcf84b4ceda16c09b6109c28696eb55d05247511706  nfs-utils-mtab-sym.patch
ae46423ef3383f4a134f578c29a7100d58cde8d8853e88f3ffd66a261d436421  musl-getservbyport.patch
6e4128e339308ed36107fabb088230fa90362ae9aa0314501e398dd299ef5c89  nfs.initd
31ac5a0c0e81ddc7d835efc86c82a00084b2b0024ae1a0b63df879b64d956d6f  nfsmount.initd
598f351545db3656dfd8268983a930cbdcce96f96ee92cfea478e7dcd323fe00  rpc.gssd.initd
40ac5cea96e8c729d02a95840469afa9880f672885af2e45b7d0b4bf7a47e346  rpc.idmapd.initd
6c75e9a1b35ae3a1f2b9df4e236eb93ad2fef261fe50f57851c39fbcb37606e3  rpc.pipefs.initd
78f5101416849972679385d3fb97b6bcfb43f635068647d880792ced6eaf6eef  rpc.statd.initd
4e819e297b405432685b76c9c542045024a06c704ae5a5c4ec33132e022136ec  rpc.svcgssd.initd
9ca3b7dfbac5bedd818a3637805380f4e873ef8e809c21c26f410c86ac16e03e  nfs.confd
f2aaf1c92e07172adeb65f7f2bc0140c533ae453a3477e99be677ef2e05f2d4b  nfs.exports"
sha512sums="765c0bc55a9a0bdb2c25d8fb7189a9054fb9f2dd51726eda29f44e5d5c423e245b02307dfcfab9239276d8f44869a72732416f6e9ef5a1f80753d9243ba1b38c  nfs-utils-1.3.4.tar.bz2
sha512sums="ed358280b7e124154632040bf747f6e4c3c6e4156bf90e82ff6915b1488f1c0dd65251a3a0f9b7ca96b9664d64e24b379828da9b524e64a3c769a44f4c930448  nfs-utils-2.1.1.tar.bz2
9561a979a2313f00c0bbb2ffb3193ca089e5de2f15cf5b6c142e65e04a9401bbc962e490e5b1de026750262a05e5258b286a79781444e7f2ac6bd581b426211a  0011-exportfs-only-do-glibc-specific-hackery-on-glibc.patch
5fd9039a61a0cdaeb57b5332ea545034101e6f15be200b7cf8fc7d0a3d22836a6fc778e0560656c1825808a4dc09046d9923d81b4d1324a6e526b226c657d064  nfs-utils-mtab-sym.patch
a14fc747cc75f65bb206b28eb4f838ae85687c917893531318d3991adc3ed9914316b97fc507bf34881855c9978ad9d4617f33e464d1a0d746a65b31177687c1  musl-getservbyport.patch
-- 
2.12.2



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---

[alpine-aports] [PATCH 2/2] main/nfs-utils: update OpenRC services from Gentoo

Details
Message ID
<20170504111810.31247-2-soeren+git@soeren-tempel.net>
In-Reply-To
<20170504111810.31247-1-soeren+git@soeren-tempel.net> (view parent)
Sender timestamp
1493896690
DKIM signature
missing
Download raw message
Patch: +152 -61
---
 main/nfs-utils/APKBUILD          | 46 +++++++++++++++++++++++-----------------
 main/nfs-utils/nfs.confd         | 10 ++++++++-
 main/nfs-utils/nfs.initd         | 42 +++++++++++++++++++++---------------
 main/nfs-utils/nfsclient.confd   | 18 ++++++++++++++++
 main/nfs-utils/nfsclient.initd   | 33 ++++++++++++++++++++++++++++
 main/nfs-utils/nfsmount.confd    |  7 ++++++
 main/nfs-utils/nfsmount.initd    | 19 +++++++++++------
 main/nfs-utils/rpc.gssd.initd    |  1 -
 main/nfs-utils/rpc.idmapd.initd  |  1 -
 main/nfs-utils/rpc.pipefs.initd  | 30 ++++++++++++++++----------
 main/nfs-utils/rpc.statd.initd   |  5 ++---
 main/nfs-utils/rpc.svcgssd.initd |  1 -
 12 files changed, 152 insertions(+), 61 deletions(-)
 create mode 100644 main/nfs-utils/nfsclient.confd
 create mode 100644 main/nfs-utils/nfsclient.initd
 create mode 100644 main/nfs-utils/nfsmount.confd

diff --git a/main/nfs-utils/APKBUILD b/main/nfs-utils/APKBUILD
index 80eadaaf09..e51cea4595 100644
--- a/main/nfs-utils/APKBUILD
+++ b/main/nfs-utils/APKBUILD
@@ -3,7 +3,7 @@
pkgname=nfs-utils
pkgver=2.1.1
_basever=$pkgver
pkgrel=0
pkgrel=1
pkgdesc="kernel-mode NFS"
url="http://nfs.sourceforge.net/"
arch="all"
@@ -23,6 +23,7 @@ source="http://downloads.sourceforge.net/nfs/$pkgname-$_basever.tar.bz2

	nfs.initd
	nfsmount.initd
	nfsmount.confd
	rpc.gssd.initd
	rpc.idmapd.initd
	rpc.pipefs.initd
@@ -30,6 +31,8 @@ source="http://downloads.sourceforge.net/nfs/$pkgname-$_basever.tar.bz2
	rpc.svcgssd.initd
	nfs.confd
	nfs.exports
	nfsclient.initd
	nfsclient.confd
	"

builddir="$srcdir/$pkgname-$_basever"
@@ -61,33 +64,38 @@ build() {
package() {
	cd $builddir
	make -j1 DESTDIR="$pkgdir" install
	install -Dm644 "$srcdir"/nfs.exports "$pkgdir"/etc/exports

	local i=
	for i in nfs rpc.pipefs rpc.svcgssd nfsmount rpc.idmapd rpc.gssd \
			rpc.statd; do
		install -m755 -D "$srcdir"/$i.initd "$pkgdir"/etc/init.d/$i
	local file=
	for file in $source; do
		case "${file}" in
		*.confd) install -Dm644 "$srcdir"/"$file" \
			"$pkgdir"/etc/conf.d/${file%.*} ;;
		*.initd) install -Dm755 "$srcdir"/"$file" \
			"$pkgdir"/etc/init.d/${file%.*} ;;
		esac
	done

	install -m644 -D "$srcdir"/nfs.confd "$pkgdir"/etc/conf.d/nfs
	install -m644 -D "$srcdir"/nfs.exports "$pkgdir"/etc/exports
}

rpcgen() {
	pkgdesc="Remote Procedure Call (RPC) protocol compiler"
	cd $builddir
	install -m755 -D tools/rpcgen/rpcgen "$subpkgdir"/usr/bin/rpcgen
	install -Dm755 "$builddir"/tools/rpcgen/rpcgen \
		"$subpkgdir"/usr/bin/rpcgen
}

sha512sums="ed358280b7e124154632040bf747f6e4c3c6e4156bf90e82ff6915b1488f1c0dd65251a3a0f9b7ca96b9664d64e24b379828da9b524e64a3c769a44f4c930448  nfs-utils-2.1.1.tar.bz2
9561a979a2313f00c0bbb2ffb3193ca089e5de2f15cf5b6c142e65e04a9401bbc962e490e5b1de026750262a05e5258b286a79781444e7f2ac6bd581b426211a  0011-exportfs-only-do-glibc-specific-hackery-on-glibc.patch
5fd9039a61a0cdaeb57b5332ea545034101e6f15be200b7cf8fc7d0a3d22836a6fc778e0560656c1825808a4dc09046d9923d81b4d1324a6e526b226c657d064  nfs-utils-mtab-sym.patch
a14fc747cc75f65bb206b28eb4f838ae85687c917893531318d3991adc3ed9914316b97fc507bf34881855c9978ad9d4617f33e464d1a0d746a65b31177687c1  musl-getservbyport.patch
d29003bb45207bc2c5074a394f7b7431e3aca97364f9c4da946d09b8755df356ce1a446d14d64fc8847c5f275a2b96cb03ec99de4e0fad81973a4a614360331d  nfs.initd
8301a8981b6103398ec6e6aa234bdaab27762c96d3e3023e3ee7663b2f8dffab27338f4bd1b16f6584eba5ecb52e6b46aa5619fa4d5d7916f5e015881149cfaa  nfsmount.initd
8bb94bf583a44b77ee7c3fe2d9302dfa026388534ba0d60803b4ade789180c6fcc5bb801c268dad2a2ae5ea3df015f06504e1adf606f5264b30293cae682a5fd  rpc.gssd.initd
a9f00a6713a359a7c3bad5af660b1f99850b8c8c747371285a8b5f298578a72f3fbfd131119b6e74c7e4e5f5942f8376caa44c1475cc52c078e3cd96b1b51ce4  rpc.idmapd.initd
19ec69635cbbadae1a13f691d4a10778876c4218682b00794cc6cec88a90b016b92c32023c386536cdc1d9b9ae6a7c22817555b435a0e231c244d70d5ee8be59  rpc.pipefs.initd
519affb7ecd8ebd454058dcd4a4163ae53751bf53e105b9914c88b51c91dccb552863c6b68885361d8f4474b4881d36f64003abc6bd192e8f361fa1c1a3ac128  rpc.statd.initd
da07974bd7f191de683a0f83f8d87a5cfd116e233a1e70985820e7c2a0f8d39ec17d312f01f65ffccbc4f5b9180add2bbe171df2de3780a8dcf4df0bbfe9e31c  rpc.svcgssd.initd
1711803f848f73fef9fa74bd572fa7643c586f06eeedf62ed91bd2aa06ad59c7b1f1c585b6f7b7a8ce67ff7fd6b601d88dc99ca1000dd1d3f5991f420da9761b  nfs.confd
70f96bb3a465ee0fa857a6e511051ca3ced9f5a5d1e6b8b32eec843a2067f2475d8979c724a3661de0a2b078eef143f55d75ed184d823841d9de5038da91fb91  nfs.exports"
f7feb79cfcab0478affb640d1e5ad059757c88d51cc790fd54cde2fd7ed2e3cfd8f7f4c2de993d99da03e8ce3bdfb2750a4cb997b850fe33d0ef76d9b91c9018  nfs.initd
89259b9f0878658d48792b5b2f42b43c966ed098dba1fecf9e07fb0de4aab37ad67655ea8dbcc2361ddab2b5013b2de35a03048a513aaeedf790e4b416a35a54  nfsmount.initd
6e23897885cc33c49d9c7353b456585a1e0c7300822edba81bc48ba4ccc18297adce137260cc0aa9487aa5ef0aab3eecf931532cfa5bd40fd03bc9e0ddacfb28  nfsmount.confd
d9d7eeebbe153d3c4784112ed6d50734b5619b3315bb1454f8163de2b78ed8f958029a0e1088de58e9b1b8069184aeab2c8f19af4b957b6be25e4f138960aeac  rpc.gssd.initd
f3e88038cb040ffcbca76166f4322d37e39da00d144bc0a17aed4467ab10c6e626fcde6c407d0911d135bfab55622ad2e38ed93788b11459c5882ce60577fb45  rpc.idmapd.initd
3d3fa6e7ae01e27d27d88aba1e307c5293dd1cbc9d555737e03c4f1e17988518f4f1e7f7a38a7337f8e8961e8378cc4611769b04db7368460589a3b218ac6d6b  rpc.pipefs.initd
7f6baea852fff91b88e15e432ba19f9da0a3e3510b6f550b553912cf3887ce176280367b62bcce2a044730a075e4c1f6d7df1a669556d42725dea6e6e8e967ac  rpc.statd.initd
819cce4ae0a0f26bc74ce546e149b98420584240a594c9bb4a0a49413750320bde050866f3753c499425ea8d8df094211fb1f7e020ce281791e1933e1bc6a47f  rpc.svcgssd.initd
bc11b073735ee86c96b9c249ee187f4d16329c279a4e26760875059d2b5fa1d510ef3e4df5ee9dfb2a3133d755e1eb5c323d2fadc432a0cf630191ec353ac535  nfs.confd
70f96bb3a465ee0fa857a6e511051ca3ced9f5a5d1e6b8b32eec843a2067f2475d8979c724a3661de0a2b078eef143f55d75ed184d823841d9de5038da91fb91  nfs.exports
85078e2cd38b37a1e6fbaf0e40cf7690f403e71d9c8188d542d12fe56bfc02a49763c7bcc7742691754acc37928468c215db2795bebc29a5dfb052ba08f407bb  nfsclient.initd
f12e67728ac4e76357685e2fe38bd7f6fcd90064165758ffeca145e6962ac44d4ff9d8d57e18cc6925a6ada8e95ad8321e9fc355931a804dd455aae1e4850e92  nfsclient.confd"
diff --git a/main/nfs-utils/nfs.confd b/main/nfs-utils/nfs.confd
index 98a143a654..9dc14058c1 100644
--- a/main/nfs-utils/nfs.confd
+++ b/main/nfs-utils/nfs.confd
@@ -3,7 +3,11 @@
# If you wish to set the port numbers for lockd,
# please see /etc/sysctl.conf

# Number of servers to be started up by default
# Optional services to include in default `/etc/init.d/nfs start`
# For NFSv4 users, you'll want to add "rpc.idmapd" here.
NFS_NEEDED_SERVICES=""

# Options to pass to rpc.nfsd
OPTS_RPC_NFSD="8"

# Options to pass to rpc.mountd
@@ -28,3 +32,7 @@ OPTS_RPC_RQUOTAD=""

# Timeout (in seconds) for exportfs
EXPORTFS_TIMEOUT=30

# Options to set in the nfsd filesystem (/proc/fs/nfsd/).
# Format is <option>=<value>.  Multiple options are allowed.
#OPTS_NFSD="nfsv4leasetime=30 max_block_size=4096"
diff --git a/main/nfs-utils/nfs.initd b/main/nfs-utils/nfs.initd
index 327d476ccc..4b572fc2e5 100644
--- a/main/nfs-utils/nfs.initd
+++ b/main/nfs-utils/nfs.initd
@@ -1,9 +1,8 @@
#!/sbin/openrc-run
# Copyright 1999-2009 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/nfs.initd,v 1.19 2009/05/30 22:01:43 vapier Exp $

extra_started_commans="reload"
extra_started_commands="reload"

# This variable is used for controlling whether or not to run exportfs -ua;
# see stop() for more information
@@ -17,12 +16,18 @@ smnotify=/usr/sbin/sm-notify

depend() {
	local myneed=""
	if [ -e /etc/exports ] ; then
		if awk '!/^[[:space:]]*#/ && $2 ~ /sec=/ { exit 0 } END { exit 1 }' /etc/exports ; then
			myneed="${myneed} rpc.svcgssd"
		fi
	fi
	config /etc/exports
	# XXX: no way to detect NFSv4 is desired and so need rpc.idmapd
	myneed="${myneed} $(
		awk '!/^[[:space:]]*#/ {
			# clear the path to avoid spurious matches
			$1 = "";
			if ($0 ~ /[(][^)]*sec=(krb|spkm)[^)]*[)]/) {
				print "rpc.svcgssd"
				exit 0
			}
		}' /etc/exports /etc/exports.d/*.exports 2>/dev/null
	)"
	config /etc/exports /etc/exports.d/*.exports
	need portmap rpc.statd ${myneed} ${NFS_NEEDED_SERVICES}
	use ypbind net dns rpc.rquotad rpc.idmapd rpc.svcgssd
	after quota
@@ -30,7 +35,7 @@ depend() {

mkdir_nfsdirs() {
	local d
	for d in rpc_pipefs v4recovery v4root ; do
	for d in v4recovery v4root ; do
		d="/var/lib/nfs/${d}"
		[ ! -d "${d}" ] && mkdir -p "${d}"
	done
@@ -38,7 +43,7 @@ mkdir_nfsdirs() {

waitfor_exportfs() {
	local pid=$1
	( sleep ${EXPORTFS_TIMEOUT:-30}; kill -9 $pid 2>/dev/null ) &
	( sleep ${EXPORTFS_TIMEOUT:-30}; kill -9 ${pid} 2>/dev/null ) &
	wait $1
}

@@ -56,11 +61,16 @@ mount_nfsd() {

	# This is the new "kernel 2.6 way" to handle the exports file
	if grep -qs nfsd /proc/filesystems ; then
		if ! grep -qs "nfsd /proc/fs/nfsd" /proc/mounts ; then
		if ! mountinfo -q /proc/fs/nfsd ; then
			ebegin "Mounting nfsd filesystem in /proc"
			mount -t nfsd -o nodev,noexec,nosuid nfsd /proc/fs/nfsd
			eend $?
		fi

		local o
		for o in ${OPTS_NFSD} ; do
			echo "${o#*=}" > "/proc/fs/nfsd/${o%%=*}"
		done
	fi
}

@@ -78,7 +88,7 @@ start() {
	# Exportfs likes to hang if networking isn't working.
	# If that's the case, then try to kill it so the
	# bootup process can continue.
	if grep -qs '^[[:space:]]*/' /etc/exports ; then
	if grep -qs '^[[:space:]]*/' /etc/exports /etc/exports.d/*.exports ; then
		ebegin "Exporting NFS directories"
		${exportfs} -r &
		waitfor_exportfs $!
@@ -95,16 +105,14 @@ start() {
stop() {
	local ret=0

	# Don't check NFSSERVER variable since it might have changed,
	# instead use --oknodo to smooth things over
	ebegin "Stopping NFS mountd"
	start-stop-daemon --stop --oknodo --exec ${mountd}
	start-stop-daemon --stop --exec ${mountd}
	eend $?
	ret=$((ret + $?))

	# nfsd sets its process name to [nfsd] so don't look for $nfsd
	ebegin "Stopping NFS daemon"
	start-stop-daemon --stop --oknodo --name nfsd --user root --signal 2
	start-stop-daemon --stop --name nfsd --user root --signal 2
	eend $?
	ret=$((ret + $?))
	# in case things don't work out ... #228127
diff --git a/main/nfs-utils/nfsclient.confd b/main/nfs-utils/nfsclient.confd
new file mode 100644
index 0000000000..8a995571e1
--- /dev/null
+++ b/main/nfs-utils/nfsclient.confd
@@ -0,0 +1,18 @@
# You need to decide which nfs protocol version you want to use.
# If you are unsure, leave these alone.
#
# If you are using only nfsv4, uncomment this line:
#
#rc_need="!rpc.statd"
#
# If you are using only nfsv3, uncomment this line:
#
#rc_need="!rpc.idmapd"
# 
# You will need to set the dependencies in the nfsclient script to match
# the network configuration tools you are using. This should be done in
# this file by following the examples below, and not by changing the
# service script itself.  See /etc/conf.d/netmount for more examples.
#
# This is a safe default.
rc_after="net"
diff --git a/main/nfs-utils/nfsclient.initd b/main/nfs-utils/nfsclient.initd
new file mode 100644
index 0000000000..6724e913d1
--- /dev/null
+++ b/main/nfs-utils/nfsclient.initd
@@ -0,0 +1,33 @@
#!/sbin/openrc-run
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

[ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs

depend() {
	local opts myneed=""
	if [ -e /etc/fstab ] ; then
		for opts in $(fstabinfo -o -t nfs,nfs4) ; do
			case $opts in
				*sec=krb*|*sec=spkm*) myneed="$myneed rpc.gssd" ;;
			esac
		done
	fi
	config /etc/fstab
	need portmap rpc.statd rpc.idmapd ${myneed}
	use ypbind dns
}

start() {
	if [ -x /usr/sbin/sm-notify ] ; then
		ebegin "Starting NFS sm-notify"
		/usr/sbin/sm-notify ${OPTS_SMNOTIFY}
		eend $?
	fi

	# Make sure nfs support is loaded in the kernel #64709
	if [ -e /proc/modules ] && ! grep -qs 'nfs$' /proc/filesystems ; then
		modprobe -q nfs
	fi
	return 0
}
diff --git a/main/nfs-utils/nfsmount.confd b/main/nfs-utils/nfsmount.confd
new file mode 100644
index 0000000000..418353668f
--- /dev/null
+++ b/main/nfs-utils/nfsmount.confd
@@ -0,0 +1,7 @@
# You will need to set the dependencies in the nfsmount script to match
# the network configuration tools you are using. This should be done in
# this file by following the examples below, and not by changing the
# service script itself.  See /etc/conf.d/netmount for more examples.
#
# This is a safe default.
rc_after="net"
diff --git a/main/nfs-utils/nfsmount.initd b/main/nfs-utils/nfsmount.initd
index 6021404889..12c7d786a0 100644
--- a/main/nfs-utils/nfsmount.initd
+++ b/main/nfs-utils/nfsmount.initd
@@ -1,20 +1,25 @@
#!/sbin/openrc-run
# Copyright 1999-2009 Gentoo Foundation
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/nfsmount.initd,v 1.13 2009/01/31 22:15:02 vapier Exp $

[ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs

depend() {
	local myneed=""
	if [ -e /etc/fstab ] ; then
		awk '!/^[[:space:]]*#/ && $3 == "nfs4" { exit ($4 ~ /sec=krb/ ? 10 : 20) }' /etc/fstab
		local ret=$?
		[ ${ret} -eq 10 ] && myneed="${myneed} rpc.gssd"
		[ ${ret} -eq 20 ] && myneed="${myneed} rpc.idmapd"
		myneed="${myneed} $(
			awk '!/^[[:space:]]*#/ && ($3 == "nfs" || $3 == "nfs4") {
					if ($3 == "nfs4")
						idmapd = "rpc.idmapd"
					if ($4 ~ /sec=(krb|spkm)/)
						gssd = "rpc.gssd"
				}
				END { print idmapd " " gssd }
				' /etc/fstab
			)"
	fi
	config /etc/fstab
	need net portmap rpc.statd ${myneed}
	need portmap rpc.statd ${myneed}
	use ypbind dns rpc.idmapd rpc.gssd
}

diff --git a/main/nfs-utils/rpc.gssd.initd b/main/nfs-utils/rpc.gssd.initd
index 41a3485a95..445d44c444 100644
--- a/main/nfs-utils/rpc.gssd.initd
+++ b/main/nfs-utils/rpc.gssd.initd
@@ -1,7 +1,6 @@
#!/sbin/openrc-run
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/rpc.gssd.initd,v 1.11 2008/10/26 09:02:47 vapier Exp $

[ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs

diff --git a/main/nfs-utils/rpc.idmapd.initd b/main/nfs-utils/rpc.idmapd.initd
index ba7598cbb0..61cfd4de2e 100644
--- a/main/nfs-utils/rpc.idmapd.initd
+++ b/main/nfs-utils/rpc.idmapd.initd
@@ -1,7 +1,6 @@
#!/sbin/openrc-run
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/rpc.idmapd.initd,v 1.8 2009/03/14 18:43:18 vapier Exp $

[ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs

diff --git a/main/nfs-utils/rpc.pipefs.initd b/main/nfs-utils/rpc.pipefs.initd
index 400b66fd5f..f971a49b39 100644
--- a/main/nfs-utils/rpc.pipefs.initd
+++ b/main/nfs-utils/rpc.pipefs.initd
@@ -1,24 +1,32 @@
#!/sbin/openrc-run
# Copyright 1999-2008 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.1 2008/10/26 09:02:47 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 rpc_pipefs /proc/filesystems || modprobe -q sunrpc
	# if still not available, let's bail
	grep -qs rpc_pipefs /proc/filesystems || return 1
	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 /var/lib/nfs/rpc_pipefs
	mount -t rpc_pipefs rpc_pipefs /var/lib/nfs/rpc_pipefs
	mkdir -p ${MNT}
	mount -t ${fstype} ${fstype} ${MNT}
}

start() {
	# if things are already mounted, let's just return
	grep -qs "rpc_pipefs /var/lib/nfs/rpc_pipefs" /proc/mounts && return 0

	ebegin "Mounting RPC pipefs"
	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 $?
}
diff --git a/main/nfs-utils/rpc.statd.initd b/main/nfs-utils/rpc.statd.initd
index 73f5847f37..ea78b9aef6 100644
--- a/main/nfs-utils/rpc.statd.initd
+++ b/main/nfs-utils/rpc.statd.initd
@@ -1,11 +1,10 @@
#!/sbin/openrc-run
# Copyright 1999-2009 Gentoo Foundation
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/rpc.statd.initd,v 1.7 2009/01/31 22:16:11 vapier Exp $

[ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs

rpc_bin=/usr/sbin/rpc.statd
rpc_bin=/sbin/rpc.statd
rpc_pid=/var/run/rpc.statd.pid

depend() {
diff --git a/main/nfs-utils/rpc.svcgssd.initd b/main/nfs-utils/rpc.svcgssd.initd
index 8068b0b687..c714e36076 100644
--- a/main/nfs-utils/rpc.svcgssd.initd
+++ b/main/nfs-utils/rpc.svcgssd.initd
@@ -1,7 +1,6 @@
#!/sbin/openrc-run
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/rpc.svcgssd.initd,v 1.5 2008/10/26 09:02:47 vapier Exp $

[ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs

-- 
2.12.2



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Reply to thread Export thread (mbox)