[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to configure a package (e.g.: nodm) for the "normal user"?



[Thibaut Girka]
> Hi,
> I'm working on a "Smartphone" task that'll install, amongst other
> packages, e17 and nodm.
> I need to configure nodm, telling it which user to run X for.
>
> I first thought about a task-specific configure script, and
> found /usr/lib/tasksel/info.
> But it runs in the target, and so, can't access the passwd/username
> debconf value...

Why not?  It seem to be present in target, as the only one of the
user-setup-udeb templates.  Do not have a test installation around
that actually created a local user during installation, so I can't
verify that it have any useful content. :)

> I then thought about guessing from passwd (getting the list of users
> with id >= 1000 and if there is one and only one, configure nodm for
> it), but the user is only created in finish-install...
>
> So, how should I do that? In pre-pkgsel.d? In finish-install? In any
> other udeb?  I don't really like this idea as it is really a task
> (maybe even package) specific issue...
>
> Hm... maybe the users can be set up at the end of base-install instead
> of finish-install? Is there any reason for that?

For Debian Edu, I just implemented a hook in our udeb to call scripts
in /target/ in the d-i environment, to allow us to keep config
settings and adjustment in the same package if they belong together.
Perhaps such mechanism should be implemented as part of debian
installer.

It could be two pre-pkgsel and finish-install scripts looking for .d
directories in /target/ (say /target/usr/lib/d-i/pre-pkgsel.d/ and
/target/usr/lib/d-i/finish-install.d/), and run these in sequence
during installation.  It allow us to pick up the root password and
pass it on to other subsystems, and to adjust the tasksel test scripts
to get the tasks we want selected during installation. :)

Happy hacking,
-- 
Petter Reinholdtsen


Reply to: