Tim Dijkstra <[EMAIL PROTECTED]> wrote:

> Thanks for looking in to this Frank, but I think you're mistaking. What
> it does (well, is supposed to do) is make a debconf list of valid swap
> partitions, with the biggest as the default. Then it parses the config
> file and set values it found as the answers to the questions. Depending
> on the priority the questions are then asked or not.

You are right, I didn't read on carefully enough

> So the only scenario I can imagine that this goes wrong is that the swap
> partition you configured in /etc/uswsusp.conf is not active at the time 
> of the upgrade.
>
> Vagrant, was that the case? Can you send me the content of /proc/swaps?
>
> Frank, did you have the same problem or where you just bug-hunting?

I was just bug-hunting.  I don't know what the reason was why the device
was unavailable, but I think there may be valid setups where this is the
case.  As an extreme example, one might want to save the current state
to a swap device on a removable medium and try to conserve it as a
snapshot, or boot a cloned machine to the same state.

What about something like

if ! echo $SWAPLIST | grep -q $SWAPDEFAULT; then
  # add the SWAPDEFAULT device to SWAPLIST
  SWAPDEFAULT="${SWAPDEFAULT} # currently not available"
  SWAPLIST=${SWAPLIST}${KOMMA}${SWAPDEFAULT}
fi

right after populating SWAPLIST?  Hm, the comment might need special
treatment later on, since it's probably not yet in the configuration
file.  And of course it assumes that the configuration file may contain
in-line comments.

Regards, Frank
-- 
Dr. Frank Küster
Single Molecule Spectroscopy, Protein Folding @ Inst. f. Biochemie, Univ. Zürich
Debian Developer (teTeX/TeXLive)

Reply via email to