]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
Fix motion installation error if user "video" already exist
authorArne Fitzenreiter <arne_f@ipfire.org>
Sat, 11 Jul 2009 18:21:18 +0000 (20:21 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Sat, 11 Jul 2009 18:21:18 +0000 (20:21 +0200)
Add device present check to initskript
Change webcam quality to default

config/motion/motion.conf
src/initscripts/init.d/motion
src/paks/motion/install.sh

index a97762cc57df0eecbdba05e65c91100c1d1036f7..78478bd26b971b80dd8df86a4def93b39ed54d82 100644 (file)
@@ -400,7 +400,7 @@ timelapse_filename %Y%m%d-timelapse
 webcam_port 2500
 
 # Quality of the jpeg images produced (default: 50)
-webcam_quality 75
+webcam_quality 50
 
 # Output frames at 1 fps when no motion is detected and increase to the
 # rate given by webcam_maxrate when motion is detected (default: off)
index 642272c1449119b9fdd25aa3ae2e339a62e7dad7..f5fa9c677bcfaac482f6de29368eb36b270b9e36 100644 (file)
@@ -6,6 +6,12 @@
 case "$1" in
        start)
                boot_mesg "Starting motion webcam server..."
+               if [ ! -e /dev/video0 ]; then
+                       boot_mesg "Error! No video input device found."
+                       echo_failure
+                       #No 3 min wait
+                       exit 0;
+               fi
                chown :video /dev/video*
                mkdir -p /var/motion/cam1
                chown -R video: /var/motion/cam1
index f9c2000ba45e4190937262087f4cee2aaab93b9b..fbdab43ac6db1401bc5121c7112075e2558aba32 100644 (file)
@@ -25,3 +25,5 @@
 extract_files
 restore_backup ${NAME}
 useradd -s /bin/false video
+#Ignore error if the user already exist
+exit 0