Re: Bug#110258: postinst writes infos directly to /dev/tty
#include <hallo.h>
Russell Coker wrote on Wed Aug 29, 2001 um 08:32:52PM:
> > > if [ -f /sbin/dbootstrap ]; then
> > > # bf environment detected, work quite
> > > /bin/whatever > /dev/null 2>&1
> > > exit 0;
> > > fi
> >
> > Stop, I have a better idea, pipe it to "| /usr/bin/logger -t
> > lilo-setup", the output still may be interessting.
My latest idea, you may like it, or not. See below.
> OK. Now is presense of dbootstrap authoritative evidence that we're in an
> install phase?
That is a good question. I looked at how debootstrap works, and IMHO it
is complicated. The postinst script is invoked from dpkg, and dpkg is
running in an chroot environment. I will send a Cc' to d-boot ml, maybe
someone has an idea.
> Should this go in the main package or are you suggesting changes for a
> version specifically for the install?
That is an simple changes, so it could go into main, IMHO:
if [ -f /sbin/dbootstrap ] ; then
# INVENT A BETTER CHECK!
TTYOUT="| /usr/bin/logger -t lilo-setup"
else
TTYOUT="> /dev/tty"
fi
if [ ! -e /boot/boot.b ]; then
echo "Making /boot/boot.b a sym-link to boot-menu.b ." $TTYOUT
echo "Change the sym-link if you want boot-text.b or boot-compat.b ." $TTYOUT
echo
ln -s /boot/boot-menu.b /boot/boot.b
fi
echo "Running /usr/sbin/liloconfig" $TTYOUT
echo
/usr/sbin/liloconfig < /dev/tty $TTYOUT
Gruss/Regards,
Eduard.
--
Don't drink as root!
Reply to: