Merge "add reverse dns support" into dev/experimental
This commit is contained in:
commit
2fe3c81083
@ -56,6 +56,10 @@ sudo sed -i "s/server:[ \t]*\$ipaddr/server: $IPADDR/g" /etc/cobbler/settings
|
|||||||
sudo sed -i "s/default_name_servers:[ \t]*\['\$ipaddr'\]/default_name_servers: \['$IPADDR'\]/g" /etc/cobbler/settings
|
sudo sed -i "s/default_name_servers:[ \t]*\['\$ipaddr'\]/default_name_servers: \['$IPADDR'\]/g" /etc/cobbler/settings
|
||||||
domains=$(echo $NAMESERVER_DOMAINS | sed "s/,/','/g")
|
domains=$(echo $NAMESERVER_DOMAINS | sed "s/,/','/g")
|
||||||
sudo sed -i "s/manage_forward_zones:[ \t]*\[\]/manage_forward_zones: \['$domains'\]/g" /etc/cobbler/settings
|
sudo sed -i "s/manage_forward_zones:[ \t]*\[\]/manage_forward_zones: \['$domains'\]/g" /etc/cobbler/settings
|
||||||
|
if [[ "$NAMESERVER_REVERSE_ZONES" != "unused" ]]; then
|
||||||
|
reverse_zones=$(echo $NAMESERVER_REVERSE_ZONES | sed "s/,/','/g")
|
||||||
|
sudo sed -i "s/manage_reverse_zones:[ \t]*\[\]/manage_reverse_zones: \['$reverse_zones'\]/g" /etc/cobbler/settings
|
||||||
|
fi
|
||||||
export cobbler_passwd=$(openssl passwd -1 -salt 'huawei' '123456')
|
export cobbler_passwd=$(openssl passwd -1 -salt 'huawei' '123456')
|
||||||
sudo sed -i "s,^default_password_crypted:[ \t]\+\"\(.*\)\",default_password_crypted: \"$cobbler_passwd\",g" /etc/cobbler/settings
|
sudo sed -i "s,^default_password_crypted:[ \t]\+\"\(.*\)\",default_password_crypted: \"$cobbler_passwd\",g" /etc/cobbler/settings
|
||||||
sudo chmod 644 /etc/cobbler/settings
|
sudo chmod 644 /etc/cobbler/settings
|
||||||
|
@ -24,6 +24,7 @@ export NEXTSERVER=${NEXTSERVER:-}
|
|||||||
|
|
||||||
# the domains covered by nameserver
|
# the domains covered by nameserver
|
||||||
export NAMESERVER_DOMAINS=${NAMESERVER_DOMAINS:-}
|
export NAMESERVER_DOMAINS=${NAMESERVER_DOMAINS:-}
|
||||||
|
export NAMESERVER_REVERSE_ZONES=${NAMESERVER_REVERSE_ZONES:-}
|
||||||
|
|
||||||
# set the default cobbler user "cobbler" password, if not set, the default will be cobbler/cobbler
|
# set the default cobbler user "cobbler" password, if not set, the default will be cobbler/cobbler
|
||||||
export CBLR_USER=${CBLR_USER:-}
|
export CBLR_USER=${CBLR_USER:-}
|
||||||
|
@ -28,6 +28,8 @@ export IP_END=`echo $IPADDR |cut -d. -f'1 2 3'`.254
|
|||||||
export NEXTSERVER=`ifconfig $NIC | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'`
|
export NEXTSERVER=`ifconfig $NIC | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'`
|
||||||
# the domains covered by nameserver
|
# the domains covered by nameserver
|
||||||
export NAMESERVER_DOMAINS=ods.com
|
export NAMESERVER_DOMAINS=ods.com
|
||||||
|
export NAMESERVER_REVERSE_ZONES=unused
|
||||||
|
|
||||||
# the repo url
|
# the repo url
|
||||||
export WEB_SOURCE='http://git.openstack.org/stackforge'/compass-web
|
export WEB_SOURCE='http://git.openstack.org/stackforge'/compass-web
|
||||||
export ADAPTERS_SOURCE='http://git.openstack.org/stackforge/compass-adapters'
|
export ADAPTERS_SOURCE='http://git.openstack.org/stackforge/compass-adapters'
|
||||||
|
@ -247,6 +247,7 @@ if [[ -z $LOCAL_REPO ]]; then
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
loadvars NAMESERVER_DOMAINS "ods.com"
|
loadvars NAMESERVER_DOMAINS "ods.com"
|
||||||
|
loadvars NAMESERVER_REVERSE_ZONES "unused"
|
||||||
loadvars WEB_SOURCE 'http://git.openstack.org/stackforge/compass-web'
|
loadvars WEB_SOURCE 'http://git.openstack.org/stackforge/compass-web'
|
||||||
loadvars ADAPTERS_SOURCE 'http://git.openstack.org/stackforge/compass-adapters'
|
loadvars ADAPTERS_SOURCE 'http://git.openstack.org/stackforge/compass-adapters'
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@ WEB_SOURCE=\${WEB_SOURCE:-$WEB_SOURCE}
|
|||||||
ADAPTERS_SOURCE=\${ADAPTERS_SOURCE:-$ADAPTERS_SOURCE}
|
ADAPTERS_SOURCE=\${ADAPTERS_SOURCE:-$ADAPTERS_SOURCE}
|
||||||
OPTION_ROUTER=\${OPTION_ROUTER:-$OPTION_ROUTER}
|
OPTION_ROUTER=\${OPTION_ROUTER:-$OPTION_ROUTER}
|
||||||
NAMESERVER_DOMAINS=\${NAMESERVER_DOMAINS:-$NAMESERVER_DOMAINS}
|
NAMESERVER_DOMAINS=\${NAMESERVER_DOMAINS:-$NAMESERVER_DOMAINS}
|
||||||
|
NAMESERVER_REVERSE_ZONES=\${NAMESERVER_REVERSE_ZONES:-$NAMESERVER_REVERSE_ZONES}
|
||||||
NEXTSERVER=\${NEXTSERVER:-$NEXTSERVER}
|
NEXTSERVER=\${NEXTSERVER:-$NEXTSERVER}
|
||||||
IP_START=\${IP_START:-$IP_START}
|
IP_START=\${IP_START:-$IP_START}
|
||||||
IP_END=\${IP_END:-$IP_END}
|
IP_END=\${IP_END:-$IP_END}
|
||||||
|
Loading…
Reference in New Issue
Block a user