Bug#269573: {add|remove}-shell should be recoded in C

April 15th, 2005 - 01:40 pm ET by Christian Perrier | Report spam
In #269573, the bug submitter complains that he cannot remove the bash
package, because its prerm script calls.remove-shell, which is a
shell script. Indeed, as bash is then the last remaining shell, we
enter a nice loop.

Matthias Klose finally suggested the only safe solution to this :
recode the two utilities {add|remove}-shell in C (or Perl).

Anyone wanting to try?

If no-one volunteers, we will tag this bug wontfix.


email Follow the discussionReplies 1 replyReplies Make a reply

Replies

#1 Alexander Gattin
April 15th, 2005 - 07:40 pm ET | Report spam
Hi!

On Fri, Apr 15, 2005 at 07:06:24PM +0200, Christian Perrier wrote:
In #269573, the bug submitter complains that he cannot remove the bash
package, because its prerm



No, _postrm_ script calls remove-shell (just looked
into it at the moment).

script calls.remove-shell, which is a shell script.



Bullshit! /var/lib/dpkg/info/bash.postrm is _itself_
a script:

#! /bin/sh -e

if [ "$1" = "purge" ]; then
rm -f /etc/bash_completion
rmdir --ignore-fail-on-non-empty /etc/bash_completion.d
fi

if [ -x /usr/sbin/remove-shell ]; then
/usr/sbin/remove-shell /bin/bash
/usr/sbin/remove-shell /bin/rbash
fi
...



Or I don't understand something obvious? Seems that
bash wouldn't be removed inbetween `#! /bin/sh -e` ;)
and `/usr/sbin/remove-shell /bin/bash`

P.S. I can try removing bash at Monday (at work).
Will get much fun, I think. :) But some shell should be
present on system -- maybe _real Korn shell_ then? ;)
WBR,
xrgtn


To UNSUBSCRIBE, email to
with a subject of "unsubscribe". Trouble? Contact

Similar topics