diff options
author | Sebastian Pipping <sebastian@pipping.org> | 2012-06-02 23:12:31 +0200 |
---|---|---|
committer | Sebastian Pipping <sebastian@pipping.org> | 2012-06-02 23:12:31 +0200 |
commit | aed52e83827cff73e8f7ba5773ea8e0cd7c3c25b (patch) | |
tree | 02e67e9459ee9d1694b412d377ff233add09e2a3 | |
parent | Fix an e2fsprogs compilation leftover (bug #417095) (diff) | |
download | genkernel-aed52e83827cff73e8f7ba5773ea8e0cd7c3c25b.tar.gz genkernel-aed52e83827cff73e8f7ba5773ea8e0cd7c3c25b.tar.bz2 genkernel-aed52e83827cff73e8f7ba5773ea8e0cd7c3c25b.zip |
Support bind mounts from /etc/initramfs.mounts (bug #418463)
-rw-r--r-- | ChangeLog | 3 | ||||
-rwxr-xr-x | defaults/linuxrc | 9 |
2 files changed, 10 insertions, 2 deletions
@@ -5,6 +5,9 @@ # Distributed under the GPL v2 # $Id$ + 02 Jun 2012; Sebastian Pipping <sping@gentoo.org> defaults/linuxrc: + Support bind mounts from /etc/initramfs.mounts (bug #418463) + 28 May 2012; Sebastian Pipping <sping@gentoo.org> gen_funcs.sh: Fix an e2fsprogs compilation leftover (bug #417095), reported by Juergen Rose diff --git a/defaults/linuxrc b/defaults/linuxrc index 4ff5662..b6ad58f 100755 --- a/defaults/linuxrc +++ b/defaults/linuxrc @@ -847,8 +847,13 @@ for fs in $fslist; do # and not a mountpoint [ -z "$dev" ] && continue fstype=$(get_mount_fstype $fs) - # ro must be trailing, and the options will always contain at least 'defaults' - opts="$(get_mount_options $fs | strip_mount_options),ro" + if get_mount_options $fs | fgrep -q bind ; then + opts='bind' + dev=${NEW_ROOT}${dev} + else + # ro must be trailing, and the options will always contain at least 'defaults' + opts="$(get_mount_options $fs | strip_mount_options),ro" + fi mnt=${NEW_ROOT}${fs} cmd="mount -t $fstype -o $opts $dev $mnt" good_msg "Mounting $dev as ${fs}: $cmd" |