Ken Moffat wrote:
# A. olympus camera control
# 1. - symlink to the partition
# originally from udevinfo -a -p /sys/class/usb_device/usbdev2.2/
if ! [ -f /etc/udev/rules.d/23-olympus.rules ]; then
echo "SUBSYSTEMS==\"usb\", ATTRS{manufacturer}==\"OLYMPUS\", KERNEL==\"sd?1\", SYMLINK=\"olympus\",
MODE=\"0660\", OPTIONS=\"last_rule\"" >/etc/udev/rules.d/23-olympus.rules
fi
Just a style suggestion Ken. You don't need all those backslashes.
echo 'SUBSYSTEMS=="usb", ATTRS{manufacturer}=="OLYMPUS", KERNEL=="sd?1", \
SYMLINK="olympus", MODE="0660", OPTIONS="last_rule"' \
> /etc/udev/rules.d/23-olympus.rules
should work for you. Inside single quotes, there are no special characters.
Note that the first backslash is is inside single quotes and splits the line
that is created. The second backslash is for bash.
For others that may read this, the udev line does not actually mount the device.
The instruction above just adds a symlink (/dev/olympus -> /dev/sd?1) and
changes the permissions of /dev/sd?1 to 660.
I would thing that a GROUP= would be necessary. As it is, only root has access,
but that may be what you want.
Also, items like OPTIONS and SYMLINK are normally written as +=, although it
will not make any difference here.
-- Bruce
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page
Do not top post on this list.
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
http://en.wikipedia.org/wiki/Posting_style