- remember 'empty' value when the user answer empty value in templates

- changelog 
- MX is a DNS field, not an IP field !
- don't ask for mysql password if we already got it
- code cleanup  
- added "secondary MX DNS entry" domain type
This commit is contained in:
Benjamin Sonntag 2011-03-28 08:04:18 +00:00
parent 7ee9291e61
commit 90c77142b4
6 changed files with 34 additions and 40 deletions

View File

@ -834,3 +834,6 @@ msgstr "Entr
msgid "MX DNS entry" msgid "MX DNS entry"
msgstr "Entrée DNS MX" msgstr "Entrée DNS MX"
msgid "secondary MX DNS entry"
msgstr "Entrée DNS MX secondaire"

View File

@ -13,10 +13,9 @@ update_var() {
question="$1" question="$1"
var="$2" var="$2"
db_get "$question" db_get "$question"
if [ ! -z "$RET" ]; then
grep -Eq "^ *$var=" $CONFIGFILE || echo "$var=" >> $CONFIGFILE grep -Eq "^ *$var=" $CONFIGFILE || echo "$var=" >> $CONFIGFILE
SED_SCRIPT="$SED_SCRIPT;s\\^ *$var=.*\\$var=\"$RET\"\\" SED_SCRIPT="$SED_SCRIPT;s\\^ *$var=.*\\$var=\"$RET\"\\"
fi
} }
# summary of how this script can be called: # summary of how this script can be called:
@ -146,10 +145,6 @@ EOF
. /usr/share/alternc/install/mysql.sh . /usr/share/alternc/install/mysql.sh
fi fi
# We don't force seen or reset the data : this will allow preseeding
# db_reset alternc/mysql/password || true
# db_fset alternc/mysql/password "seen" "false" || true
if [ -e $CONFIGFILE ]; then if [ -e $CONFIGFILE ]; then
# source local.sh variables # source local.sh variables
. $CONFIGFILE . $CONFIGFILE

32
debian/changelog vendored
View File

@ -2,19 +2,23 @@ alternc (1.0~rc2) stable; urgency=low
* Major patch * Major patch
* Web & DNS file generation rebuild from scratch * Web & DNS file generation rebuild from scratch
* Drop of apache 1 support * Drop of apache 1 support
* Big changes in database schema (domaines, sub_domaines, *_standby) * Big changes in database schema (domaines, sub_domaines, *_standby removal)
* Major changes * Major changes
* Drop mass virtual hosting, now use full vhost * Drop mass virtual hosting, now use full vhost
* Panel URL do not need anymore /admin/ (but you can still use it) * Panel URL do not need anymore /admin/ (but you can still use it, we put a 301 redirect)
* JQuery is now used by AlternC (but not needed for any usual feature usage)
* New features * New features
* Domains type are dynamic, the administrator can create domaine type with his own apache template * Domains type are dynamic, the administrator can create domaine type with his own apache template
* Advanced DNS options (ipv6, cname, txt, mx) * Advanced DNS options (ipv6, cname, txt, mx)
* Possibility to create a temporary mail * Possibility to create a temporary mail (not yet shown, need cron)
* Admin can connect to other account and go back to their own
* Language link is back inside the menu
* Bugfixes * Bugfixes
* Too many to be listed (we change the update_domaines.sh) * Too many to be listed (we change the historic update_domaines.sh)
* Dash compatibility * Dash compatibility
* Use iana.org to have whois server list up to date * Use iana.org to have whois server list up to date
* Preseeding compatibility : don't ask for questions when already set
-- Alan Garcia <fufroma@mailfr.com> Fri, 11 Mar 2011 10:24:30 +0200 -- Alan Garcia <fufroma@mailfr.com> Fri, 11 Mar 2011 10:24:30 +0200
alternc (1.0~rc1) stable; urgency=low alternc (1.0~rc1) stable; urgency=low
@ -23,7 +27,7 @@ alternc (1.0~rc1) stable; urgency=low
* Blue desktop using only css, no frameset etc * Blue desktop using only css, no frameset etc
* Sanitizing of get/request/post parameters using getFields function. May allow alternc not to use register_globals some day ... * Sanitizing of get/request/post parameters using getFields function. May allow alternc not to use register_globals some day ...
* security: passwords are now MANDATORY in MySQL class (whoosh...) * security: passwords are now MANDATORY in MySQL class (whoosh...)
* security: now using htmlspecialchars on every form default values ... yes it's 2010 ;) * security: now using htmlspecialchars on every form default values ... yes it's 2010 ;)
* i18n: charset is now variable depending on the current language * i18n: charset is now variable depending on the current language
* new features: * new features:
* removed the dependency on postgrey, added dnsutils (for domain checks) * removed the dependency on postgrey, added dnsutils (for domain checks)
@ -32,7 +36,7 @@ alternc (1.0~rc1) stable; urgency=low
* fix a "already exist" error when creating a database containing an hyphen (-) * fix a "already exist" error when creating a database containing an hyphen (-)
* #1163: fix sqlbackup script call routine to retain backwards * #1163: fix sqlbackup script call routine to retain backwards
compatibility compatibility
* fix usage of ISO8859-15 charset (that may NOT be defined in locales...) * fix usage of ISO8859-15 charset (that may NOT be defined in locales...)
and add it to the correct url (%%fqdn_lettre%%...) and add it to the correct url (%%fqdn_lettre%%...)
* major changes: * major changes:
* PHP sessions are now stored in /var/alternc/sessions * PHP sessions are now stored in /var/alternc/sessions
@ -43,7 +47,7 @@ alternc (1.0~rc1) stable; urgency=low
* add new field to member form: 'notes' which is just a text field * add new field to member form: 'notes' which is just a text field
* send an email on new account creation. the actual email needs to be * send an email on new account creation. the actual email needs to be
configured through the AlternC variables for this to work. configured through the AlternC variables for this to work.
* added the password policy management module : you can choose which * added the password policy management module : you can choose which
password complexity you want to force for each place a password is required. password complexity you want to force for each place a password is required.
* API changes * API changes
* m_mysql->get_db_list() doesn't include size anymore because this * m_mysql->get_db_list() doesn't include size anymore because this
@ -144,7 +148,7 @@ alternc (0.9.7) stable; urgency=low
* fix dns install of internal hosting domains (#1056) * fix dns install of internal hosting domains (#1056)
* fix proftpd and saslauthd configuration for Etch (#1046, #1069) * fix proftpd and saslauthd configuration for Etch (#1046, #1069)
* fix .eu, .be, .name whois issue (#571) * fix .eu, .be, .name whois issue (#571)
* change apache log format to a working one (using host request), also fix awstats issues. * change apache log format to a working one (using host request), also fix awstats issues.
* fix modules manipulation rules (#1062) * fix modules manipulation rules (#1062)
* try to support apache2, at least with the right dependencies * try to support apache2, at least with the right dependencies
* end explicit mysql-server dependencies, which switches to Recommends, * end explicit mysql-server dependencies, which switches to Recommends,
@ -184,7 +188,7 @@ alternc (0.9.6.1) stable; urgency=high
* Make it possible to erase files and directories in file browser. Closes: #1002. * Make it possible to erase files and directories in file browser. Closes: #1002.
* Fix mail accounts creation. Closes: #1003. * Fix mail accounts creation. Closes: #1003.
* Fix a race condition in update_domains.sh which could allow users to * Fix a race condition in update_domains.sh which could allow users to
bypass openbasedir protection when creating domains. Reported by bypass openbasedir protection when creating domains. Reported by
Jerome Moinet. Jerome Moinet.
-- Antoine Beaupré <anarcat@koumbit.org> Fri, 12 Jan 2007 15:59:42 -0500 -- Antoine Beaupré <anarcat@koumbit.org> Fri, 12 Jan 2007 15:59:42 -0500
@ -222,7 +226,7 @@ alternc (0.9.4) stable; urgency=low
* maintenance release to fix packaging and security bugs * maintenance release to fix packaging and security bugs
* see https://dev.alternc.org/trac/alternc/milestone/0.9.4 for milestone * see https://dev.alternc.org/trac/alternc/milestone/0.9.4 for milestone
* changelog at https://dev.alternc.org/trac/alternc/query?status=closed&milestone=0.9.4 * changelog at https://dev.alternc.org/trac/alternc/query?status=closed&milestone=0.9.4
However, this version contains mainly : However, this version contains mainly :
* Integration of Globenet patchs (replacement of do_domains.sh by update_domains.sh and others) * Integration of Globenet patchs (replacement of do_domains.sh by update_domains.sh and others)
* Changing mysql database creation from uid to login name * Changing mysql database creation from uid to login name
* Major improvements in FHS compliance * Major improvements in FHS compliance
@ -263,7 +267,7 @@ alternc (0.9.3.9-globenet9) unstable; urgency=low
alternc (0.9.3.9-globenet8) unstable; urgency=low alternc (0.9.3.9-globenet8) unstable; urgency=low
* Finally fix empty host handling in update_domains.sh. * Finally fix empty host handling in update_domains.sh.
-- Lunar <lunar@anargeek.net> Wed, 21 Sep 2005 23:45:06 +0200 -- Lunar <lunar@anargeek.net> Wed, 21 Sep 2005 23:45:06 +0200
@ -371,7 +375,3 @@ alternc (0.9-1) testing; urgency=low
* Initial Release. * Initial Release.
-- Benjamin Sonntag <benjamin@alternc.org> Tue, 27 Aug 2002 19:31:26 +0200 -- Benjamin Sonntag <benjamin@alternc.org> Tue, 27 Aug 2002 19:31:26 +0200

View File

@ -45,12 +45,6 @@
# The grant all is the most important right needed in this script. # The grant all is the most important right needed in this script.
echo "Granting users..." echo "Granting users..."
# cat <<EOF
# host: $host
# user: $user
# password: $password
# database: $database
# EOF
MYSQL_CONFIG="/etc/alternc/my.cnf" MYSQL_CONFIG="/etc/alternc/my.cnf"

View File

@ -497,11 +497,12 @@ PRIMARY KEY ( `name` )
INSERT IGNORE INTO `domaines_type` (name, description, target, entry, compatibility, only_dns, need_dns, advanced) values INSERT IGNORE INTO `domaines_type` (name, description, target, entry, compatibility, only_dns, need_dns, advanced) values
('vhost','Locally hosted', 'DIRECTORY', '%SUB% IN A @@PUBLIC_IP@@', 'txt', false, false, false), ('vhost','Locally hosted', 'DIRECTORY', '%SUB% IN A @@PUBLIC_IP@@', 'txt', false, false, false),
('url','URL redirection', 'URL', '%SUB% IN A @@PUBLIC_IP@@','txt', true, true, false), ('url','URL redirection', 'URL', '%SUB% IN A @@PUBLIC_IP@@','txt', true, true, false),
('ip','IPv4 redirect', 'IP', '%SUB% IN A %TARGET%','url,ip,ipv6,txt', false, true, false), ('ip','IPv4 redirect', 'IP', '%SUB% IN A %TARGET%','url,ip,ipv6,txt,mx,mx2', false, true, false),
('webmail', 'Webmail access', 'NONE', '%SUB% IN A @@PUBLIC_IP@@', 'txt', false, false, false), ('webmail', 'Webmail access', 'NONE', '%SUB% IN A @@PUBLIC_IP@@', 'txt', false, false, false),
('ipv6','IPv6 redirect', 'IPV6', '%SUB% IN AAAA %TARGET%','ip,ipv6,webmail,txt',true, true, true ), ('ipv6','IPv6 redirect', 'IPV6', '%SUB% IN AAAA %TARGET%','ip,ipv6,webmail,txt,mx,mx2',true, true, true ),
('cname', 'CNAME DNS entry', 'DOMAIN', '%SUB% CNAME %TARGET%', 'txt',true, true, true ), ('cname', 'CNAME DNS entry', 'DOMAIN', '%SUB% CNAME %TARGET%', 'txt',true, true, true ),
('txt', 'TXT DNS entry', 'TXT', '%SUB% IN TXT "%TARGET%"','vhost,url,ip,webmail,ipv6,cname,txt,mx',true, true, true), ('txt', 'TXT DNS entry', 'TXT', '%SUB% IN TXT "%TARGET%"','vhost,url,ip,webmail,ipv6,cname,txt,mx,mx2',true, true, true),
('mx', 'MX DNS entry', 'IP', '%SUB% IN MX 5 %TARGET%', 'vhost,url,ip,webmail,ipv6,cname,txt,mx',true, false, true), ('mx', 'MX DNS entry', 'DOMAIN', '%SUB% IN MX 5 %TARGET%', 'vhost,url,ip,webmail,ipv6,cname,txt,mx,mx2',true, false, true),
('panel', 'AlternC panel access', 'NONE', '%SUB% IN A @@PUBLIC_IP@@', 'vhost,url,ip,webmail,ipv6,cname,txt',true, false, true) ('mx2', 'secondary MX DNS entry', 'DOMAIN', '%SUB% IN MX 10 %TARGET%', 'vhost,url,ip,webmail,ipv6,cname,txt,mx2',true, false, true),
('panel', 'AlternC panel access', 'NONE', '%SUB% IN A @@PUBLIC_IP@@', 'vhost,url,ip,webmail,ipv6,cname,txt,mx,mx2',true, false, true)
; ;

View File

@ -22,13 +22,14 @@ PRIMARY KEY ( `name` )
INSERT IGNORE INTO `domaines_type` (name, description, target, entry, compatibility, only_dns, need_dns, advanced) values INSERT IGNORE INTO `domaines_type` (name, description, target, entry, compatibility, only_dns, need_dns, advanced) values
('vhost','Locally hosted', 'DIRECTORY', '%SUB% IN A @@PUBLIC_IP@@', 'txt', false, false, false), ('vhost','Locally hosted', 'DIRECTORY', '%SUB% IN A @@PUBLIC_IP@@', 'txt', false, false, false),
('url','URL redirection', 'URL', '%SUB% IN A @@PUBLIC_IP@@','txt', true, true, false), ('url','URL redirection', 'URL', '%SUB% IN A @@PUBLIC_IP@@','txt', true, true, false),
('ip','IPv4 redirect', 'IP', '%SUB% IN A %TARGET%','url,ip,ipv6,txt', false, true, false), ('ip','IPv4 redirect', 'IP', '%SUB% IN A %TARGET%','url,ip,ipv6,txt,mx,mx2', false, true, false),
('webmail', 'Webmail access', 'NONE', '%SUB% IN A @@PUBLIC_IP@@', 'txt', false, false, false), ('webmail', 'Webmail access', 'NONE', '%SUB% IN A @@PUBLIC_IP@@', 'txt', false, false, false),
('ipv6','IPv6 redirect', 'IPV6', '%SUB% IN AAAA %TARGET%','ip,ipv6,webmail,txt',true, true, true ), ('ipv6','IPv6 redirect', 'IPV6', '%SUB% IN AAAA %TARGET%','ip,ipv6,webmail,txt,mx,mx2',true, true, true ),
('cname', 'CNAME DNS entry', 'DOMAIN', '%SUB% CNAME %TARGET%', 'txt',true, true, true ), ('cname', 'CNAME DNS entry', 'DOMAIN', '%SUB% CNAME %TARGET%', 'txt',true, true, true ),
('txt', 'TXT DNS entry', 'TXT', '%SUB% IN TXT "%TARGET%"','vhost,url,ip,webmail,ipv6,cname,txt,mx',true, true, true), ('txt', 'TXT DNS entry', 'TXT', '%SUB% IN TXT "%TARGET%"','vhost,url,ip,webmail,ipv6,cname,txt,mx,mx2',true, true, true),
('mx', 'MX DNS entry', 'IP', '%SUB% IN MX 5 %TARGET%', 'vhost,url,ip,webmail,ipv6,cname,txt,mx',true, false, true), ('mx', 'MX DNS entry', 'DOMAIN', '%SUB% IN MX 5 %TARGET%', 'vhost,url,ip,webmail,ipv6,cname,txt,mx,mx2',true, false, true),
('panel', 'AlternC panel access', 'NONE', '%SUB% IN A @@PUBLIC_IP@@', 'vhost,url,ip,webmail,ipv6,cname,txt',true, false, true) ('mx2', 'secondary MX DNS entry', 'DOMAIN', '%SUB% IN MX 10 %TARGET%', 'vhost,url,ip,webmail,ipv6,cname,txt,mx2',true, false, true),
('panel', 'AlternC panel access', 'NONE', '%SUB% IN A @@PUBLIC_IP@@', 'vhost,url,ip,webmail,ipv6,cname,txt,mx,mx2',true, false, true)
; ;
-- Changing standby use -- Changing standby use