Probleme quand le FQDN a des majuscules
This commit is contained in:
Alan Garcia 2013-01-21 16:23:23 +00:00
parent 68ae215739
commit dd1fd2bf0b
1 changed files with 10 additions and 3 deletions

13
debian/alternc.config vendored
View File

@ -27,7 +27,7 @@ MYSQL_PASS="`perl -e 'print map{("a".."z","A".."Z",0..9)[int(rand(62))]}(1..10)'
MYSQL_MAIL_USER=alternc_user
MYSQL_MAIL_PASS="`perl -e 'print map{("a".."z","A".."Z",0..9)[int(rand(62))]}(1..10)' `"
MYSQL_CLIENT=localhost
FQDN="`cat /etc/mailname 2>/dev/null || hostname -f`"
FQDN="`(cat /etc/mailname 2>/dev/null || hostname -f)|tr '[:upper:]' '[:lower:]'`"
INTERNAL_IP="`env LANG=C /sbin/ifconfig|grep inet | grep -v 127.0.0.1| head -1 | cut -d: -f2 | sed -e 's/\([0-9\.]*\).*$/\1/' 2>/dev/null || hostname -f`"
PUBLIC_IP="$INTERNAL_IP"
DEFAULT_MX="`cat /etc/mailname 2>/dev/null || hostname -f`"
@ -47,7 +47,14 @@ fi
db_set alternc/hostingname "$HOSTING"
db_set alternc/desktopname "$FQDN"
db_input high alternc/hostingname || true
# Get the FQDN
db_input high alternc/desktopname || true
# Be sure that the FQDN is lowercase (Bug #1405)
db_get alternc/desktopname
db_set alternc/desktopname "`echo $RET | tr '[:upper:]' '[:lower:]'`"
# End bug #1405
db_go || true
#we ask for the public and private ip
db_set alternc/public_ip "$PUBLIC_IP"
@ -56,7 +63,7 @@ while [ $STATE -eq 0 ]; do
db_input high alternc/public_ip || true
db_go
db_get alternc/public_ip
ip=$RET
ip="$RET"
if [ $(echo $ip |egrep '(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1)$') ]; then
db_input high alternc/use_private_ip || true
db_go
@ -213,7 +220,7 @@ fi
db_get alternc/desktopname
if [ -z "$RET" ]
then
db_set alternc/desktopname "$FQDN"
db_set alternc/desktopname "$FQDN"
fi
db_get alternc/public_ip