summaryrefslogtreecommitdiff
path: root/modules.d/95nfs
diff options
context:
space:
mode:
authorHarald Hoyer <harald@redhat.com>2011-04-06 09:22:21 +0200
committerHarald Hoyer <harald@redhat.com>2011-04-08 10:39:46 +0200
commitd125a47061c92cc374a0253a71b03a38aa81c63e (patch)
tree6a1a8e1230ccc5e62795fc507c8cef2bf21d75bb /modules.d/95nfs
parent8daaa464788774d4a64e5ee52b7bd2c978ccd067 (diff)
downloaddracut-d125a47061c92cc374a0253a71b03a38aa81c63e.tar.gz
dracut-d125a47061c92cc374a0253a71b03a38aa81c63e.tar.bz2
dracut-d125a47061c92cc374a0253a71b03a38aa81c63e.zip
mkdir always with -m 0755
Diffstat (limited to 'modules.d/95nfs')
-rwxr-xr-xmodules.d/95nfs/module-setup.sh6
-rwxr-xr-xmodules.d/95nfs/nfsroot-cleanup.sh3
2 files changed, 5 insertions, 4 deletions
diff --git a/modules.d/95nfs/module-setup.sh b/modules.d/95nfs/module-setup.sh
index 84673ab8..ad6c2577 100755
--- a/modules.d/95nfs/module-setup.sh
+++ b/modules.d/95nfs/module-setup.sh
@@ -49,9 +49,9 @@ install() {
inst_hook cmdline 90 "$moddir/parse-nfsroot.sh"
inst_hook pre-pivot 99 "$moddir/nfsroot-cleanup.sh"
inst "$moddir/nfsroot" "/sbin/nfsroot"
- mkdir -p "$initdir/var/lib/nfs/rpc_pipefs"
- mkdir -p "$initdir/var/lib/rpcbind"
- mkdir -p "$initdir/var/lib/nfs/statd/sm"
+ mkdir -m 0755 -p "$initdir/var/lib/nfs/rpc_pipefs"
+ mkdir -m 0755 -p "$initdir/var/lib/rpcbind"
+ mkdir -m 0755 -p "$initdir/var/lib/nfs/statd/sm"
# Rather than copy the passwd file in, just set a user for rpcbind
# We'll save the state and restart the daemon from the root anyway
diff --git a/modules.d/95nfs/nfsroot-cleanup.sh b/modules.d/95nfs/nfsroot-cleanup.sh
index b9fa7718..b2f178ea 100755
--- a/modules.d/95nfs/nfsroot-cleanup.sh
+++ b/modules.d/95nfs/nfsroot-cleanup.sh
@@ -16,7 +16,8 @@ pid=$(pidof rpcbind)
if incol2 /proc/mounts /var/lib/nfs/rpc_pipefs; then
# try to create the destination directory
- [ -d $NEWROOT/$rpcpipefspath ] || mkdir -p $NEWROOT/$rpcpipefspath 2>/dev/null
+ [ -d $NEWROOT/$rpcpipefspath ] || \
+ mkdir -m 0755 -p $NEWROOT/$rpcpipefspath 2>/dev/null
if [ -d $NEWROOT/$rpcpipefspath ]; then
mount --move /var/lib/nfs/rpc_pipefs $NEWROOT/$rpcpipefspath