From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1OUK9f-00030G-AR for garchives@archives.gentoo.org; Thu, 01 Jul 2010 13:50:19 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 616D6E09DF; Thu, 1 Jul 2010 13:49:09 +0000 (UTC) Received: from mail-bw0-f53.google.com (mail-bw0-f53.google.com [209.85.214.53]) by pigeon.gentoo.org (Postfix) with ESMTP id 190E3E09DF for ; Thu, 1 Jul 2010 13:49:08 +0000 (UTC) Received: by bwz6 with SMTP id 6so1097530bwz.40 for ; Thu, 01 Jul 2010 06:49:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=a8Afe/7vYmPdO2Pjz4doumM1naBcHujFCKsyceCWdgQ=; b=DQ41DTWuzavhEvYZnjAaDWtWvoG1BjeW5ShsuWymJ0wllHjAO6gNcfp4uD3A9Mz9A7 X1e824uPAHgtVsL4XcjgHU2+Bmco3JIbkE6tyfhro+UK4+TcOLU8GMDebV4K9/sxQDT6 DUjShRuNfJ7xPDdlUnt2VhW1eCHmsjseGPnMI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=NRrLMGQpDNrG3jozzwuOcExH2fVNn/uonzZLRFtrisK5gnGj2PSC5uVVA+E4i7Zcv2 0b747Bxc5T8s5ovv2qEOqBWI0kgtVTP8RvqphZ/h750L9WbTt9o6b80oLtG01CGsgZlR lZcOHqByHjuvEiiG30pGr2CKLKYM3mI2FG1Zs= Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Received: by 10.204.75.210 with SMTP id z18mr742595bkj.119.1277992148318; Thu, 01 Jul 2010 06:49:08 -0700 (PDT) Received: by 10.204.56.20 with HTTP; Thu, 1 Jul 2010 06:49:08 -0700 (PDT) Date: Thu, 1 Jul 2010 15:49:08 +0200 Message-ID: Subject: [gentoo-user] activating swap by udev event From: SpaceCake To: gentoo-user@lists.gentoo.org Content-Type: multipart/alternative; boundary=001485f7d24406bac9048a53bc59 X-Archives-Salt: cba9ceb6-806f-4619-821a-b0a8807d78cd X-Archives-Hash: a5468014a05805eef486ca6e0265b82b --001485f7d24406bac9048a53bc59 Content-Type: text/plain; charset=ISO-8859-1 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 --001485f7d24406bac9048a53bc59 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 activa= ted and the priority is changed. I've tried to google for a solution li= ke this, but I did not find. Maybe you already have some script at hand :) = can you please share this with me?

Thanks
Laszlo

--001485f7d24406bac9048a53bc59--