[Bug 1795289] Re: dphys-swapfile will not re-calculate swap file size or re-install

2022-05-31 Thread Launchpad Bug Tracker
*** This bug is a duplicate of bug 1788681 ***
https://bugs.launchpad.net/bugs/1788681

Status changed to 'Confirmed' because the bug affects multiple users.

** Changed in: dphys-swapfile (Ubuntu)
   Status: New => Confirmed

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1795289

Title:
  dphys-swapfile will not re-calculate swap file size or re-install

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dphys-swapfile/+bug/1795289/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1795289] Re: dphys-swapfile will not re-calculate swap file size or re-install

2018-10-04 Thread Axel Beckert
*** This bug is a duplicate of bug 1788681 ***
https://bugs.launchpad.net/bugs/1788681

Hi,

Launchpad Bug Tracker wrote:
> A commenter there suggested I file this as a bug because Ubuntu
> doesn't execute the /bin/sh script correctly.

Well, that's not exactly precise...

> I have made modifications to the sh script and now it works.

I doubt that it works now, i.e. that the correct calculations are done
now. It seems to just no more exit on failure anymore and hence hides
the actual problem (which IMHO is worse).

> It appears that sudo apt install dphys-swapfile runs the /bin/sh
> scripts correctly on Ubuntu 18.04
> 
> However on re-use of the /sbin/dphys-swapfile the /bin/sh arithmitic
> calculations fail.

That's probably because it takes different code paths depending on the
swap file already existing or not.

> After putting some echo debugs around the place and after inspecting the
> code, I notice that re-calculations should have echoed out a lot more
> text when using the setup/install parameters. After more debugging I
> noticed that it is the lines with arithmitic calculations that are
> exiting out/erring out.

Correct. _They_ are _erroring_ out, not /bin/sh. /bin/sh just exits
due to the error of something it called because it has been told so
with "set -e".

> So what I did is changed the shebang from /bin/sh to /bin/bash and added
> let in front of all the lines with calculations.

The "let" is probably what makes the error go away because it probably
doesn't pass the exit code and hence dphys-swapfile doesn't exit
anymore on error in the calculations.

> Underneath is a copy of my fixed dphys-swapfile script from /sbin/dphys-
> swapfile you need to edit this with sudo.

Please just send in a diff of your changes the next time.

Anyways, looking at https://askubuntu.com/q/1079860 this shows the
same symptoms as #1788681 (which has been reported against 18.04, but
so far only been fixed in cosmic with the upload of
dphys-swapfile/20100506-5) respectively the more detailed symptoms in
the according Debian bug report at https://bugs.debian.org/906767

The issue was caused by a more picky dc (the command used to do the
calculations) which was erroring out when piping a "q" command into
it.

Hence marking as duplicate of #1788681.

Regards, Axel
-- 
 ,''`.  |  Axel Beckert , https://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5
  `-|  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE


** This bug has been marked a duplicate of bug 1788681
   changed exit code for 'dc' in Ubuntu Bionic

** Bug watch added: Debian Bug tracker #906767
   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=906767

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1795289

Title:
  dphys-swapfile will not re-calculate swap file size or re-install

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dphys-swapfile/+bug/1795289/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1795289] Re: dphys-swapfile will not re-calculate swap file size or re-install

2018-10-04 Thread Manfred Hampl
This

** Project changed: ubuntu-manpage-repository => dphys-swapfile (Ubuntu)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1795289

Title:
  dphys-swapfile will not re-calculate swap file size or re-install

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dphys-swapfile/+bug/1795289/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs