vdr/vdr/debian vdr-daemon.postinst vdr-daemon.prerm vdr-kbd.postinst vdr-kbd.prerm vdr-lirc.postinst vdr-lirc.prerm vdr-rcu.postinst vdr-rcu.prerm changelog plugin-loader.sh rules runvdr vdr.default vdr.init vdr-message

Thomas Schmidt pkg-vdr-dvb-changes@lists.alioth.debian.org
Sun, 09 May 2004 14:09:23 +0000


Update of /cvsroot/pkg-vdr-dvb/vdr/vdr/debian
In directory haydn:/tmp/cvs-serv23941/vdr/vdr/debian

Modified Files:
	changelog plugin-loader.sh rules runvdr vdr.default vdr.init 
Added Files:
	vdr-daemon.postinst vdr-daemon.prerm vdr-kbd.postinst 
	vdr-kbd.prerm vdr-lirc.postinst vdr-lirc.prerm 
	vdr-rcu.postinst vdr-rcu.prerm 
Removed Files:
	vdr-message 
Log Message:
use update-alternatives, to seclect binary which will be run when /usr/bin/vdr is called

--- NEW FILE: vdr-rcu.postinst ---
#! /bin/sh -e

case "$1" in
	abort-upgrade)
		update-alternatives --install /usr/bin/vdr vdr /usr/bin/vdr-rcu 105
	;;
	configure)
		update-alternatives --install /usr/bin/vdr vdr /usr/bin/vdr-rcu 105
	;;
esac

exit 0

--- NEW FILE: vdr-kbd.prerm ---
#! /bin/sh -e

case "$1" in
	remove)
		update-alternatives --remove vdr /usr/bin/vdr-kbd
	;;
esac

exit 0

Index: changelog
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdr/debian/changelog,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- changelog	8 May 2004 22:44:27 -0000	1.13
+++ changelog	9 May 2004 14:09:20 -0000	1.14
@@ -23,6 +23,7 @@
       and set this to /var/lib/vdr (Closes: Bug#233647)
     - Applied patch from Emmanuel le Chevoir and added fr.po
       (Closes: Bug#238713)
+    - Selection of vdr-binary now handled by update-alternatives
 
   * Tobias Grimm <vdr@e-tobi.net>
     - added automatic loading of plugins in init script from c't vdr

--- NEW FILE: vdr-lirc.postinst ---
#! /bin/sh -e

case "$1" in
	abort-upgrade)
		update-alternatives --install /usr/bin/vdr vdr /usr/bin/vdr-lirc 120
	;;
	configure)
		update-alternatives --install /usr/bin/vdr vdr /usr/bin/vdr-lirc 120
	;;
esac

exit 0

--- vdr-message DELETED ---

--- NEW FILE: vdr-rcu.prerm ---
#! /bin/sh -e

case "$1" in
	remove)
		update-alternatives --remove vdr /usr/bin/vdr-rcu
	;;
esac

exit 0

Index: runvdr
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdr/debian/runvdr,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- runvdr	6 May 2004 14:22:45 -0000	1.2
+++ runvdr	9 May 2004 14:09:20 -0000	1.3
@@ -2,8 +2,6 @@
 #
 #
 
-VDR_BIN=/usr/bin/$1
-shift
 OPTIONS=$*
 
 KVERS=`uname -r | grep -e '2.6'`
@@ -16,11 +14,10 @@
 MODULES="$MODULES dvb-core"
 
 while (true) do
-      LD_ASSUME_KERNEL=2.4 $VDR_BIN $OPTIONS >/dev/null 2>&1
+      LD_ASSUME_KERNEL=2.4 /usr/bin/vdr $OPTIONS >/dev/null 2>&1
       if test $? -eq 0; then exit; fi
       logger "restarting VDR"
-      $KILL $VDRPRG
-      /usr/bin/killall -q -TERM $VDR_BIN
+      /usr/bin/killall -q -TERM /usr/bin/vdr
       sleep 10
       
 	 	for MODUL in $MODULES; do

--- NEW FILE: vdr-kbd.postinst ---
#! /bin/sh -e

case "$1" in
	abort-upgrade)
		update-alternatives --install /usr/bin/vdr vdr /usr/bin/vdr-kbd 110
	;;
	configure)
		update-alternatives --install /usr/bin/vdr vdr /usr/bin/vdr-kbd 110
	;;
esac

exit 0

--- NEW FILE: vdr-daemon.prerm ---
#! /bin/sh -e

case "$1" in
	remove)
		update-alternatives --remove vdr /usr/bin/vdr-daemon
	;;
esac

exit 0

Index: plugin-loader.sh
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdr/debian/plugin-loader.sh,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- plugin-loader.sh	6 May 2004 21:06:56 -0000	1.1
+++ plugin-loader.sh	9 May 2004 14:09:20 -0000	1.2
@@ -2,7 +2,7 @@
 # This file is called by /etc/init.d/vdr
 #
 
-VERSION=`/usr/bin/$DAEMON -V 2>/dev/null | grep '^vdr[- ]' | sed -e 's/.*(\(.*\)).*/\1/'`
+VERSION=`/usr/bin/vdr -V 2>/dev/null | grep '^vdr[- ]' | sed -e 's/.*(\(.*\)).*/\1/'`
 
 getplugins ()
 {

Index: vdr.init
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdr/debian/vdr.init,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- vdr.init	7 May 2004 19:27:17 -0000	1.16
+++ vdr.init	9 May 2004 14:09:20 -0000	1.17
@@ -26,15 +26,13 @@
     mergecommands "commands"
     mergecommands "reccmds"
     start-stop-daemon --start --quiet \
-	--exec /usr/sbin/runvdr -- $DAEMON \
-	-v $VIDEO_DIR -c $CFG_DIR $OPTIONS \
-	$PLUGINS &
+	--exec /usr/sbin/runvdr -- -v $VIDEO_DIR -c $CFG_DIR $OPTIONS $PLUGINS &
 } 
 
 stopvdr()
 {
     killall -q -TERM runvdr
-    killall -q -TERM $DAEMON
+    killall -q -TERM vdr
 }
 
 case "$1" in

--- NEW FILE: vdr-daemon.postinst ---
#! /bin/sh -e

case "$1" in
	abort-upgrade)
		update-alternatives --install /usr/bin/vdr vdr /usr/bin/vdr-daemon 100
	;;
	configure)
		update-alternatives --install /usr/bin/vdr vdr /usr/bin/vdr-daemon 100
	;;
esac

exit 0

Index: rules
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdr/debian/rules,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- rules	8 May 2004 22:00:15 -0000	1.25
+++ rules	9 May 2004 14:09:20 -0000	1.26
@@ -86,7 +86,6 @@
 	dh_installdirs
 
 	# Add here commands to install the package into debian/vdr.
-	install -m 755 $(CURDIR)/debian/vdr-message $(CURDIR)/debian/vdr/usr/bin/vdr
 	dh_installman $(CURDIR)/vdr.1 -p vdr
 
 	# lintian override

Index: vdr.default
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdr/debian/vdr.default,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- vdr.default	7 May 2004 19:27:17 -0000	1.4
+++ vdr.default	9 May 2004 14:09:20 -0000	1.5
@@ -6,10 +6,6 @@
 # Change to 1 to enable vdr's init-script
 ENABLED=0
 
-# Which vdr-binary to start 
-# (vdr-kbd, vdr-lirc, vdr-daemon or vdr-rcu)
-DAEMON="vdr-lirc"
-
 # Video-Directory
 VIDEO_DIR="/var/lib/video"
 

--- NEW FILE: vdr-lirc.prerm ---
#! /bin/sh -e

case "$1" in
	remove)
		update-alternatives --remove vdr /usr/bin/vdr-lirc
	;;
esac

exit 0