- mount -n -o bind /sys /root/sys
- mount -n -o bind /proc /root/proc
- mount -n -o bind /dev /root/dev
+ mount -o bind /sys /root/sys
+ mount -o bind /proc /root/proc
+ mount -o bind /dev /root/dev
snapdev="$(echo ${snapdata} | cut -f1 -d ' ')"
snapback="$(echo ${snapdata} | cut -f2 -d ' ')"
snapfile="$(echo ${snapdata} | cut -f3 -d ' ')"
snapdev="$(echo ${snapdata} | cut -f1 -d ' ')"
snapback="$(echo ${snapdata} | cut -f2 -d ' ')"
snapfile="$(echo ${snapdata} | cut -f3 -d ' ')"
if echo "${snapfile}" | grep -qs '\(squashfs\|ext2\|ext3\|jffs2\)'
then
# squashfs, jffs2 or ext2/ext3 snapshot
dev=$(get_backing_device "${snapback}/${snapfile}")
if echo "${snapfile}" | grep -qs '\(squashfs\|ext2\|ext3\|jffs2\)'
then
# squashfs, jffs2 or ext2/ext3 snapshot
dev=$(get_backing_device "${snapback}/${snapfile}")
if echo "${dev}" | grep -qs loop
then
# strange things happens, user confused?
if echo "${dev}" | grep -qs loop
then
# strange things happens, user confused?
mount -t "${fstype}" -o ro,noatime "${backdev}" "${croot}/${imagename}" || panic "Can not mount ${backdev} (${image}) on ${croot}/${imagename}" && rofsstring="${croot}/${imagename}=${roopt}:${rofsstring}" && rofslist="${croot}/${imagename} ${rofslist}"
mount -t "${fstype}" -o ro,noatime "${backdev}" "${croot}/${imagename}" || panic "Can not mount ${backdev} (${image}) on ${croot}/${imagename}" && rofsstring="${croot}/${imagename}=${roopt}:${rofsstring}" && rofslist="${croot}/${imagename} ${rofslist}"