From e81dbf72d29318db828ff8fbbc154eba15a253f8 Mon Sep 17 00:00:00 2001 From: Joerg Bornkessel Date: Fri, 11 Jul 2014 14:39:06 +0200 Subject: create cachedir on the fly, wrt bug 4994444 --- ChangeLog | 4 ++++ usr/share/vdr/rcscript/pre-start-30-parameter.sh | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/ChangeLog b/ChangeLog index 1359478..4ac55c6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for gentoo-vdr-scripts # $Id$ + 11 Jul 2014; Joerg Bornkessel + usr/share/vdr/rcscript/pre-start-30-parameter.sh: + create cachedir on the fly, wrt bug 4994444 + 14 Apr 2014; Joerg Bornkessel vdrplugin-rebuild/vdrplugin-rebuild: fixed 'portageq portdir' deprecated warning diff --git a/usr/share/vdr/rcscript/pre-start-30-parameter.sh b/usr/share/vdr/rcscript/pre-start-30-parameter.sh index 63ee1c1..0444635 100644 --- a/usr/share/vdr/rcscript/pre-start-30-parameter.sh +++ b/usr/share/vdr/rcscript/pre-start-30-parameter.sh @@ -13,7 +13,14 @@ addon_main() { [ -n "${CONFIG}" ] && add_param "--config=${CONFIG}" [ -n "${DEVICE}" ] && for i in ${DEVICE}; do add_param "--device=${i}"; done [ -n "${EPGFILE}" ] && add_param "--epgfile=${EPGFILE}" + + if [ ! -d "${CACHEDIR:-/var/cache/vdr}" ]; then + mkdir -p "${CACHEDIR:-/var/cache/vdr}" + chown vdr:vdr "${CACHEDIR:-/var/cache/vdr}" + einfo "Created directory ${CACHEDIR:-/var/cache/vdr}" + fi add_param "--cachedir=${CACHEDIR:-/var/cache/vdr}" + add_param "--log=${LOG:-1}" [ -z "${VIDEO}" ] && VIDEO="/var/vdr/video" if [ ! -d "${VIDEO}" ]; then -- cgit v1.2.3-65-gdbad