Mount /run and /run/shm in chroots.

When running layout tests, we need /run/shm.  Previously we wouldn't
install it because the chroot didn't have /run.  Now we will mount
/run and /run/shm in the chroot.

BUG=166632


Review URL: https://chromiumcodereview.appspot.com/11649050

git-svn-id: http://src.chromium.org/svn/trunk/src/build@174326 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This commit is contained in:
tony@chromium.org 2012-12-21 02:58:34 +00:00
Родитель b92bd8149f
Коммит a4c7937352
1 изменённых файлов: 7 добавлений и 3 удалений

Просмотреть файл

@ -392,12 +392,16 @@ if [ -d /media ] &&
sudo sh -c 'cat >>/etc/schroot/mount-'"${target}"
fi
# Share /dev/shm and possibly /run/shm
# Share /dev/shm, /run and /run/shm.
grep -qs '^/dev/shm' /etc/schroot/mount-"${target}" ||
echo '/dev/shm /dev/shm none rw,bind 0 0' |
sudo sh -c 'cat >>/etc/schroot/mount-'"${target}"
if [ -d "/var/lib/chroot/${target}/run" ] &&
! grep -qs '^/run/shm' /etc/schroot/mount-"${target}"; then
if [ ! -d "/var/lib/chroot/${target}/run" ] &&
! grep -qs '^/run' /etc/schroot/mount-"${target}"; then
echo '/run /run none rw,bind 0 0' |
sudo sh -c 'cat >>/etc/schroot/mount-'"${target}"
fi
if ! grep -qs '^/run/shm' /etc/schroot/mount-"${target}"; then
{ [ -d /run ] && echo '/run/shm /run/shm none rw,bind 0 0' ||
echo '/dev/shm /run/shm none rw,bind 0 0'; } |
sudo sh -c 'cat >>/etc/schroot/mount-'"${target}"