[Pbuilder-maint] Bug#439285: Bug#439285: pbuilder login does not create a login shell
Ben Hutchings
ben at decadent.org.uk
Sat Aug 25 15:24:02 UTC 2007
On Fri, 2007-08-24 at 08:07 +0900, Junichi Uekawa wrote:
> Hi,
>
> > pbuilder login does:
> >
> > ${CHROOTEXEC} bin/bash
> >
> > This starts bash as a normal interactive shell, not a login shell.
> > This means that it can, for example, be suspended, with unpleasant
> > results. bash's exec command allows setting the invoked program's 0th
> > argument with the -a option, so it would be possible to start a login
> > shell with:
> >
> > (${CHROOTEXEC} bin/bash -c 'exec -a -bash bin/bash')
>
> Hmm.. is adding '--login' option not enough?
The use of the "-" prefix is more general so if you wanted to support
alternate login shells in future you could use something like:
(${CHROOTEXEC} bin/bash -c "exec -a -$SHELL $SHELL")
But so long as pbuilder always runs bash, the --login option would be
more understandable.
Ben.
--
Ben Hutchings
All extremists should be taken out and shot.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.alioth.debian.org/pipermail/pbuilder-maint/attachments/20070825/c35b66b7/attachment.pgp
More information about the Pbuilder-maint
mailing list