vdr/vdr/debian changelog commands-loader.sh order.commands.conf order.reccmds.conf
Tobias Grimm
pkg-vdr-dvb-changes@lists.alioth.debian.org
Thu, 22 Jul 2004 23:48:18 +0000
Update of /cvsroot/pkg-vdr-dvb/vdr/vdr/debian
In directory haydn:/tmp/cvs-serv13475/debian
Modified Files:
changelog commands-loader.sh order.commands.conf
order.reccmds.conf
Log Message:
modified commands loader to bahave like plugin loader
Index: changelog
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdr/debian/changelog,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- changelog 17 Jul 2004 21:56:53 -0000 1.36
+++ changelog 22 Jul 2004 23:48:16 -0000 1.37
@@ -11,6 +11,8 @@
- added patchlevel checking when loading plugins - it's enabled in
/etc/default by setting PLUGIN_CHECK_PATCHLEVEL="yes"
- added ElchiAio4d as inactive patch (see README.Debian)
+ - an entry in the (commands|reccmds).order.conf can now be disabled by
+ prepending a "-", just like this is done in the plugins.order.conf too
* Thomas Schmidt <thomas.schmidt@in.stud.tu-ilmenau.de>
- It is not possible anymore to start more than one instance of vdr
with the init-script
Index: order.reccmds.conf
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdr/debian/order.reccmds.conf,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- order.reccmds.conf 6 May 2004 21:03:30 -0000 1.1
+++ order.reccmds.conf 22 Jul 2004 23:48:16 -0000 1.2
@@ -1,8 +1,10 @@
#
-# if you like a fixed order in your recording commands menu
-# place the command base names (reccmds.<basename>.conf) here
+# If you like a fixed order in your recording commands menu, place the
+# command base names (reccmds.<basename>.conf) here.
#
+# If you want a certain command file not to be loaded automatically at
+# vdr-startup, then you can simply write "-basename" in this file.
firstcommand
secondcommand
-thirdcommand
+-thirdcommand
Index: order.commands.conf
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdr/debian/order.commands.conf,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- order.commands.conf 6 May 2004 21:03:30 -0000 1.1
+++ order.commands.conf 22 Jul 2004 23:48:16 -0000 1.2
@@ -1,8 +1,10 @@
#
-# if you like a fixed order in your commands menu
-# place the command base names (command.<basename>.conf) here
+# If you like a fixed order in your commands menu, place the command base names
+# (commands.<basename>.conf) here.
#
+# If you want a certain command file not to be loaded automatically at
+# vdr-startup, then you can simply write "-basename" in this file.
firstcommand
secondcommand
-thirdcommand
+-thirdcommand
Index: commands-loader.sh
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdr/debian/commands-loader.sh,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- commands-loader.sh 9 May 2004 14:24:07 -0000 1.2
+++ commands-loader.sh 22 Jul 2004 23:48:16 -0000 1.3
@@ -37,12 +37,17 @@
writewarning $cmdtype > "$cmdfile"
cmdsorder=( `cat /etc/vdr/command-hooks/order.$cmdtype.conf | sed "s/#.*$//"` )
- cmds=(`find $CMDHOOKSDIR -follow -name "$cmdtype.*.conf" || true`)
+ cmds=( `find $CMDHOOKSDIR -maxdepth 1 -name "$cmdtype.*.conf" -printf "%f \n" | sed "s/$cmdtype\.\(.\+\)\.conf/\1/g"` )
# first the ordered commands:
for cmd in ${cmdsorder[@]}; do
for (( line=0 ; line<${#cmds[@]} ; line++ )); do
- if echo "${cmds[$line]}" | grep "$cmd">/dev/null 2>&1 ; then
+ if [ "$cmd" == "-${cmds[$line]}" ]; then
+ unset cmds[$line]
+ cmds=( "${cmds[@]}" )
+ break
+ fi
+ if [ "$cmd" == "${cmds[$line]}" ]; then
ordered_cmds=( "${ordered_cmds[@]}" "${cmds[$line]}" )
unset cmds[$line]
cmds=( "${cmds[@]}" )
@@ -56,7 +61,7 @@
# concatenate all commands
for cmd in ${ordered_cmds[@]}; do
if [ "$cmd" != "" ]; then
- cat "$cmd" >> "$cmdfile"
+ cat "$CMDHOOKSDIR/$cmdtype.$cmd.conf" >> "$cmdfile"
echo "" >> "$cmdfile"
fi
done