diff options
author | Daniel Pielmeier <billie@gentoo.org> | 2010-11-07 21:43:12 +0000 |
---|---|---|
committer | Daniel Pielmeier <billie@gentoo.org> | 2010-11-07 21:43:12 +0000 |
commit | bc0a3b160b7e84febfa48e0df56a3901bf67fb9b (patch) | |
tree | 493463b50424455d9db8a80ef3b533ca7f2028d9 /www-misc | |
parent | Version bump, remove old (diff) | |
download | gentoo-2-bc0a3b160b7e84febfa48e0df56a3901bf67fb9b.tar.gz gentoo-2-bc0a3b160b7e84febfa48e0df56a3901bf67fb9b.tar.bz2 gentoo-2-bc0a3b160b7e84febfa48e0df56a3901bf67fb9b.zip |
Fix configuration file permissions.
(Portage version: 2.1.8.3/cvs/Linux i686)
Diffstat (limited to 'www-misc')
-rw-r--r-- | www-misc/vdradmin-am/ChangeLog | 6 | ||||
-rw-r--r-- | www-misc/vdradmin-am/files/vdradmin-3.6.7.init | 9 | ||||
-rw-r--r-- | www-misc/vdradmin-am/vdradmin-am-3.6.7-r1.ebuild | 21 |
3 files changed, 22 insertions, 14 deletions
diff --git a/www-misc/vdradmin-am/ChangeLog b/www-misc/vdradmin-am/ChangeLog index cd098d3bbae5..a3a8b7c7a239 100644 --- a/www-misc/vdradmin-am/ChangeLog +++ b/www-misc/vdradmin-am/ChangeLog @@ -1,6 +1,10 @@ # 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.16 2010/10/26 21:54:14 billie Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-misc/vdradmin-am/ChangeLog,v 1.17 2010/11/07 21:43:12 billie Exp $ + + 07 Nov 2010; Daniel Pielmeier <billie@gentoo.org> + vdradmin-am-3.6.7-r1.ebuild, files/vdradmin-3.6.7.init: + Fix configuration file permissions. 26 Oct 2010; Daniel Pielmeier <billie@gentoo.org> vdradmin-am-3.6.7.ebuild: diff --git a/www-misc/vdradmin-am/files/vdradmin-3.6.7.init b/www-misc/vdradmin-am/files/vdradmin-3.6.7.init index b2ce999eb687..038255675017 100644 --- a/www-misc/vdradmin-am/files/vdradmin-3.6.7.init +++ b/www-misc/vdradmin-am/files/vdradmin-3.6.7.init @@ -1,7 +1,7 @@ #!/sbin/runscript # Copyright 1999-2010 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.7.init,v 1.1 2010/10/26 21:52:31 billie Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-misc/vdradmin-am/files/vdradmin-3.6.7.init,v 1.2 2010/11/07 21:43:12 billie Exp $ depend() { use vdr @@ -16,8 +16,13 @@ start() { # Prepare directories for dir in cache log run; do - [ ! -d /var/${dir}/vdradmin ] && checkpath -d -m 0755 -o ${VDRADMIN_USER}:vdradmin "/var/${dir}/vdradmin" + checkpath -q -d -m 0755 -o ${VDRADMIN_USER}:vdradmin "/var/${dir}/vdradmin" done + checkpath -q -d -m 0755 -o ${VDRADMIN_USER}:vdradmin "/etc/vdradmin" \ + "/etc/vdradmin/certs" + checkpath -q -f -m 0644 -o ${VDRADMIN_USER}:vdradmin "/etc/vdradmin/vdradmind.conf" \ + "/etc/vdradmin/certs/server-cert.pem" \ + "/etc/vdradmin/certs/server-key.pem" if [ "${SSL}" = "yes" ]; then vdradmin_opts="${vdradmin_opts} --ssl"; fi if [ "${IPV6}" = "yes" ]; then vdradmin_opts="${vdradmin_opts} --ipv6"; fi diff --git a/www-misc/vdradmin-am/vdradmin-am-3.6.7-r1.ebuild b/www-misc/vdradmin-am/vdradmin-am-3.6.7-r1.ebuild index e2a1cab4456a..0815c2dbf18f 100644 --- a/www-misc/vdradmin-am/vdradmin-am-3.6.7-r1.ebuild +++ b/www-misc/vdradmin-am/vdradmin-am-3.6.7-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/www-misc/vdradmin-am/vdradmin-am-3.6.7-r1.ebuild,v 1.1 2010/10/26 21:52:31 billie Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-misc/vdradmin-am/vdradmin-am-3.6.7-r1.ebuild,v 1.2 2010/11/07 21:43:12 billie Exp $ EAPI=2 @@ -102,8 +102,6 @@ pkg_preinst() { elog "Creating a new config-file." echo - install -m 0644 -o ${VDRADMIN_USER} -g ${VDRADMIN_GROUP} /dev/null "${D}"${ETC_DIR}/vdradmind.conf || die - cat <<-EOF > "${D}"${ETC_DIR}/vdradmind.conf VDRCONFDIR = "${ROOT%/}"/etc/vdr VIDEODIR = "${ROOT%/}"/var/vdr/video @@ -126,6 +124,9 @@ pkg_preinst() { elog "do not match your installation or change them in the Setup-Menu" elog "of the Web-Interface." fi + + chmod 0644 "${D}"${ETC_DIR}/vdradmind.conf || die + chown ${VDRADMIN_USER}:${VDRADMIN_GROUP} "${D}"${ETC_DIR}/vdradmind.conf || die } pkg_postinst() { @@ -140,13 +141,10 @@ pkg_postinst() { elog "To use ssl connection to your vdr" elog "you need to enable it in ${ROOT%/}/etc/conf.d/vdradmin" - if [[ ! -f "${ROOT}"${CERTS_DIR}/server-cert.pem || \ - ! -f "${ROOT}"${CERTS_DIR}/server-key.pem ]]; then - create_ssl_cert - local base=$(get_base 1) - install -D -m 0400 -o ${VDRADMIN_USER} -g ${VDRADMIN_GROUP} "${base}".key "${ROOT}"${CERTS_DIR}/server-key.pem || die - install -D -m 0444 -o ${VDRADMIN_USER} -g ${VDRADMIN_GROUP} "${base}".crt "${ROOT}"${CERTS_DIR}/server-cert.pem || die - fi + create_ssl_cert + local base=$(get_base 1) + install -D -m 0400 -o ${VDRADMIN_USER} -g ${VDRADMIN_GROUP} "${base}".key "${ROOT}"${CERTS_DIR}/server-key.pem || die + install -D -m 0444 -o ${VDRADMIN_USER} -g ${VDRADMIN_GROUP} "${base}".crt "${ROOT}"${CERTS_DIR}/server-cert.pem || die fi elog @@ -159,7 +157,8 @@ pkg_postinst() { pkg_postrm() { rm -f "${ROOT}"${CERTS_DIR}/server-{cert,key}.pem - rmdir --ignore-fail-on-non-empty "${ROOT}"${CERTS_DIR} + rmdir --ignore-fail-on-non-empty "${ROOT}"${CERTS_DIR} \ + "${ROOT}"${ETC_DIR} } pkg_config() { |