Hi,

Sorry, but I think there was some problems with this mail. I am forwarding it.

Cheers
kix


-------- Mensaje Original --------
De: "Rodolfo García Peñas (kix)" <k...@debian.org>
Enviado: Fri Dec 27 15:23:10 CET 2013
Para: "640...@bugs.debian.org; Rohan Jain" <crod...@gmail.com>
Asunto: Re: reconfiguring uswsusp doesn't detect swap file as active

Hi Rohan,

thanks for your report.

Could you try this? (as root)

1. Backup the uswsusp.config file: cp
/var/lib/dpkg/info/uswsusp.config
/var/lib/dpkg/info/uswsusp.config-backup
2. Replace this code in the file /var/lib/dpkg/info/uswsusp.config
(line 36 and more):

<       uuid=$tmpswap
<       for path in /dev/disk/by-uuid/*; do
<               link=$(readlink -f "$path")
<               if [ "$link" = "$tmpswap" ]; then
<                       uuid=${path}
<                       break;
<               fi
<       done
---
>       # Check if tmpswap is already in uuid format
>       if ! [[ "$tmpswap" == "/dev/disk/by-uuid"* ]]; then
>               # Test every uuid device
>               uuid=$tmpswap
>               for path in /dev/disk/by-uuid/*; do
>                       link=$(readlink -f "$path")
>                       if [ "$link" = "$tmpswap" ]; then
>                               uuid=${path}
>                               break;
>                       fi
>               done
>       fi

As you can see, I only added this lines (on top):

>       # Check if tmpswap is already in uuid format
>       if ! [[ "$tmpswap" == "/dev/disk/by-uuid"* ]]; then
>               # Test every uuid device

and finish with an "fi"

>       fi

This change tests if the $tmpswap device is already
/dev/disk/by-uuid/xxx format.

Now you can run dpkg-reconfigure uswsusp and the problem should be solved.

If this change doesn't solve the problem, please, send me your
/etc/uswsusp.conf file to check it.

Thanks a lot for your help.
kix

PS. Do not forget undo the changes (if you want, of course): mv
/var/lib/dpkg/info/uswsusp.config-backup
/var/lib/dpkg/info/uswsusp.config
--
  .''`.
: :'  : Rodolfo García Peñas (kix) <k...@debian.org>
`. `'`  Proud Debian Developer
  `-

-- 
Enviado desde mi teléfono con K-9 Mail.

Reply via email to