How to run script after USB HD Mount?

This forum is for Marvell Kirkwood devices such as the GoFlex Home/Net, PogoPlug v1/v2, SheevaPlug, and ZyXEL devices.

How to run script after USB HD Mount?

Postby grayman4hire » Sun Mar 31, 2013 8:45 pm

Hello,

I want to create a swapfile on my usb hard drive. I would like to enable swap after the usb drive is automounted using udevil. I'm not using fstab.

I recall a way to execute a specially named script file (.autorun) placed on the hard drive that gets execute automatically after the partition is mounting. Am I correct?

Also, let me know if there's a better way to do this. Thanks
grayman4hire
 
Posts: 350
Joined: Sat Sep 29, 2012 12:03 am
Location: SF, CA

Re: How to run script after USB HD Mount?

Postby karog » Sun Mar 31, 2013 11:32 pm

$this->bbcode_second_pass_quote('grayman4hire', 'I') recall a way to execute a specially named script file (.autorun) placed on the hard drive that gets execute automatically after the partition is mounting. Am I correct?

Hey grayman4hire, you are thinking of tomatousb with *.autorun files in the root dir of a partition.

linux has autorun for CDROMs but I don't have a solution off hand for what you desire.
karog
 
Posts: 305
Joined: Thu Jan 05, 2012 7:55 pm

Re: How to run script after USB HD Mount?

Postby grayman4hire » Mon Apr 01, 2013 12:02 am

You're right, that's exactly where I read it.

I went ahead and switched back to mounting my usb hard drive and swapfile via /etc/fstab and disabled udevil.
grayman4hire
 
Posts: 350
Joined: Sat Sep 29, 2012 12:03 am
Location: SF, CA


Return to Marvell Kirkwood

Who is online

Users browsing this forum: No registered users and 274 guests

cron