@@ -1,9 +1,9 @@
#!/bin/sh
### BEGIN INIT INFO
# Provides: nfs-common
-# Required-Start: $portmap hwclock
-# Required-Stop: $portmap hwclock
-# Default-Start: 2 3 4 5
+# Required-Start: $portmap $time
+# Required-Stop: $portmap $time
+# Default-Start: S
# Default-Stop: 0 1 6
# Short-Description: NFS support for both client and server
# Description: NFS is a popular protocol for file sharing across
@@ -20,7 +20,7 @@
. /etc/init.d/functions
test -x "$NFS_STATD" || NFS_STATD=/usr/sbin/rpc.statd
-test -z "$STATD_PID" && STATD_PID=/var/run/rpc.statd.pid
+test -z "$STATD_PID" && STATD_PID=/run/rpc.statd.pid
#
# The default state directory is /var/lib/nfs
test -n "$NFS_STATEDIR" || NFS_STATEDIR=/var/lib/nfs
@@ -133,15 +133,14 @@ do_install:append () {
install -m 0644 ${UNPACKDIR}/nfs-server.service ${D}${systemd_system_unitdir}/
install -m 0644 ${UNPACKDIR}/nfs-mountd.service ${D}${systemd_system_unitdir}/
install -m 0644 ${UNPACKDIR}/nfs-statd.service ${D}${systemd_system_unitdir}/
+ install -m 0644 ${UNPACKDIR}/proc-fs-nfsd.mount ${D}${systemd_system_unitdir}/
sed -i -e 's,@SBINDIR@,${sbindir},g' \
-e 's,@SYSCONFDIR@,${sysconfdir},g' \
-e 's,@HIGH_RLIMIT_NOFILE@,${HIGH_RLIMIT_NOFILE},g' \
${D}${systemd_system_unitdir}/*.service
- if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
- install -m 0644 ${UNPACKDIR}/proc-fs-nfsd.mount ${D}${systemd_system_unitdir}/
- install -d ${D}${systemd_system_unitdir}/sysinit.target.wants/
- ln -sf ../proc-fs-nfsd.mount ${D}${systemd_system_unitdir}/sysinit.target.wants/proc-fs-nfsd.mount
- fi
+ # Add compatibility symlinks for the sysvinit scripts
+ ln -s nfs-server.service ${D}${systemd_system_unitdir}/nfsserver.service
+ ln -s /dev/null ${D}${systemd_system_unitdir}/nfscommon.service
# kernel code as of 3.8 hard-codes this path as a default
install -d ${D}/var/lib/nfs/v4recovery