From fa52201e116283139f4daaeb799827e955961b1e Mon Sep 17 00:00:00 2001 From: Arne Fitzenreiter Date: Sat, 11 Jul 2009 20:21:18 +0200 Subject: [PATCH] Fix motion installation error if user "video" already exist Add device present check to initskript Change webcam quality to default --- config/motion/motion.conf | 2 +- src/initscripts/init.d/motion | 6 ++++++ src/paks/motion/install.sh | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/config/motion/motion.conf b/config/motion/motion.conf index a97762cc57..78478bd26b 100644 --- a/config/motion/motion.conf +++ b/config/motion/motion.conf @@ -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) diff --git a/src/initscripts/init.d/motion b/src/initscripts/init.d/motion index 642272c144..f5fa9c677b 100644 --- a/src/initscripts/init.d/motion +++ b/src/initscripts/init.d/motion @@ -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 diff --git a/src/paks/motion/install.sh b/src/paks/motion/install.sh index f9c2000ba4..fbdab43ac6 100644 --- a/src/paks/motion/install.sh +++ b/src/paks/motion/install.sh @@ -25,3 +25,5 @@ extract_files restore_backup ${NAME} useradd -s /bin/false video +#Ignore error if the user already exist +exit 0 -- 2.39.2