source: debian/config @ 539

Revision 539, 1.9 KB checked in by anarcat, 9 years ago (diff)

[project @ alternc: changeset 2005-03-05 16:19:39 by anarcat]
ajouter les dernieres variables a la configuration automatique de
debconf

Original author: anarcat
Date: 2005-03-05 16:19:39

Line 
1#! /bin/sh
2
3set -e
4
5# Source debconf library.
6. /usr/share/debconf/confmodule
7db_title AlternC
8
9db_input medium alternc/welcomeconfirm || true
10db_go
11# Check the answer.
12db_get  alternc/welcomeconfirm || true
13
14if [ "$RET" = "false" ]; then
15        exit -1
16fi
17
18if [ -r /etc/alternc/local.sh ]; then
19  # source the current config
20  . /etc/alternc/local.sh
21else
22  # default values for local.sh
23  MYSQL_HOST=localhost
24  MYSQL_DATABASE=alternc
25  MYSQL_USER=sysusr
26  MYSQL_PASS=`perl -e 'print map{("a".."z","A".."Z",0..9)[int(rand(62))]}(1..10)' `
27  DEFAULT_IP=`/sbin/ifconfig | sed -e '/inet adr/!d; s/^.*inet adr:[^0-9\.]*\([0-9\.]*\).*$/\1/; q'`
28  DEFAULT_MX=`cat /etc/mailname`
29  DATA_PART=`df /var/alternc | awk '/^\// { print $1 }'`
30  # XXX: local.sh also has those settings:
31  # ROOT_MAIL (??)
32fi
33  db_set alternc/mysql/host $MYSQL_HOST
34  db_set alternc/mysql/db $MYSQL_DATABASE
35  db_set alternc/mysql/user $MYSQL_USER
36  db_set alternc/mysql/password $MYSQL_PASS
37  db_set alternc/public_ip $DEFAULT_IP
38  db_set alternc/default_mx $DEFAULT_MX
39  db_set alternc/data_part $DATA_PART
40  # XXX: we're missing a few here. Those are likely to be in
41  # alternc.conf, but should be removed from there and moved to
42  # local.sh.
43  #db_set alternc/desktopname
44  #db_set alternc/hostingname
45  #db_set alternc/ns1
46  #db_set alternc/ns2
47
48db_input medium alternc/desktopname || true
49db_input medium alternc/hostingname || true
50db_input medium alternc/public_ip || true
51db_input medium alternc/internal_ip || true
52db_input medium alternc/default_mx || true
53db_input medium alternc/ns1 || true
54db_input medium alternc/ns2 || true
55db_input medium alternc/data_part || true
56db_input low alternc/mysql/host || true
57db_input low alternc/mysql/db || true
58db_input low alternc/mysql/user || true
59db_input low alternc/mysql/password || true
60db_input low alternc/monitor_ip || true
61db_input low alternc/bind_internal || true
62db_input low alternc/mynetwork || true
63db_go
Note: See TracBrowser for help on using the repository browser.