From: Zhigang Wang <wzgllc@gmail.com>
To: linuxppc-dev@lists.ozlabs.org
Subject: udev failed to automount USB memory stick on mpc8313
Date: Wed, 7 Apr 2010 17:33:57 -0500 [thread overview]
Message-ID: <u2vb97b35b01004071533oe3916294t5515da6bd31d7346@mail.gmail.com> (raw)
I am using the latest LTIB BSP (2.6.23) for mpc8313 and want to use
udev to automatically mount and umount USB flash storage.
But it appears udev never executes the rule and the script file even
though it is called when a stick is attached. I can manually mount the
USB stick with no problem.
Here is the rule file and the script.
File: 10-local.rules
ACTION=="add", KERNEL=="sd[a-z][0-9]", SUBSYSTEM=="block",
RUN+="/root/usbmount.sh"
File: usbmount.sh
#!/bin/sh
if [ $ACTION == "add" ]
then
mount -t vfat /dev/sda1 /root/files
elif [ $ACTION == "remove" ]
then
umount -l /root/files
fi
Can someone tell me how to make it work?
Thanks.
reply other threads:[~2010-04-07 22:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=u2vb97b35b01004071533oe3916294t5515da6bd31d7346@mail.gmail.com \
--to=wzgllc@gmail.com \
--cc=linuxppc-dev@lists.ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).