OESF Portables Forum

Everything Else => Sharp Zaurus => Model Specific Forums => Distros, Development, and Model Specific Forums => Archived Forums => C1000/3x00 General discussions => Topic started by: BarrySamuels on November 07, 2005, 07:52:20 am

Title: Determine When A Cf Card Is Mounted?
Post by: BarrySamuels on November 07, 2005, 07:52:20 am
Is there a way to determine when a CompactFlash card is mounted? If I can do that I then want to run a script automatically.

Any help appreciated.
Title: Determine When A Cf Card Is Mounted?
Post by: Cagilaba on November 07, 2005, 08:57:40 am
I'm not sure what you want to do with the script, but if you simply want to find out whether a CF is mounted, you can do "df -h" and look for /dev/hda1 which will be mounted at /mnt/cf or /usr/mnt.rom/cf. SD is /dev/mmcda1 at /mnt/card.
Title: Determine When A Cf Card Is Mounted?
Post by: BarrySamuels on November 07, 2005, 09:07:55 am
Quote
I'm not sure what you want to do with the script, but if you simply want to find out whether a CF is mounted, you can do "df -h" and look for /dev/hda1 which will be mounted at /mnt/cf or /usr/mnt.rom/cf. SD is /dev/mmcda1 at /mnt/card.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=102702\"][{POST_SNAPBACK}][/a][/div]

I want to avoid the need to keep checking. I was hoping to be able to run a script automatically whenever a CF card is mounted.

I want the script simply to run VisualQ if the card is a camera card. I can easily determine that because it will have a /dcim/100olymp directory on it.
Title: Determine When A Cf Card Is Mounted?
Post by: lardman on November 07, 2005, 09:45:53 am
Take a look at Mickeyl's pcmcia-applet for Opie, it allows you to perform actions depending on which card you have inserted.


Si
Title: Determine When A Cf Card Is Mounted?
Post by: BarrySamuels on November 07, 2005, 10:37:33 am
Quote
Take a look at Mickeyl's pcmcia-applet for Opie, it allows you to perform actions depending on which card you have inserted.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=102710\"][{POST_SNAPBACK}][/a][/div]

Thanks - but where do I find it? A google search finds only one occurence as part of a 'wish list'.
Will it run on a Sharp Rom?
Title: Determine When A Cf Card Is Mounted?
Post by: xenophobe on November 07, 2005, 12:15:01 pm
Quote
Is there a way to determine when a CompactFlash card is mounted? If I can do that I then want to run a script automatically.

Any help appreciated.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=102694\"][{POST_SNAPBACK}][/a][/div]

Look at /etc/pcmcia/ide file.
This file starts every time your CF card inserts, ejects etc.