Re: Preconfiguring Debian systems
On second thoughts I'll post it to debian-devel myself.
The idea is that it would be good if Debian could be told how to
configure itself in batch and therefore remove (or at least reduce)
the need for user intervention during installation.
This is something that would be extremely useful for me at work, if we
move to using Linux for small sites instead of Unixware, which may
happen. But I think the uses are wider than that.
Another issue is that of a graphical installation. Even with an
xdselect we'd still have all these text-only maintainer scripts from
the packages. Now to be maximally slick would probably require
individual GUI code for many packages, but IMHO it's possible to get
to a useful point without going that far.
In particular, after seeing comments from Mark Constable and Jim Pick
on debian-talk@ion.com.au I put a little code together which might act
as a prototype or foundation for experimentation in this direction.
The idea is instead of e.g.
echo IP configuration
echo
echo Enter domain name:
read domain
echo Enter IP address:
read ipaddress
echo "Enter netmask[255.255.255.0]:"
read netmask
if [ "$netmask" = "" ]; then netmask=255.255.255.0; fi
# etc
you write something which invokes a command like
debconfig say "IP Configuration" \
ask prompt "Enter domain name" \
key domain_name \
ask prompt "Enter IP address" \
key ip_address \
matching '^\d+\.\d+\.\d+\.\d+$' \
ask prompt "Enter netmask" \
key netmask \
matching '^\d+\.\d+\.\d+\.\d+$' \
default 255.255.255.0
# etc
err and then get the values out of debconfig's stdout in some sensible
way. Write them to a file and then read(1) them back or something.
Normally debconfig just asks the user for the value; optionally it can
look up the "key" parameters in a file and use those values instead.
One could extend it further to do more complex things, or to produce a
`dialog' based form, or a form in an X window, or look up values over
a network connection, or whatever you like, using the same arguments
and producing the same results.
There's another similar API for easy use from perl (in fact the
program debconfig is just a perl wrapper around such a call.)
The downside is that quite a few packages would have to be modified to
support this, of course.
Here's what I posted to debian-talk, anyway. I'd be interested to
hear any comments on this.
------------------------------------------------------------------------
Code is at ftp.elmail.co.uk:/pub/richard/debconfig-0.1.tar.gz - it's
written in perl 5: there's a module to do the work and a small scripts
which wraps it up so it's easy to call from shell scripts. I've
tested it a bit l-)
Please consider it GPL'd. Let me know what you think; feel free to
consider moving this discussion to debian-devel.
Documentation is in embedded POD, do e.g.
pod2man debconfig.pm | groff -man -Tlatin1 | less
to read it.
There may be a better name than debconfig for this.
In this framework grabbing preconfiguration from a server would be
implemented either by copying a preconfig file onto the client machine
or by remote-mounting the server.
--
Richard Kettlewell http://www.elmail.co.uk/staff/richard/
/dev/hdb5 - 0.5Gb of spinning metal, all alone in the night...
--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-REQUEST@lists.debian.org . Trouble? e-mail to Bruce@Pixar.com
Reply to: