[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Local swap partitions are now forcefully enabled



Hello,

intrigeri wrote (11 Sep 2009 09:14:23 GMT) :
> since commit 3d5d6074e339e5d2e to live-initramfs,
> the default behavior wrt. local swap partitions has been changed
> once again.

> It used to be opt-out, has then been switched to opt-in in commit
> 35dafe02ca09da6c79 after discussion on the list, and is now forcefully
> on: if $NOSWAP is empty, local swap partitions are used, but NOSWAP
> does not seem to be initialized anywhere...

> Please switch back to the good old opt-in test:

>      if [ -z "${SWAPON}" ] || [ -n "${NOFSTAB}"

This suggestion was wrong. Please find the correct fix as an attached
(one-liner) Git patch.

Bye,
-- 
  intrigeri <intrigeri@boum.org>
  | GnuPG key @ https://gaffer.ptitcanardnoir.org/intrigeri/intrigeri.asc
  | OTR fingerprint @ https://gaffer.ptitcanardnoir.org/intrigeri/otr-fingerprint.asc
  | Do not be trapped by the need to achieve anything.
  | This way, you achieve everything.

>From 6468fab3dd903aaf5e753d2b2e4146b725eae8bc Mon Sep 17 00:00:00 2001
From: amnesia <amnesia@boum.org>
Date: Tue, 6 Oct 2009 14:24:49 +0200
Subject: [PATCH] restore opt-in behavior for local swap partitions

---
 scripts/live-bottom/12fstab |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/scripts/live-bottom/12fstab b/scripts/live-bottom/12fstab
index 22c11a0..04bf033 100755
--- a/scripts/live-bottom/12fstab
+++ b/scripts/live-bottom/12fstab
@@ -55,7 +55,7 @@ then
 	echo "tmpfs /tmp tmpfs nosuid,nodev 0 0" >> "${FSTAB}"
 fi
 
-if [ -z "${NOSWAP}" ]
+if [ -n "${SWAPON}" ]
 then
 	devices=""
 
-- 
1.6.3.3


Reply to: