Author Topic: Determine When A Cf Card Is Mounted?  (Read 2950 times)

BarrySamuels

  • Full Member
  • ***
  • Posts: 103
    • View Profile
    • http://www.beenthere-donethat.org.uk
Determine When A Cf Card Is Mounted?
« 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.
Barry Samuels
http://www.beenthere-donethat.org.uk
The Unofficial Guide to Great Britain

Cagilaba

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
    • http://
Determine When A Cf Card Is Mounted?
« Reply #1 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.
--
Zaurus SL-C1000. Cacko 1.23
1 Gb 80x Transcend SD -- 512 Mb 80x Transcend CF
Linksys WCF12 CF wifi card
Fellowes USB Stowaway Keyboard -- Sitecom USB Micro Hub -- Iogear USB Optical Mini Mouse
PDair case

BarrySamuels

  • Full Member
  • ***
  • Posts: 103
    • View Profile
    • http://www.beenthere-donethat.org.uk
Determine When A Cf Card Is Mounted?
« Reply #2 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.
Barry Samuels
http://www.beenthere-donethat.org.uk
The Unofficial Guide to Great Britain

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Determine When A Cf Card Is Mounted?
« Reply #3 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
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

BarrySamuels

  • Full Member
  • ***
  • Posts: 103
    • View Profile
    • http://www.beenthere-donethat.org.uk
Determine When A Cf Card Is Mounted?
« Reply #4 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?
Barry Samuels
http://www.beenthere-donethat.org.uk
The Unofficial Guide to Great Britain

xenophobe

  • Newbie
  • *
  • Posts: 25
    • View Profile
    • http://
Determine When A Cf Card Is Mounted?
« Reply #5 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.