From 50d99eaea6ecef626ada814752b659f2aa2667ba Mon Sep 17 00:00:00 2001 From: Daniel Pielmeier Date: Thu, 22 Apr 2010 17:11:25 +0000 Subject: Let the init script create all needed directories under /var in case they are missing. Thanks to Helmut Auer in bug #316625. (Portage version: 2.1.8.3/cvs/Linux i686) --- www-misc/vdradmin-am/ChangeLog | 7 ++++++- www-misc/vdradmin-am/files/vdradmin-3.6.6.init | 14 +++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) (limited to 'www-misc/vdradmin-am') diff --git a/www-misc/vdradmin-am/ChangeLog b/www-misc/vdradmin-am/ChangeLog index 1bdddd3f5a32..dbdce079041f 100644 --- a/www-misc/vdradmin-am/ChangeLog +++ b/www-misc/vdradmin-am/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for www-misc/vdradmin-am # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/www-misc/vdradmin-am/ChangeLog,v 1.8 2010/04/11 17:22:39 billie Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-misc/vdradmin-am/ChangeLog,v 1.9 2010/04/22 17:11:25 billie Exp $ + + 22 Apr 2010; Daniel Pielmeier + files/vdradmin-3.6.6.init: + Let the init script create all needed directories under /var in case they + are missing. Thanks to Helmut Auer in bug #316625. *vdradmin-am-3.6.7 (11 Apr 2010) diff --git a/www-misc/vdradmin-am/files/vdradmin-3.6.6.init b/www-misc/vdradmin-am/files/vdradmin-3.6.6.init index 2d689c803ca9..8082613f6bdb 100644 --- a/www-misc/vdradmin-am/files/vdradmin-3.6.6.init +++ b/www-misc/vdradmin-am/files/vdradmin-3.6.6.init @@ -1,7 +1,7 @@ #!/sbin/runscript # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later -# $Header: /var/cvsroot/gentoo-x86/www-misc/vdradmin-am/files/vdradmin-3.6.6.init,v 1.1 2010/03/16 17:18:47 billie Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-misc/vdradmin-am/files/vdradmin-3.6.6.init,v 1.2 2010/04/22 17:11:25 billie Exp $ depend() { use vdr @@ -29,11 +29,15 @@ start() { sed -i -e "/LOGGING/s-LOGGING.*-LOGGING = 0-" /etc/vdradmin/vdradmind.conf fi - # Guarantee that vdradmin can access its dirs - chown -R "${VDRADMIN_USER}:vdradmin" /var/cache/vdradmin - chown -R "${VDRADMIN_USER}:vdradmin" /var/log/vdradmin - chown -R "${VDRADMIN_USER}:vdradmin" /var/run/vdradmin + # Prepare directories + local folder chown -R "${VDRADMIN_USER}:vdradmin" /etc/vdradmin + for folder in cache log run; do + if [ ! -d /var/${folder}/vdradmin ]; then + mkdir /var/${folder}/vdradmin + fi + chown -R "${VDRADMIN_USER}:vdradmin" /var/${folder}/vdradmin + done if [ -x /etc/init.d/root ]; then # running on baselayout-2/openrc -- cgit v1.2.3-65-gdbad