[PATCH] Avoid using mount --move on /run/ paths (#853508)
Jesse Keating
jkeating at redhat.com
Fri Oct 12 18:50:09 UTC 2012
move doesn't work because /run/ is a shared filesystem. A bind mount
and umount is essientally the same so just use that.
---
dracut/anaconda-lib.sh | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dracut/anaconda-lib.sh b/dracut/anaconda-lib.sh
index 6b9a707..fbbb919 100755
--- a/dracut/anaconda-lib.sh
+++ b/dracut/anaconda-lib.sh
@@ -54,7 +54,7 @@ anaconda_live_root_dir() {
img=$(find_runtime $mnt/$path)
if [ -n "$img" ]; then
info "anaconda: found $img"
- [ "$mnt" = "$repodir" ] || mount --move $mnt $repodir
+ [ "$mnt" = "$repodir" ] || { mount --bind $mnt $repodir; umount $mnt; }
anaconda_auto_updates $repodir/$path/images
else
if [ "${path%.iso}" != "$path" ]; then
@@ -65,7 +65,8 @@ anaconda_live_root_dir() {
fi
[ -n "$iso" ] || { warn "no suitable images"; return 1; }
info "anaconda: found $iso"
- mount --move $mnt $isodir
+ mount --bind $mnt $isodir
+ umount $mnt
iso=${isodir}/${iso#$mnt}
mount -o loop,ro $iso $repodir
img=$(find_runtime $repodir) || { warn "$iso has no suitable runtime"; }
--
1.7.11.4
More information about the anaconda-patches
mailing list