1 |
I've never created udev rule so the usal way does not tell me too much :) |
2 |
I've checked the net for examples but it looks like very complicated for me |
3 |
:) |
4 |
|
5 |
My usb stick looks like this |
6 |
|
7 |
Bus 007 Device 015: ID 058f:6387 Alcor Micro Corp. Transcend JetFlash Flash |
8 |
Drive |
9 |
|
10 |
Can you share with me some example how can I use this info on udev rules? |
11 |
|
12 |
Thanks |
13 |
Laszlo |
14 |
|
15 |
|
16 |
2010/7/1 Neil Bothwick <neil@××××××××××.uk> |
17 |
|
18 |
> On Thu, 1 Jul 2010 15:49:08 +0200, SpaceCake wrote: |
19 |
> |
20 |
> > I would like to increase the speed of my machine by putting some swap |
21 |
> > on a fast pendrive. It is working manually by starting a script |
22 |
> > |
23 |
> > swapon -s |
24 |
> > swapon -p -1 /dev/sdb1 |
25 |
> > swapoff /dev/sda6 |
26 |
> > swapon -p -2 /dev/sda6 |
27 |
> > swapon -s |
28 |
> > |
29 |
> > but, I would like to make it automatic by creating an udev rule, so |
30 |
> > when I plug in that device the swap space is automatically activated |
31 |
> > and the priority is changed. |
32 |
> |
33 |
> Create the udev rule in the usual way and add |
34 |
> |
35 |
> RUN="/path/to/your/script" |
36 |
> |
37 |
> You must use a full path when running a program from a udev rule and the |
38 |
> program should exit quickly as udev blocks while it is running. |
39 |
> |
40 |
> |
41 |
> -- |
42 |
> Neil Bothwick |
43 |
> |
44 |
> What colour is a chameleon on a mirror? |
45 |
> |