* [PATCH usrmove branch] fstab-sys: mount it in initramfs instead of newroot if mount point is not found
@ 2012-01-12 8:00 Dave Young
[not found] ` <20120112080031.GA32416-4/PLUo9XfK+sDdueE5tM26fLeoKvNuZc@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Dave Young @ 2012-01-12 8:00 UTC (permalink / raw)
To: initramfs-u79uwXL29TY76Z2rM5mHXA, harald-H+wXaHxf7aLQT0dZR+AlfA
fstab-sys now also handles device passed by dracut argument "--mount"
The "--mount" mount point is possible not exist in $NEWROOT. Thus mount it
in initramfs if mount point is not exist in real rootfs
---
modules.d/95fstab-sys/mount-sys.sh | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/modules.d/95fstab-sys/mount-sys.sh b/modules.d/95fstab-sys/mount-sys.sh
index a8fbd50..4de7285 100755
--- a/modules.d/95fstab-sys/mount-sys.sh
+++ b/modules.d/95fstab-sys/mount-sys.sh
@@ -20,7 +20,12 @@ fstab_mount() {
fi
_fs=$(det_fs "$_dev" "$_fs")
info "Mounting $_dev"
- mount -v -t $_fs -o $_opts $_dev $NEWROOT/$_mp 2>&1 | vinfo
+ if [[ -d $NEWROOT/$_mp ]]; then
+ mount -v -t $_fs -o $_opts $_dev $NEWROOT/$_mp 2>&1 | vinfo
+ else
+ mkdir -p "$_mp"
+ mount -v -t $_fs -o $_opts $_dev $_mp 2>&1 | vinfo
+ fi
done < $1
return 0
}
--
1.7.7.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-01-13 10:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-12 8:00 [PATCH usrmove branch] fstab-sys: mount it in initramfs instead of newroot if mount point is not found Dave Young
[not found] ` <20120112080031.GA32416-4/PLUo9XfK+sDdueE5tM26fLeoKvNuZc@public.gmane.org>
2012-01-13 10:51 ` Harald Hoyer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox