Code: Select all
KERNEL=="sd*", SUBSYSTEMS=="scsi", DRIVERS=="sd", SYMLINK+="stick", RUN+="/usr/local/bin/stick_drive $kernel'"
SUBSYSTEMS=="usb", ATTRS{removable}=="removable", RUN+="/usr/local/bin/flash_drive $kernel'"
udev man page wrote: This can only be used for very short-running foreground tasks.
Running an event process for a long period of time may block all
further events for this or a dependent device.
Starting daemons or other long-running processes is not appropriate
for udev; the forked processes, detached or not, will be
unconditionally killed after the event handling has finished.
Code: Select all
pi@raspberrypi:~ $ /etc/udev/rules.d/71-garmingps
bash: /etc/udev/rules.d/71-garmingps: No such file or directory
pi@raspberrypi:~ $ /etc/udev/rules.d/71-garmingps.rules
bash: /etc/udev/rules.d/71-garmingps.rules: No such file or directory
pi@raspberrypi:~ $
Code: Select all
Bus 001 Device 004: ID 091e:2459 Garmin International GPSmap 62/78 seriesCode: Select all
sudo nano /etc/udev/rules.d/71-garmingps.rulesThat is news for me. I am constantly doing 4 - 6 hour update runs without anyone trying to interrupt the action. Has it changed since Lucid?DougieLawson wrote:It depends what you do with the RUN+= clause. That's where your problems will appear. Those things get killed very quickly after the USB stick gets inserted.
Code: Select all
ACTION=="add", \
RUN+="/usr/local/bin/blink", \
RUN+="/bin/mkdir -p /tmp/usb", \
RUN+="/bin/chmod a+rwx /tmp/usb", \
RUN+="/bin/mount -o $env{mount_options} /dev/%k /tmp/usb", \
RUN+="/usr/local/bin/processusb" \
RUN+="/usr/local/bin/light"