r379 - vdr/vdradmin/trunk/debian
Tobias Grimm
pkg-vdr-dvb-changes@lists.alioth.debian.org
Sun, 03 Apr 2005 12:58:41 +0000
Author: tiber-guest
Date: 2005-04-03 12:58:41 +0000 (Sun, 03 Apr 2005)
New Revision: 379
Modified:
vdr/vdradmin/trunk/debian/changelog
vdr/vdradmin/trunk/debian/postinst
vdr/vdradmin/trunk/debian/vdradmin.init
Log:
vdradmin: make config readable by group vdr, fixed bug in init script
Modified: vdr/vdradmin/trunk/debian/changelog
===================================================================
--- vdr/vdradmin/trunk/debian/changelog 2005-04-03 11:10:58 UTC (rev 378)
+++ vdr/vdradmin/trunk/debian/changelog 2005-04-03 12:58:41 UTC (rev 379)
@@ -10,8 +10,8 @@
to do uploads anymore
* Tobias Grimm <tg@e-tobi.net>
- Delete temporary grabbed images after use
- - Make vdradmind.at and /var/lib/vdradmin owned by group vdr
- to allow vdr plugins like Autotimeredit to make modifications
+ - Make /var/lib/vdradmin owned by group vdr to allow vdr plugins like
+ Autotimeredit to make modifications
-- Debian VDR Team <pkg-vdr-dvb-devel@lists.alioth.debian.org> Wed, 23 Feb 2005 23:54:46 +0100
Modified: vdr/vdradmin/trunk/debian/postinst
===================================================================
--- vdr/vdradmin/trunk/debian/postinst 2005-04-03 11:10:58 UTC (rev 378)
+++ vdr/vdradmin/trunk/debian/postinst 2005-04-03 12:58:41 UTC (rev 379)
@@ -44,10 +44,6 @@
echo "...done"
fi
-GROUP_RW=0600 # a=,g+rw
-GROUP_OWNER_RW=0660 # a=,og+rw
-GROUP_OWNER_RWX=0770 # a=,og+rwx
-
# ensure vdradmind.at (auto timers) exists
ATFILE=/var/lib/vdradmin/vdradmind.at
[ -e $ATFILE ] || touch $ATFILE
@@ -56,17 +52,21 @@
[ ! -d /var/lib/vdradmin ] || chown -R $USER:$GROUP /var/lib/vdradmin/
# change the permissions of the cfg-file to 0600
-[ ! -e /var/lib/vdradmin/vdradmind.conf ] || chmod $GROUP_RW /var/lib/vdradmin/vdradmind.conf
+[ ! -e /var/lib/vdradmin/vdradmind.conf ] || chmod 0600 /var/lib/vdradmin/vdradmind.conf
# change the owner and group of the logfile to vdradmin
[ ! -e /var/log/vdradmind.log ] || chown $USER:$GROUP /var/log/vdradmind.log
-# make auto timer file and config dir owned and writeable by group vdr,
-# so that vdr plugins (Autotimeredit plugin) can make modifications
+# make auto timer file "read/writeable" by group vdr and config file readable
+# by group "vdr",so that vdr plugins (Autotimeredit plugin) get access
if getent group | grep -q "^vdr:" ; then
- chgrp vdr $ATFILE /var/lib/vdradmin
- chmod $GROUP_OWNER_RW $ATFILE
- chmod $GROUP_OWNER_RWX /var/lib/vdradmin
+ if [ -d /var/lib/vdradmin ] ; then
+ chgrp -R vdr /var/lib/vdradmin
+ chmod a=,ug=rwx /var/lib/vdradmin
+ chmod a=,ug=rw $ATFILE
+ CFGFILE=/var/lib/vdradmin/vdradmind.conf
+ [ -e $CFGFILE ] && chmod a=,u=rw,g=r $CFGFILE
+ fi
fi
##DEBHELPER##
Modified: vdr/vdradmin/trunk/debian/vdradmin.init
===================================================================
--- vdr/vdradmin/trunk/debian/vdradmin.init 2005-04-03 11:10:58 UTC (rev 378)
+++ vdr/vdradmin/trunk/debian/vdradmin.init 2005-04-03 12:58:41 UTC (rev 379)
@@ -7,10 +7,10 @@
# Default Settings:
-# Username vdradmin should run on:
+# Username vdradmin should run as:
USER=vdradmin
-# Group under which vdradmin shoul run on:
+# Group under which vdradmin should run:
GROUP=vdradmin
@@ -49,8 +49,11 @@
# group and owner to $USER:$GROUP
create_logfile ()
{
- LOGFILE="/var/log/vdradmind.log"
- [ ! -e $LOGFILE ] && touch $LOGFILE && chown $USER:$GROUP $LOGFILE
+ LOGFILE="/var/log/vdradmind.log"
+ if [ ! -e $LOGFILE ] ; then
+ touch $LOGFILE
+ chown $USER:$GROUP $LOGFILE
+ fi
}
case "$1" in