<HTML>
<HEAD>
<META content="text/html; charset=iso-8859-2" http-equiv=Content-Type>
<META content="OPENWEBMAIL" name=GENERATOR>
</HEAD>
<BODY bgColor=#ffffff>
<font face="Arial, Helvetica"><font face="Arial, Helvetica">> >>>> SUBSYSTEM=="video4linux", ATTR{name}=="UVC Camera (046d:080f)",
<br />
> >>>> NAME="logitech", GROUP="video", MODE="0660", GOTO="fswebcam_start"
<br />
> >>>>
<br />
> >>>> GOTO="fswebcam_end"
<br />
> >>>>
<br />
> >>>> LABEL="fswebcam_start"
<br />
> >>>>
<br />
> >>>> ACTION=="add", RUN+="fswebcam -c /root/fswebcam.conf
<br />
> >>>> --pid=/var/run/fspid"
<br />
> >>>>
<br />
> >>>> ACTION=="remove" RUN+="/root/script.sh"
<br />
> >>>>
<br />
> >>>> GOTO="fswebcam_end"
<br />
> >>>>
<br />
<br />script.sh (+x chmod)
<br />
<br />#!/bin/sh
<br />
<br /></font><font size="2">/usr/bin/pkill -f "/usr/bin/fswebcam -c
/root/fswebcam.conf"</font>
<br /><font face="Arial, Helvetica">
<br />
<br />If I set </font><font size="2">/usr/bin/pkill -f "/usr/bin/fswebcam -c >
/root/fswebcam.conf"</font> from comand line process is killed
<br />
<br /><font face="Arial, Helvetica">action add is ok, but remove -> nothing happen, so I think udev doesn`t make script on remove (plug off) action
<br /></font>
</font>
<br />
<br /><font size="2"><b>On Wed, 1 Feb 2012 15:39:59 +0100, Jordi Soucheiron wrote</b>
<br />> Send
the whole rules file please (the sintax is a bit tricky).
<br />> Have you
rebooted the devide or reloaded the udev rules?
<br />>
<br clear="all" /><b>Jordi
Soucheiron</b>
<br />>
Software Engineer
<br />> <a target="_blank" href="mailto:jsoucheiron@dexmatech.com" style="color: rgb(102, 153, 0);">jsoucheiron@dexmatech.com</a>
<br />>
<br />>
<b>DEXMA</b>
<br />> c/ Marie Curie, 8-14
<br />> ES-08042, Barcelona
<br />> t:
(+34) 93 181 01 96
<br />> <a target="_blank" href="http://www.dexmatech.com/">www.dexmatech.com</a>
<br />> Follow us on <a target="_blank" href="http://www.twitter.com/dexma">Twitter</a> and <a target="_blank" href="http://www.linkedin.com/company/247838">Linkedin</a>
<br />>
Síguenos en <a target="_blank" href="http://www.twitter.com/dexma_ES">Twitter</a> y <a target="_blank" href="http://www.linkedin.com/company/dexma-tech">Linkedin</a>
<br />>
<br />> 2012/2/1 maciek <span dir="ltr"><<a href="mailto:maciek2@protetyka.lodz.pl">maciek2@protetyka.lodz.pl</a>></span>
<br />>
<blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">
I`ve set action remove /usr/bin/pkill -f "/usr/bin/fswebcam -c
<br />>
/root/fswebcam.conf"
<br />>
<br />>
but on action remove nothing happen....
<br />>
<br />>
> >>>> Hello
<br />>
> >>>>
<br />>
> >>>> I`d like to set my usb webcam as hotplug device. When I
plugin I`d like to
<br />>
> >>>> start fswebcam deamon and unplug - stop.
<br />>
> >>>>
<br />>
> >>>> I set it like this:
<br />>
> >>>>
<br />>
> >>>> SUBSYSTEM=="video4linux", ATTR{name}=="UVC
Camera (046d:080f)",
<br />>
> >>>> NAME="logitech", GROUP="video",
MODE="0660", GOTO="fswebcam_start"
<br />>
> >>>>
<br />>
> >>>> GOTO="fswebcam_end"
<br />>
> >>>>
<br />>
> >>>> LABEL="fswebcam_start"
<br />>
> >>>>
<br />>
> >>>> ACTION=="add", RUN+="fswebcam -c
/root/fswebcam.conf
<br />>
> >>>> --pid=/var/run/fspid"
<br />>
> >>>>
<br />>
> >>>> ACTION=="remove"
RUN+="???????????"
<br />>
> >>>>
<br />>
> >>>> GOTO="fswebcam_end"
<br />>
> >>>>
<br />>
> >>>>
<br />>
> >>>> Questions:
<br />>
> >>>>
<br />>
> >>>> 1. Are those script ok? (action add & remove)
<br />>
> >>>> 2. How to kill process fspid
(ACTION=="remove")?
<br />>
> >>>>
<br />>
> >>>>
<br />>
> >>>>
<br />>
> >>>>
<br />>
> >>>>
<br />>
> >>>>
<br />>
> >>>>
<br />>
> >>>>
<br />>
> >>>>
<br />>
> >>>>
<br />>
> >>>>
<br />>
> >>>>
<br />>
> >>>>
<br />>
> >>>>
<br />>
> >>>>
<br />>
> >>>>
<br />>
> >>>> v o i p t e l e . n e t , dzwon najtaniej jak to
mozliwe
<br />>
> >>>> e r a u r . c o m , rozwiazania internetowe dla firm i
klientow
<br />>
indywidualnych
<br />>
> >>>>
<br />>
> >>>> _______________________________________________
<br />>
> >>>> Voyage-linux mailing list
<br />>
> >>>> <a href="mailto:Voyage-linux@list.voyage.hk">Voyage-linux@list.voyage.hk</a>
<br />>
> >>>> <a target="_blank" href="http://list.voyage.hk/mailman/listinfo/voyage-linux">http://list.voyage.hk/mailman/listinfo/voyage-linux</a>
<br />>
> >>
<br />>
> >> _______________________________________________
<br />>
> >> Voyage-linux mailing list
<br />>
> >> <a href="mailto:Voyage-linux@list.voyage.hk">Voyage-linux@list.voyage.hk</a>
<br />>
> >> <a target="_blank" href="http://list.voyage.hk/mailman/listinfo/voyage-linux">http://list.voyage.hk/mailman/listinfo/voyage-linux</a>
<br />>
> >
<br />>
<br />>
_______________________________________________
<br />>
Voyage-linux mailing list
<br />>
<a href="mailto:Voyage-linux@list.voyage.hk">Voyage-linux@list.voyage.hk</a>
<br />>
<a target="_blank" href="http://list.voyage.hk/mailman/listinfo/voyage-linux">http://list.voyage.hk/mailman/listinfo/voyage-linux</a>
<br />>
</blockquote>
<br />
<br />
<br />
</font>
<br><br></BODY>
</HTML>