From: Marc Grimme Date: Thu, 23 Jul 2009 10:19:54 +0000 (+0200) Subject: nfsroot-cleanup: make /var/lib/nfs/rpc_pipefs path configurable X-Git-Tag: 0.7~21 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2fe2945869ad5adabc290a06b11630c888e0a8fc;p=thirdparty%2Fdracut.git nfsroot-cleanup: make /var/lib/nfs/rpc_pipefs path configurable /tmp/nfs.rpc_pipefs_path can contain the path where /var/lib/nfs/rpc_pipefs will be moved before switch_root. This is useful if /var is a separate partition in the real root. --- diff --git a/modules.d/95nfs/nfsroot-cleanup.sh b/modules.d/95nfs/nfsroot-cleanup.sh index e3b3d1735..b801d8c4b 100644 --- a/modules.d/95nfs/nfsroot-cleanup.sh +++ b/modules.d/95nfs/nfsroot-cleanup.sh @@ -1,3 +1,7 @@ +rpcpipefspath=`cat /tmp/nfs.rpc_pipefs_path` + +[ -z "$rpcpipefspath" ] && rpcpipefspath=var/lib/nfs/rpc_pipefs + pid=$(pidof rpc.statd) [ -n "$pid" ] && kill $pid @@ -9,10 +13,10 @@ pid=$(pidof rpcbind) if incol2 /proc/mounts /var/lib/nfs/rpc_pipefs; then # try to create the destination directory - [ -d $NEWROOT/var/lib/nfs/rpc_pipefs ] || mkdir -p $NEWROOT/var/lib/nfs/rpc_pipefs 2>/dev/null + [ -d $NEWROOT/$rpcpipefspath ] || mkdir -p $NEWROOT/$rpcpipefspath 2>/dev/null - if [ -d $NEWROOT/var/lib/nfs/rpc_pipefs ]; then - mount --move /var/lib/nfs/rpc_pipefs $NEWROOT/var/lib/nfs/rpc_pipefs + if [ -d $NEWROOT/$rpcpipefspath ]; then + mount --move /var/lib/nfs/rpc_pipefs $NEWROOT/$rpcpipefspath else umount /var/lib/nfs/rpc_pipefs fi