I've never created udev rule so the usal way does not tell me too much :)
I've checked the net for examples but it looks like very complicated for me
:)

My usb stick looks like this

Bus 007 Device 015: ID 058f:6387 Alcor Micro Corp. Transcend JetFlash Flash
Drive

Can you share with me some example how can I use this info on udev rules?

Thanks
Laszlo


2010/7/1 Neil Bothwick <[email protected]>

> On Thu, 1 Jul 2010 15:49:08 +0200, SpaceCake wrote:
>
> > I would like to increase the speed of my machine by putting some swap
> > on a fast pendrive. It is working manually by starting a script
> >
> > swapon -s
> > swapon -p -1 /dev/sdb1
> > swapoff /dev/sda6
> > swapon -p -2 /dev/sda6
> > swapon -s
> >
> > but, I would like to make it automatic by creating an udev rule, so
> > when I plug in that device the swap space is automatically activated
> > and the priority is changed.
>
> Create the udev rule in the usual way and add
>
> RUN="/path/to/your/script"
>
> You must use a full path when running a program from a udev rule and the
> program should exit quickly as udev blocks while it is running.
>
>
> --
> Neil Bothwick
>
> What colour is a chameleon on a mirror?
>

Reply via email to