From 8f9ed2407f907e4bc66a11c8454e8d060afdae31 Mon Sep 17 00:00:00 2001 From: Chen Qi Date: Fri, 7 Nov 2014 16:47:19 +0800 Subject: nfs-utils: change owner/group of directories in do_install Previously, the owners/groups of directories like /var/lib/nfs/statd are changed in the init script, /etc/init.d/nfscommon. This is actually a workaround. We need to change them at do_install time. This patch fixes the above problem by changing owners/groups at do_install time. Besides, configuration option '--with-staduser=nobody' is changed to be '--with-statduser=rpcuser'. And /var/lib/nfs/statd/state is modified to have permission 0644, just like other distros (ubuntu, fedora, etc.) do. (From OE-Core rev: 8c27a1e25ae42a435ab7d290cab40f94f9286243) Signed-off-by: Chen Qi Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- .../nfs-utils/nfs-utils/nfscommon | 27 ---------------------- 1 file changed, 27 deletions(-) (limited to 'meta/recipes-connectivity/nfs-utils/nfs-utils/nfscommon') 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 #---------------------------------------------------------------------- # Startup and shutdown functions. # Actual startup/shutdown is at the end of this file. -#directories -create_directories(){ - echo -n 'creating NFS state directory: ' - mkdir -p "$NFS_STATEDIR" - ( cd "$NFS_STATEDIR" - umask 077 - mkdir -p rpc_pipefs - mkdir -p sm sm.bak statd - chown rpcuser:rpcuser sm sm.bak statd - test -w statd/state || { - rm -f statd/state - :>statd/state - } - umask 022 - for file in xtab etab smtab rmtab - do - test -w "$file" || { - rm -f "$file" - :>"$file" - } - done - ) - chown rpcuser:rpcuser "$NFS_STATEDIR" - echo done -} -#statd start_statd(){ echo -n "starting statd: " start-stop-daemon --start --exec "$NFS_STATD" --pidfile "$STATD_PID" @@ -74,7 +48,6 @@ stop_statd(){ #FIXME: need to create the /var/lib/nfs/... directories case "$1" in start) - create_directories start_statd;; stop) stop_statd;; -- cgit v1.2.3-54-g00ecf