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 a97762c..78478bd 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 642272c..f5fa9c6 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 f9c2000..fbdab43 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