From 93809aaf1bc57eac99006c582ba510f54f8558ea Mon Sep 17 00:00:00 2001 From: Junichi Uekawa Date: Tue, 26 Mar 2013 17:51:12 +0900 Subject: Do not try to use /dev/shm if /run/shm is not present. (closes: #702811, #702102) falling back to /dev/shm doesn't make sense; /dev/shm is a symlink to /run/shm. rename variable to USERUNSHM instead of USEDEVSHM, we don't need to touch /dev/shm --- pbuilder-modules | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'pbuilder-modules') diff --git a/pbuilder-modules b/pbuilder-modules index 3756615..055d611 100644 --- a/pbuilder-modules +++ b/pbuilder-modules @@ -221,8 +221,8 @@ function umountproc () { if [ "$USEDEVFS" = "yes" ]; then umount_one "dev" fi - if [ "$USEDEVSHM" = "yes" ]; then - umount_one "$SHM_PATH" + if [ "$USERUNSHM" = "yes" ]; then + umount_one "run/shm" fi if [ "$USEPROC" = "yes" ]; then if [ "$DEB_BUILD_ARCH_OS" = "linux" ] && [ -e $BUILDPLACE/proc/sys/fs/binfmt_misc/status ]; then @@ -245,7 +245,9 @@ function mountproc () { log "I: mounting /proc filesystem" mkdir -p $BUILDPLACE/proc PROCFS="proc" - [ "$DEB_BUILD_ARCH_OS" = "kfreebsd" ] && PROCFS="linprocfs" + if [ "$DEB_BUILD_ARCH_OS" = "kfreebsd" ]; then + PROCFS="linprocfs" + fi mount -t $PROCFS /proc "$BUILDPLACE/proc" ln -s ../proc/mounts $BUILDPLACE/etc/mtab 2> /dev/null || true mounted[${#mounted[@]}]="$BUILDPLACE/proc" @@ -256,13 +258,11 @@ 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" + if [ "$DEB_BUILD_ARCH_OS" = "linux" ] && [ "$USERUNSHM" = "yes" ]; then + log "I: mounting /run/shm filesystem" + mkdir -p $BUILDPLACE/run/shm || true + mount -t tmpfs tmpfs "$BUILDPLACE/run/shm" + mounted[${#mounted[@]}]="$BUILDPLACE/run/shm" fi if [ "$DEB_BUILD_ARCH_OS" = "linux" ] && [ "$USEDEVPTS" = "yes" ]; then log "I: mounting /dev/pts filesystem" -- cgit v1.2.3