]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
script to start vdr with softdevice
authorArne Fitzenreiter <arne_f@ipfire.org>
Thu, 17 Apr 2008 17:19:33 +0000 (19:19 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Thu, 17 Apr 2008 17:19:33 +0000 (19:19 +0200)
changes on vdr and w_scan scripts

config/rootfiles/packages/vdr-softdevice
config/vdr/bin/runvdr
config/vdr/bin/runvdr-soft [new file with mode: 0755]
config/vdr/etc/plugins/streamdevhosts.conf
lfs/w_scan
src/initscripts/init.d/vdr
src/patches/w_scan-ipfire.patch

index e33e0d0370f00910a291293a170ff41f78d4657a..3b6270da306bc34552789f043f5d596b8b0960fa 100644 (file)
@@ -1,3 +1,4 @@
+opt/vdr/bin/runvdr-soft
 opt/vdr/PLUGINS/lib/libsoftdevice-fb.so.1.6.0
 opt/vdr/PLUGINS/lib/libsoftdevice-shm.so.1.6.0
 opt/vdr/PLUGINS/lib/libvdr-softdevice.so.1.6.0
index 114c914666b5f24326ff6e18d0e64c952e25576b..7f8059dac9a0d6af74764f536cb79e70d8bd5ff7 100755 (executable)
@@ -9,11 +9,18 @@
 # actual 'vdr' program.
 #
 
+PLUGOPTS="-Pstreamdev-server"
+
 VDRPRG="./bin/vdr"
-VDRCMD="$VDRPRG -w 60 -c /opt/vdr/etc -Pstreamdev-server $*"
+VDRCMD="$VDRPRG -w 60 -c /opt/vdr/etc $PLUGOPTS $*"
 
 KILL="killall -q -TERM"
 
+if [ "$(ps -A | grep " vdr")" != "" ]; then
+   echo vdr is already running!
+   exit 1
+fi
+
 mkdir -p /var/video
 cd /opt/vdr
 while (true) do
diff --git a/config/vdr/bin/runvdr-soft b/config/vdr/bin/runvdr-soft
new file mode 100755 (executable)
index 0000000..8459df8
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+clear
+runvdr -Psoftdevice > /dev/null 2>&1
index 86c12904da5e09dd4c9fb8afcaaec6563fda0654..2bbd16b1c7cfec28c93598b214cdb27f06bbd3ea 100644 (file)
@@ -1,2 +1,3 @@
+127.0.0.1
 10.0.0.0/8
 192.168.0.0/16
index 508562e9a08b9d806e09eef37f5a8479b90c7303..7320c18a267ce47b5968c1db370f3ebfc09f7628 100644 (file)
@@ -81,6 +81,6 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        cd $(DIR_APP) && patch < $(DIR_SRC)/src/patches/w_scan-ipfire.patch 
        cd $(DIR_APP) && make
        cd $(DIR_APP) && install -m 755 w_scan /opt/vdr/bin/
-       cd $(DIR_APP) && install -m 755 w_scan_start.sh /opt/vdr/bin/
+       cd $(DIR_APP) && install -m 755 w_scan_start.sh /opt/vdr/bin/w_scan_start
        @rm -rf $(DIR_APP)
        @$(POSTBUILD)
index bacb2707a2a626a6cafdb0752c26aba3d58fc823..eb170be2e8a95e7b10de15fdf96269e7e333276c 100644 (file)
 case "${1}" in
        start)
                boot_mesg "Starting Video Disk Recorder..."
-               cd /opt/vdr
+               if [ "$(ps -A | grep runvdr)" != "" ]; then
+                  boot_mesg "Error! Alrady run!"
+                  echo_failure
+                  exit 1;
+               fi
                loadproc screen -dmS vdr /opt/vdr/bin/runvdr
                ;;
                
index 96c87afab8f47568c1655d5d5e4613ff3dd93072..cab9a2ed886c0ddf19864bdcbcf3a8009e6d8dfc 100644 (file)
@@ -1,5 +1,14 @@
---- w_scan_start.sh.org        2008-01-05 19:58:44.000000000 +0100
-+++ w_scan_start.sh    2008-04-12 18:18:19.000000000 +0200
+--- w_scan_start.sh    2008-01-05 19:58:44.000000000 +0100
++++ w_scan_start.sh    2008-04-17 12:38:04.000000000 +0200
+@@ -10,7 +10,7 @@
+ #######################################################
+ umask 022
+-export PATH="$(pwd):/bin:/usr/bin:/sbin:/usr/sbin"
++export PATH="$(pwd):/bin:/usr/bin:/sbin:/usr/sbin:/opt/vdr/bin"
+ DATE="$(date +%Y)$(date +%m)$(date +%d)" # $DATE == "YYYYMMDD", i.e. 20060710
+ W_SCAN=$(which w_scan 2>/dev/null)
+ UDEVSTART=$(which udevstart)
 @@ -224,7 +224,7 @@
                echo "Checking for ct-vdr style startscript.."
                if [ -e /etc/init.d/vdr ]; then                 # c't-vdr