On Sun, May 20, 2012 at 09:57:37PM -0400, Thomas Hebb wrote: > Switch from using a bind mount to devtmpfs when mounting /dev on the > target system. > > Signed-off-by: Thomas Hebb <[email protected]> > ---
This is effectively a no-op. Within a given namespace, you can only have a single instance of devtmpfs. Additionally, a bind mount isn't doing anything special -- it's just syntactic sugar for the kernel. > src/core/libs/lib-blockdevices-filesystems.sh | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/src/core/libs/lib-blockdevices-filesystems.sh > b/src/core/libs/lib-blockdevices-filesystems.sh > index 4312143..70805c8 100644 > --- a/src/core/libs/lib-blockdevices-filesystems.sh > +++ b/src/core/libs/lib-blockdevices-filesystems.sh > @@ -112,9 +112,9 @@ target_special_fs () > ! [ -d $var_TARGET_DIR/sys ] && mkdir $var_TARGET_DIR/sys > ! [ -d $var_TARGET_DIR/dev ] && mkdir $var_TARGET_DIR/dev > #mount, if not mounted yet > - mount | grep -q "$var_TARGET_DIR/proc" || mount -t proc proc > $var_TARGET_DIR/proc || die_error "Could not mount $var_TARGET_DIR/proc" > - mount | grep -q "$var_TARGET_DIR/sys" || mount -t sysfs sysfs > $var_TARGET_DIR/sys || die_error "Could not mount $var_TARGET_DIR/sys" > - mount | grep -q "$var_TARGET_DIR/dev" || mount -o bind /dev > $var_TARGET_DIR/dev || die_error "Could not mount $var_TARGET_DIR/dev" > + mount | grep -q "$var_TARGET_DIR/proc" || mount -t proc > proc $var_TARGET_DIR/proc || die_error "Could not mount > $var_TARGET_DIR/proc" > + mount | grep -q "$var_TARGET_DIR/sys" || mount -t sysfs > sysfs $var_TARGET_DIR/sys || die_error "Could not mount > $var_TARGET_DIR/sys" > + mount | grep -q "$var_TARGET_DIR/dev" || mount -t devtmpfs > devtmpfs $var_TARGET_DIR/dev || die_error "Could not mount > $var_TARGET_DIR/dev" > elif [ "$1" = off ] > then > umount $var_TARGET_DIR/proc || die_error "Could not umount > $var_TARGET_DIR/proc" > -- > 1.7.10.2 >
