0

I try to use Motion on a Raspberry pi zero. worked fine, but using webcontrol I wanted to stop the raspberry when I motion was ended. I added this line to my motion.conf :

on_event_end /usr/sbin/poweroff

I tought than on_event_end was triggered by exit from motion.

In fact, each time I start my Raspberry, Motion starts and the on_event_end immediatly triggers the poweroff. I don't have time to open a ssh session and try to edit the file.

I tried to add init=/bin/bash in the cmdline.txt, adding a monitor and a keyboard, but the Pi starts with all files en read only mode, so I can't correct my config file.

Is there a solution, and in the worst case, is it possible to restart the Raspberry in its initial state (without any user files)

Thanks a lot for any help

*** I found a solution : starting pizero with the standard cmmdline.txt and a keyboard and screen, I had time enough to rename the motion.conf file before Motion started. Motion doesn't start because there whre no motion.conf, so I had time enough to remove the erroneous line. Tricky, as my AZERTY keyboard was used as QWERTY

2
  • See this answer for a possible solution.
    – user68186
    Commented Apr 11, 2022 at 16:05
  • Welcome to Raspberry Pi Stack Exchange. This is a question answer site. Please don't put the answer inside the question. You can answer your own question by clicking on the Answer your own question button below. Once you answer your question, please accept your answer by clicking on the gray check mark 🗸 next to your answer and turn it green ✅. This will mark your problem as solved and help others find the correct answer.
    – user68186
    Commented Apr 11, 2022 at 20:34

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.