Re: Creating a user account in just one screen
On Sun, Dec 09, 2007 at 07:07:25PM +0100, Frans Pop wrote:
> On Sunday 09 December 2007, Colin Watson wrote:
> > On Sun, Dec 09, 2007 at 04:26:44PM +0200, Cavit Cahit VURAL wrote:
> > > Creating a user needs 3 screens in the Installer.
> > >
> > > At First Screen, just asking the `Real Name` of the User ==> Cavit
> > > Cahit VURAL
> > > At the second, asking for user_name ==> ccvural
> > > At tthe third, it asks password. -==> XXXXXXXX
> > >
> > > Just one screen with all questions will be simpler and better , i think
> >
> > It would, but cdebconf doesn't yet have any useful support for the
> > BEGINBLOCK and ENDBLOCK commands, which would be the sanest way to
> > implement this.
>
> How would that allow for the username to be derived from the full name?
It wouldn't; if a block were used and the cdebconf frontend supported it
then you'd just have to enter them all separately. (Or somebody could
implement a custom plugin for this case.)
> Does an "ENDBLOCK" somehow transfer control back to the script before moving
> to the next field?
No. The way you use blocks is:
BEGINBLOCK
INPUT priority1 question1
INPUT priority2 question2
INPUT priority3 question3
ENDBLOCK
GO
In fact, the BEGINBLOCK and ENDBLOCK there are implicit; INPUT INPUT
INPUT GO would be equivalent. (Theoretically, you should be able to use
blocks as a hint to the frontend as to which questions are more closely
associated with each other, and which it should try to display together
in the face of limited screen space and the like. It's all academic
since nothing that I know of implements this!)
I *think* that the GTK frontend would implement INPUT INPUT INPUT GO
correctly, but as Frans points out this would regress a feature in the
newt frontend. Long-term, maybe a custom plugin is the only reasonable
way to do this.
--
Colin Watson [cjwatson@debian.org]
Reply to: