]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
Check added to prevent the vdr start if no DVB card is present
authorArne Fitzenreiter <arne_f@ipfire.org>
Sun, 4 May 2008 13:15:09 +0000 (15:15 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Sun, 4 May 2008 13:15:09 +0000 (15:15 +0200)
config/vdr/bin/runvdr
src/initscripts/init.d/vdr

index b67728ab854c51a16649c54716f8e08a3955190b..ba2d35ecd941c43362912777d3023773ff3a92da 100755 (executable)
@@ -33,8 +33,18 @@ while (true) do
 #     rmmod stv0299
 #     rmmod dvb_core
 #     modprobe dvb_ttpci
+#     sleep 5
+#
+# Check if DVB device is present / remove this check if you
+# would use vdr as streaming client only
+#
+      if [ ! -e /dev/dvb/adapter0/frontend0 ]; then
+         echo No DVB tuner found!
+         exit 1
+      fi
+#
+#     Run VDR    
 #
-      sleep 1
       eval "$VDRCMD"
       if test $? -eq 0 -o $? -eq 2; then exit; fi
       $KILL $VDRPRG
index eb170be2e8a95e7b10de15fdf96269e7e333276c..39067d8db9fb34cb20e470e01a4306c7bee4fbea 100644 (file)
@@ -23,6 +23,18 @@ case "${1}" in
                   echo_failure
                   exit 1;
                fi
+               if [ ! -e /dev/dvb/adapter0/frontend0 ]; then
+                  boot_mesg "Error! No DVB tuner found."
+                  echo_failure
+                  exit 1;
+               fi
+               
+               if [ "$(ps -A | grep runvdr)" != "" ]; then
+                  boot_mesg "Error! Alrady run!"
+                  echo_failure
+                  exit 1;
+               fi
+               
                loadproc screen -dmS vdr /opt/vdr/bin/runvdr
                ;;