public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: SpaceCake <spacecakex@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: [gentoo-user] activating swap by udev event
Date: Thu, 1 Jul 2010 15:49:08 +0200	[thread overview]
Message-ID: <AANLkTikEOU4NJc5OjYsd8ewVwnH6N1RZ_lI0YzAjUq34@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 555 bytes --]

Hi,


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. I've tried to google for a solution like this, but I
did not find. Maybe you already have some script at hand :) can you please
share this with me?

Thanks
Laszlo

[-- Attachment #2: Type: text/html, Size: 614 bytes --]

             reply	other threads:[~2010-07-01 13:50 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-01 13:49 SpaceCake [this message]
2010-07-01 14:05 ` [gentoo-user] activating swap by udev event Nils Larsson
2010-07-01 14:16 ` Neil Bothwick
2010-07-01 15:17   ` SpaceCake
2010-07-01 15:26     ` Neil Bothwick
2010-07-01 15:44       ` SpaceCake
2010-07-01 15:49         ` Bill Longman
2010-07-01 15:59           ` SpaceCake
2010-07-01 18:59             ` Bill Longman
2010-07-01 19:21               ` Neil Bothwick
2010-07-01 16:06           ` Nils Larsson
2010-07-01 16:30             ` Albert Hopkins
2010-07-01 16:45               ` Nils Larsson
2010-07-01 16:49               ` SpaceCake
2010-07-01 19:46             ` Alan McKinnon
2010-07-01 21:50               ` Neil Bothwick
2010-07-01 21:59                 ` Alan McKinnon
2010-07-01 16:05         ` Alex Schuster
2010-07-01 16:09           ` Neil Bothwick
2010-07-01 16:08         ` Neil Bothwick

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTikEOU4NJc5OjYsd8ewVwnH6N1RZ_lI0YzAjUq34@mail.gmail.com \
    --to=spacecakex@gmail.com \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox