r4548 - vdr/vdr/trunk/debian
Tobias Grimm
tiber-guest at alioth.debian.org
Sun May 6 11:02:37 UTC 2007
Author: tiber-guest
Date: 2007-05-06 11:02:37 +0000 (Sun, 06 May 2007)
New Revision: 4548
Modified:
vdr/vdr/trunk/debian/README.Debian
vdr/vdr/trunk/debian/vdr-groups.sh
vdr/vdr/trunk/debian/vdr.install
vdr/vdr/trunk/debian/vdr.links
Log:
- moved groups file to /usr/share/vdr/groups.d
- Warning instead of error when groups file does not exist
Modified: vdr/vdr/trunk/debian/README.Debian
===================================================================
--- vdr/vdr/trunk/debian/README.Debian 2007-05-05 10:34:05 UTC (rev 4547)
+++ vdr/vdr/trunk/debian/README.Debian 2007-05-06 11:02:37 UTC (rev 4548)
@@ -237,13 +237,16 @@
A few plugins require that the user vdr is member in additional system groups
like audio or cdrom. To be a little bit more flexible, we have designed a
mechanism which can be used by plugins to specify additional group memberships.
-Plugins can add a file /etc/vdr/groups.d/<plugin-name>.groups and call
-/usr/lib/vdr/vdr-groups.sh in postinst, this will automatically check if vdr is
-member in all groups which are listed in the files unter /etc/vdr/groups.sh,
-if vdr is not member of one of these groups, it will be added to the specific
-groups. If the plugin is uninstalled, it should call /usr/lib/vdr/vdr-groups.sh
-again in postrm, as this script will remove vdr from unnecessary groups again.
+Plugins can add a file /usr/share/vdr/groups.d/<plugin-name>.groups and call
+/usr/lib/vdr/vdr-groups.sh in postinst and prerm. vdr-groups.sh will then take
+care of adding/removing vdr to/from the groups listed in the specified
+<plugin-name>.groups file. vdr will be removed from a group only, if no other
+plugin requires this group membership.
+If you manually add vdr to a group, you must add the group to
+/etc/vdr/vdr.groups. If you don't do so, vdr may be removed from this group when
+uninstalling a plugin.
+
-- Thomas Schmidt <tschmidt at debian.org>, Tue, 01 May 2007 14:12:15 +0200
Modified: vdr/vdr/trunk/debian/vdr-groups.sh
===================================================================
--- vdr/vdr/trunk/debian/vdr-groups.sh 2007-05-05 10:34:05 UTC (rev 4547)
+++ vdr/vdr/trunk/debian/vdr-groups.sh 2007-05-06 11:02:37 UTC (rev 4548)
@@ -8,7 +8,7 @@
# (c) 2007, Tobias Grimm <tg at e-tobi.net>
#
-DIR="/etc/vdr/groups.d"
+DIR="/usr/share/vdr/groups.d"
VDR_USER=vdr
ACTUAL_GROUPS=`groups $VDR_USER | cut -d' ' -f3-`
@@ -52,8 +52,6 @@
local groups=`read_groups "$groups_file"`
local needed_groups
local group
-
- rm "$groups_file"
needed_groups=`read_groups $DIR/*`
@@ -75,8 +73,8 @@
echo "Shell script to be used by vdr plugin packages to register/deregister"
echo "required vdr group memberships."
echo
- echo "/bin/sh /usr/share/vdr/vdr-groups.sh --add <GROUP-FILE>"
- echo "/bin/sh /usr/share/vdr/vdr-groups.sh --remove <GROUP-FILE>"
+ echo "/bin/sh /usr/lib/vdr/vdr-groups.sh --add <GROUP-FILE>"
+ echo "/bin/sh /usr/lib/vdr/vdr-groups.sh --remove <GROUP-FILE>"
echo
echo "The <GROUP-FILE> is the file in $DIR containing the list of groups"
echo "vdr should be added to or removed from."
@@ -88,13 +86,19 @@
# main()
#
-action="$1"
-groups_file="$DIR/$2"
-if [ -z $2 ] || [ ! -e $groups_file ]; then
+if [ $# -ne 2 ]; then
show_help
fi
+action="$1"
+groups_file="$DIR/$2.groups"
+
+if [ ! -e $groups_file ]; then
+ echo "WARNING: $groups_file does not exist. Can't adjust vdr group membership"
+ exit 0
+fi
+
case "$action" in
--add)
add_to_groups "$groups_file"
Modified: vdr/vdr/trunk/debian/vdr.install
===================================================================
--- vdr/vdr/trunk/debian/vdr.install 2007-05-05 10:34:05 UTC (rev 4547)
+++ vdr/vdr/trunk/debian/vdr.install 2007-05-06 11:02:37 UTC (rev 4548)
@@ -22,13 +22,12 @@
debian/commands-loader.sh usr/lib/vdr/
debian/vdr-groups.sh usr/lib/vdr/
-diseqc.conf etc/vdr/
-keymacros.conf etc/vdr/
-sources.conf etc/vdr/
-svdrphosts.conf etc/vdr/
+diseqc.conf etc/vdr/
+keymacros.conf etc/vdr/
+sources.conf etc/vdr/
+svdrphosts.conf etc/vdr/
+debian/vdr.groups etc/vdr/
-debian/vdr.groups etc/vdr/groups.d/
-
debian/vdr-recordingaction usr/lib/vdr/
debian/R90.custom etc/vdr/recording-hooks/
Modified: vdr/vdr/trunk/debian/vdr.links
===================================================================
--- vdr/vdr/trunk/debian/vdr.links 2007-05-05 10:34:05 UTC (rev 4547)
+++ vdr/vdr/trunk/debian/vdr.links 2007-05-06 11:02:37 UTC (rev 4548)
@@ -21,3 +21,5 @@
var/lib/vdr/remote.conf etc/vdr/remote.conf
var/lib/vdr/channels.conf etc/vdr/channels.conf
etc/default/vdr etc/vdr/vdr.default
+
+etc/vdr/vdr.groups usr/share/vdr/groups.d/vdr.groups
More information about the pkg-vdr-dvb-changes
mailing list