From 9fea2eddf4841b35c78e01adc6a4eddbc4109db8 Mon Sep 17 00:00:00 2001 From: Agustin Henze Date: Thu, 14 Feb 2013 18:53:23 -0300 Subject: Added support for shared memory mounting point (closes: #700591) --- pbuilder-modules | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'pbuilder-modules') diff --git a/pbuilder-modules b/pbuilder-modules index c98fe04..3756615 100644 --- a/pbuilder-modules +++ b/pbuilder-modules @@ -221,6 +221,9 @@ function umountproc () { if [ "$USEDEVFS" = "yes" ]; then umount_one "dev" fi + if [ "$USEDEVSHM" = "yes" ]; then + umount_one "$SHM_PATH" + fi if [ "$USEPROC" = "yes" ]; then if [ "$DEB_BUILD_ARCH_OS" = "linux" ] && [ -e $BUILDPLACE/proc/sys/fs/binfmt_misc/status ]; then umount_one "proc/sys/fs/binfmt_misc" @@ -253,6 +256,14 @@ function mountproc () { mount -t devfs /dev "$BUILDPLACE/dev" mounted[${#mounted[@]}]="$BUILDPLACE/dev" fi + if [ "$DEB_BUILD_ARCH_OS" = "linux" ] && [ "$USEDEVSHM" = "yes" ]; then + SHM_PATH="run/shm" + [ ! -d "/$SHM_PATH" ] && SHM_PATH="dev/shm" + log "I: mounting /$SHM_PATH filesystem" + mkdir -p $BUILDPLACE/$SHM_PATH || true + mount -t tmpfs tmpfs "$BUILDPLACE/$SHM_PATH" + mounted[${#mounted[@]}]="$BUILDPLACE/$SHM_PATH" + fi if [ "$DEB_BUILD_ARCH_OS" = "linux" ] && [ "$USEDEVPTS" = "yes" ]; then log "I: mounting /dev/pts filesystem" mkdir -p $BUILDPLACE/dev/pts || true -- cgit v1.2.3