Re: cdebconf-slang-udeb for use in cdrom 2.88 MiB floppy?
On 29.I.2003 at 09:32 Martin Sjцgren wrote:
>
> Right now, any time main-menu exits it's because of a bug in main-menu.
> It's written with an infinite loop that's basically aborted by reboot.
> If we want to be able to change frontend from the main menu, we have to
> figure out a way for a package to tell the main menu to exit. Ick.
There is no need to exit from the main-menu if cdebconf is started
from inside the main-menu.
Initialy in the initrd there is only one frontend installed. Latter
several udebs have got retrieved and unpacked. Amongst them can be
more frontends.
I suppose there can be some udeb providing /bin/frontend-chooser.
This script is invoked by the udeb which caused new frontend to be
unpacked and configured (i.e. by udeb that depends on particular
frontend).
The script /bin/frontend-chooser can be similar to this:
MAX_PRIORITY=-1
# FIXME: What should be used as unpacked-and-configured-frontends?
for frontend in `unpacked-and-configured-frontends` ; do
INSTALLED_FRONTENDS="${INSTALLED_FRONTENDS} ${frontend}"
db_get ${frontend}/description
CHOICE="$RET"
FRONTEND_CHOICES="${FRONTEND_CHOICES}, ${CHOICE}"
db_get ${frontend}/priority
PRIORITY="$RET"
if [ "$MAX_PRIORITY" -lt "$PRIORITY" ] ; then
MAX_PRIORITY="$PRIORITY"
BEST_CHOICE="$CHOICE"
fi
done
db_metaget shared/default-debconf-frontend choices
OLD_FRONTEND_CHOICES="$RET"
if [ "${OLD_FRONTEND_CHOICES}" != "${FRONTEND_CHOICES}" ]; then
db_subst shared/default-debconf-frontend choices $FRONTEND_CHOICES
db_subst shared/default-debconf-frontend default $BEST_CHOICE
db_fset shared/default-debconf-frontend seen false
fi
db_input low shared/default-debconf-frontend || true
db_go
db_get shared/default-debconf-frontend
CURRENT_DEFAULT="$RET"
for frontend in $INSTALLED_FRONTENDS ; do
db_get ${frontend}/description
if [ "$RET" = "$CURRENT_DEFAULT" ]; then
db_set debconf/frontend $frontend
break
fi
done
Anton Zinoviev
Reply to: