diff --git a/debian/changelog b/debian/changelog index 9d86fdeb..0f051b68 100644 --- a/debian/changelog +++ b/debian/changelog @@ -18,6 +18,7 @@ byobu (4.43) unreleased; urgency=low - ensure launcher command removed from each file before installing * usr/lib/byobu/.dirs: - use /dev/shm for cache, LP: #872551 + - search and use a shared dir when possible [ Daniel Hahler ] * usr/bin/byobu, usr/bin/byobu-launcher-install, usr/bin/byobu- diff --git a/usr/lib/byobu/.dirs b/usr/lib/byobu/.dirs index 51228edd..6726a3a9 100755 --- a/usr/lib/byobu/.dirs +++ b/usr/lib/byobu/.dirs @@ -40,14 +40,12 @@ fi # Create and export the runtime cache directory if [ -w /dev/shm ]; then # Use shm for performance, if possible - if [ -z "$BYOBU_RUN_DIR" ]; then - for i in /dev/shm/$PKG-$USER-*; do - if [ -d "$i" ] && [ -O "$i" ]; then - export BYOBU_RUN_DIR="$i" - break - fi - done - fi + for i in /dev/shm/$PKG-$USER-*; do + if [ -d "$i" ] && [ -O "$i" ]; then + export BYOBU_RUN_DIR="$i" + break + fi + done # Still empty, make a new one if [ ! -d "$BYOBU_RUN_DIR" ] || [ ! -O "$BYOBU_RUN_DIR" ]; then export BYOBU_RUN_DIR=$(mktemp -d /dev/shm/$PKG-$USER-XXXXXXXX)