summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils/nfscommon27
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.0.bb7
2 files changed, 5 insertions, 29 deletions
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfscommon b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfscommon
index 65fdd1dd4f..992267d5a1 100644
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfscommon
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfscommon
@@ -28,33 +28,7 @@ test -n "$NFS_STATEDIR" || NFS_STATEDIR=/var/lib/nfs
28#---------------------------------------------------------------------- 28#----------------------------------------------------------------------
29# Startup and shutdown functions. 29# Startup and shutdown functions.
30# Actual startup/shutdown is at the end of this file. 30# Actual startup/shutdown is at the end of this file.
31#directories
32create_directories(){
33 echo -n 'creating NFS state directory: '
34 mkdir -p "$NFS_STATEDIR"
35 ( cd "$NFS_STATEDIR"
36 umask 077
37 mkdir -p rpc_pipefs
38 mkdir -p sm sm.bak statd
39 chown rpcuser:rpcuser sm sm.bak statd
40 test -w statd/state || {
41 rm -f statd/state
42 :>statd/state
43 }
44 umask 022
45 for file in xtab etab smtab rmtab
46 do
47 test -w "$file" || {
48 rm -f "$file"
49 :>"$file"
50 }
51 done
52 )
53 chown rpcuser:rpcuser "$NFS_STATEDIR"
54 echo done
55}
56 31
57#statd
58start_statd(){ 32start_statd(){
59 echo -n "starting statd: " 33 echo -n "starting statd: "
60 start-stop-daemon --start --exec "$NFS_STATD" --pidfile "$STATD_PID" 34 start-stop-daemon --start --exec "$NFS_STATD" --pidfile "$STATD_PID"
@@ -74,7 +48,6 @@ stop_statd(){
74#FIXME: need to create the /var/lib/nfs/... directories 48#FIXME: need to create the /var/lib/nfs/... directories
75case "$1" in 49case "$1" in
76 start) 50 start)
77 create_directories
78 start_statd;; 51 start_statd;;
79 stop) 52 stop)
80 stop_statd;; 53 stop_statd;;
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.0.bb b/meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.0.bb
index 4933e10403..37a2e1a6da 100644
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.0.bb
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.0.bb
@@ -56,7 +56,7 @@ SYSTEMD_SERVICE_${PN}-client = "nfs-statd.service"
56SYSTEMD_AUTO_ENABLE = "disable" 56SYSTEMD_AUTO_ENABLE = "disable"
57 57
58# --enable-uuid is need for cross-compiling 58# --enable-uuid is need for cross-compiling
59EXTRA_OECONF = "--with-statduser=nobody \ 59EXTRA_OECONF = "--with-statduser=rpcuser \
60 --enable-mountconfig \ 60 --enable-mountconfig \
61 --enable-libmount-mount \ 61 --enable-libmount-mount \
62 --disable-nfsv41 \ 62 --disable-nfsv41 \
@@ -92,7 +92,6 @@ do_compile_prepend() {
92 92
93do_install_append () { 93do_install_append () {
94 install -d ${D}${sysconfdir}/init.d 94 install -d ${D}${sysconfdir}/init.d
95 install -d ${D}${localstatedir}/lib/nfs/statd
96 install -m 0755 ${WORKDIR}/nfsserver ${D}${sysconfdir}/init.d/nfsserver 95 install -m 0755 ${WORKDIR}/nfsserver ${D}${sysconfdir}/init.d/nfsserver
97 install -m 0755 ${WORKDIR}/nfscommon ${D}${sysconfdir}/init.d/nfscommon 96 install -m 0755 ${WORKDIR}/nfscommon ${D}${sysconfdir}/init.d/nfscommon
98 97
@@ -108,6 +107,10 @@ do_install_append () {
108 # kernel code as of 3.8 hard-codes this path as a default 107 # kernel code as of 3.8 hard-codes this path as a default
109 install -d ${D}/var/lib/nfs/v4recovery 108 install -d ${D}/var/lib/nfs/v4recovery
110 109
110 # chown the directories and files
111 chown -R rpcuser:rpcuser ${D}${localstatedir}/lib/nfs/statd
112 chmod 0644 ${D}${localstatedir}/lib/nfs/statd/state
113
111 # the following are built by CC_FOR_BUILD 114 # the following are built by CC_FOR_BUILD
112 rm -f ${D}${sbindir}/rpcdebug 115 rm -f ${D}${sbindir}/rpcdebug
113 rm -f ${D}${sbindir}/rpcgen 116 rm -f ${D}${sbindir}/rpcgen