Update setupPublicCurl.sh

Add the fqdn to /etc/hosts file becouse if you only add the hostname then it is posible to lose the fqdn
changed expected script adding  "`hostname -f` "
Added "-s" option to ensure to get the short name
Added "-s" option to ensure search using the short name
This commit is contained in:
Hugo Viejo 2015-03-10 16:00:05 +01:00 committed by Ignasi Barrera
parent 9b66c23c02
commit b54c788e7c
9 changed files with 9 additions and 9 deletions

View File

@ -121,7 +121,7 @@ function ensure_hostname_in_hosts() {
local ipaddr=`hostname -i`
}
# NOTE: we blindly trust existing hostname settings in /etc/hosts
egrep -q `hostname` /etc/hosts || echo "$ipaddr `hostname`" >> /etc/hosts
egrep -q `hostname -s` /etc/hosts || echo "$ipaddr `hostname -f` `hostname -s`" >> /etc/hosts
}
# download locations for many services are at public dns

View File

@ -121,7 +121,7 @@ function ensure_hostname_in_hosts() {
local ipaddr=`hostname -i`
}
# NOTE: we blindly trust existing hostname settings in /etc/hosts
egrep -q `hostname` /etc/hosts || echo "$ipaddr `hostname`" >> /etc/hosts
egrep -q `hostname -s` /etc/hosts || echo "$ipaddr `hostname -f` `hostname -s`" >> /etc/hosts
}
# download locations for many services are at public dns

View File

@ -121,7 +121,7 @@ function ensure_hostname_in_hosts() {
local ipaddr=`hostname -i`
}
# NOTE: we blindly trust existing hostname settings in /etc/hosts
egrep -q `hostname` /etc/hosts || echo "$ipaddr `hostname`" >> /etc/hosts
egrep -q `hostname -s` /etc/hosts || echo "$ipaddr `hostname -f` `hostname -s`" >> /etc/hosts
}
# download locations for many services are at public dns

View File

@ -52,7 +52,7 @@ function ensure_hostname_in_hosts() {
local ipaddr=`hostname -i`
}
# NOTE: we blindly trust existing hostname settings in /etc/hosts
egrep -q `hostname` /etc/hosts || echo "$ipaddr `hostname`" >> /etc/hosts
egrep -q `hostname -s` /etc/hosts || echo "$ipaddr `hostname -f` `hostname -s`" >> /etc/hosts
}
# download locations for many services are at public dns

View File

@ -121,7 +121,7 @@ function ensure_hostname_in_hosts() {
local ipaddr=`hostname -i`
}
# NOTE: we blindly trust existing hostname settings in /etc/hosts
egrep -q `hostname` /etc/hosts || echo "$ipaddr `hostname`" >> /etc/hosts
egrep -q `hostname -s` /etc/hosts || echo "$ipaddr `hostname -f` `hostname -s`" >> /etc/hosts
}
# download locations for many services are at public dns

View File

@ -121,7 +121,7 @@ function ensure_hostname_in_hosts() {
local ipaddr=`hostname -i`
}
# NOTE: we blindly trust existing hostname settings in /etc/hosts
egrep -q `hostname` /etc/hosts || echo "$ipaddr `hostname`" >> /etc/hosts
egrep -q `hostname -s` /etc/hosts || echo "$ipaddr `hostname -f` `hostname -s`" >> /etc/hosts
}
# download locations for many services are at public dns

View File

@ -121,7 +121,7 @@ function ensure_hostname_in_hosts() {
local ipaddr=`hostname -i`
}
# NOTE: we blindly trust existing hostname settings in /etc/hosts
egrep -q `hostname` /etc/hosts || echo "$ipaddr `hostname`" >> /etc/hosts
egrep -q `hostname -s` /etc/hosts || echo "$ipaddr `hostname -f` `hostname -s`" >> /etc/hosts
}
# download locations for many services are at public dns

View File

@ -121,7 +121,7 @@ function ensure_hostname_in_hosts() {
local ipaddr=`hostname -i`
}
# NOTE: we blindly trust existing hostname settings in /etc/hosts
egrep -q `hostname` /etc/hosts || echo "$ipaddr `hostname`" >> /etc/hosts
egrep -q `hostname -s` /etc/hosts || echo "$ipaddr `hostname -f` `hostname -s`" >> /etc/hosts
}
# download locations for many services are at public dns

View File

@ -121,7 +121,7 @@ function ensure_hostname_in_hosts() {
local ipaddr=`hostname -i`
}
# NOTE: we blindly trust existing hostname settings in /etc/hosts
egrep -q `hostname` /etc/hosts || echo "$ipaddr `hostname`" >> /etc/hosts
egrep -q `hostname -s` /etc/hosts || echo "$ipaddr `hostname -f` `hostname -s`" >> /etc/hosts
}
# download locations for many services are at public dns