From 37439cbe33fb747b4855b45e7d6226fcb122f610 Mon Sep 17 00:00:00 2001 From: Robert Nelson <robertcnelson@gmail.com> Date: Fri, 23 Oct 2015 14:47:34 -0500 Subject: [PATCH] chroot: /run as tmpfs as we dont want these in the final rootfs Signed-off-by: Robert Nelson <robertcnelson@gmail.com> --- scripts/chroot.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/scripts/chroot.sh b/scripts/chroot.sh index 93e45ca46..466899baf 100755 --- a/scripts/chroot.sh +++ b/scripts/chroot.sh @@ -162,9 +162,9 @@ chroot_mount () { sudo mount -t devpts devpts "${tempdir}/dev/pts" fi -# if [ "$(mount | grep ${tempdir}/run | awk '{print $3}')" != "${tempdir}/run" ] ; then -# sudo mount -t tmpfs run "${tempdir}/run" -# fi + if [ "$(mount | grep ${tempdir}/run | awk '{print $3}')" != "${tempdir}/run" ] ; then + sudo mount -t tmpfs run "${tempdir}/run" + fi } chroot_umount () { @@ -201,16 +201,16 @@ chroot_umount () { fi fi -# if [ "$(mount | grep ${tempdir}/run | awk '{print $3}')" = "${tempdir}/run" ] ; then -# echo "Log: umount: [${tempdir}/run]" -# sync -# sudo umount -fl "${tempdir}/run" + if [ "$(mount | grep ${tempdir}/run | awk '{print $3}')" = "${tempdir}/run" ] ; then + echo "Log: umount: [${tempdir}/run]" + sync + sudo umount -fl "${tempdir}/run" -# if [ "$(mount | grep ${tempdir}/run | awk '{print $3}')" = "${tempdir}/run" ] ; then -# echo "Log: ERROR: umount [${tempdir}/run] failed..." -# exit 1 -# fi -# fi + if [ "$(mount | grep ${tempdir}/run | awk '{print $3}')" = "${tempdir}/run" ] ; then + echo "Log: ERROR: umount [${tempdir}/run] failed..." + exit 1 + fi + fi } chroot_stopped () { -- GitLab