- 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"
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"
var="$2"
db_get "$question"
if [ ! -z "$RET" ]; then
grep -Eq "^ *$var=" $CONFIGFILE || echo "$var=" >> $CONFIGFILE
SED_SCRIPT="$SED_SCRIPT;s\\^ *$var=.*\\$var=\"$RET\"\\"
fi
}
# summary of how this script can be called:
@ -146,10 +145,6 @@ EOF
. /usr/share/alternc/install/mysql.sh
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
# source local.sh variables
. $CONFIGFILE

16
debian/changelog vendored
View File

@ -2,18 +2,22 @@ alternc (1.0~rc2) stable; urgency=low
* Major patch
* Web & DNS file generation rebuild from scratch
* 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
* 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
* Domains type are dynamic, the administrator can create domaine type with his own apache template
* 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
* 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
* 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
@ -371,7 +375,3 @@ alternc (0.9-1) testing; urgency=low
* Initial Release.
-- 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.
echo "Granting users..."
# cat <<EOF
# host: $host
# user: $user
# password: $password
# database: $database
# EOF
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
('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),
('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),
('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 ),
('txt', 'TXT DNS entry', 'TXT', '%SUB% IN TXT "%TARGET%"','vhost,url,ip,webmail,ipv6,cname,txt,mx',true, true, true),
('mx', 'MX DNS entry', 'IP', '%SUB% IN MX 5 %TARGET%', 'vhost,url,ip,webmail,ipv6,cname,txt,mx',true, false, true),
('panel', 'AlternC panel access', 'NONE', '%SUB% IN A @@PUBLIC_IP@@', 'vhost,url,ip,webmail,ipv6,cname,txt',true, false, 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', 'DOMAIN', '%SUB% IN MX 5 %TARGET%', 'vhost,url,ip,webmail,ipv6,cname,txt,mx,mx2',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
('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),
('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),
('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 ),
('txt', 'TXT DNS entry', 'TXT', '%SUB% IN TXT "%TARGET%"','vhost,url,ip,webmail,ipv6,cname,txt,mx',true, true, true),
('mx', 'MX DNS entry', 'IP', '%SUB% IN MX 5 %TARGET%', 'vhost,url,ip,webmail,ipv6,cname,txt,mx',true, false, true),
('panel', 'AlternC panel access', 'NONE', '%SUB% IN A @@PUBLIC_IP@@', 'vhost,url,ip,webmail,ipv6,cname,txt',true, false, 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', 'DOMAIN', '%SUB% IN MX 5 %TARGET%', 'vhost,url,ip,webmail,ipv6,cname,txt,mx,mx2',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