From dc0aa047ce2f58fe775fe1624183aac1b7d55c9a Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 21 Dec 2015 16:20:38 +0100 Subject: [PATCH] base-files: check /tmp is writable before creating $XDG_RUNTIME_DIR. --- srcpkgs/base-files/files/xdg-runtime-dir.sh | 6 +++--- srcpkgs/base-files/template | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/srcpkgs/base-files/files/xdg-runtime-dir.sh b/srcpkgs/base-files/files/xdg-runtime-dir.sh index 0a6580b16f5..6cec430d7bc 100644 --- a/srcpkgs/base-files/files/xdg-runtime-dir.sh +++ b/srcpkgs/base-files/files/xdg-runtime-dir.sh @@ -2,8 +2,8 @@ if test -z "${XDG_RUNTIME_DIR}"; then export XDG_RUNTIME_DIR=/tmp/${UID:-$(id -u)}-runtime-dir - if ! test -d "${XDG_RUNTIME_DIR}"; then - mkdir "${XDG_RUNTIME_DIR}" - chmod 0700 "${XDG_RUNTIME_DIR}" + if test -w /tmp -a ! test -d "${XDG_RUNTIME_DIR}"; then + mkdir -p "${XDG_RUNTIME_DIR}" >/dev/null 2>&1 + chmod 0700 "${XDG_RUNTIME_DIR}" >/dev/null 2>&1 fi fi diff --git a/srcpkgs/base-files/template b/srcpkgs/base-files/template index d9992bcb3b7..1950ea39966 100644 --- a/srcpkgs/base-files/template +++ b/srcpkgs/base-files/template @@ -1,6 +1,6 @@ # Template file for 'base-files' pkgname=base-files -version=0.134 +version=0.135 revision=1 bootstrap=yes depends="xbps-triggers"