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

Re: Bug#632627: uswsusp patches for initramfs-tools (was: Bug#632627: Re[2]: resume file)




Ben Hutchings <ben@decadent.org.uk> escribió:

Hi Ben,

I think it could be useful to copy the uswsusp configuration when
initramfs-tools is installed, except that initramfs-tools is almost
always installed first.

Yes. For this reason I made the patch. This patch moves the process to
select the resume device from the package installation to the
update-initramfs script.

Reconfiguring uswsusp should definitely not affect the behaviour of
swsusp; that would be very surprising.  I think the configuration should
be transferred the other way: uswsusp should copy the resume device and
offset from initramfs-tools configuration (if initramfs-tools is
installed).

I am not sure about that, but in any case, we need that both packages
"interact".

I don't like too much the idea of copy the uswsusp configuration
*only* in the initramfs-tools package installation, because  if the
user could have a wrong uswsusp configuration, so the configuration
will be wrong forever.

About your idea (copy the initramfs-tools configuration), I don't like
too much too :-). Currently, uswsusp can configure the resume device.
With your idea, uswsusp must not configure the resume device (if
initramfs-tools is installed), else the resume device in
initramfs-tools and uswsusp could be different and then we continue
with these bugs/issues. So, if the user wants to change the resume
device, must do it updating the initramfs-tools configuration.

We could do these things (to support your idea):

1. initramfs-tools must provide a method to select the resume device
and the offset. The resume device won't be read from the
/etc/uswsusp.conf file when the package is installed. The user will
select the resume device and offset with initramfs-tools, because
currently the user can select it now with uswsusp (current behavior).
The user will select the resume device when initramfs-tools package is
installed (not read the /etc/uswsusp.conf file).

2. The debconf scripts will include the device and offset selection but:
2a. The user will continue using this behavior if initramfs-tools is
not installed.
2b. If initramfs-tools package is installed, the debconf scripts won't
show the selecion for the device and the offset. They will show a
message about the new process (run the initramfs-tools script to
select the device) to select the offset and resume device. The user
needs run the initramfs-tools script to select the new resume device
AND then reconfigure uswsusp again, because the /etc/uswsusp.conf
package won't be udpated.

I don't like this behaviour, because the user will:

1. Run dpkg-reconfigure uswsusp
2. See the message about select device with the initramfs-tools tool
3. Run the tool to select the new device
4. Run dpkg-reconfigure uswsup to update the config file.

The idea about initramfs-tools reads the uswsusp configuration don't
have these behavior. If the resume device changes, initramfs-tools
script could show a message to the user about that. The user will
understand that the resume problems will be related to uswsusp.conf
configuration. Because when the uswsusp package reconfiguration calls
update-initramfs tools, the user will exec only one command
"dpkg-reconfigure uswsusp". IMO, this method is better.

More comments are very welcome.

Thanks a lot for your reply Ben.
kix

Ben.

--
Ben Hutchings
I say we take off; nuke the site from orbit.  It's the only way to be sure.


--
 .''`.
: :'  : Rodolfo García Peñas (kix) <kix@debian.org>
`. `'`  Proud Debian Developer
 `-


Reply to: