config: Minor indentation fixes

This commit is contained in:
Sunil Mohan Adapa 2016-11-12 08:31:39 +05:30 committed by James Valleroy
parent d0a85b3c57
commit 6bacd6bb04
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -20,17 +20,17 @@ domainname="$1"
hostname=$(hostname)
if [ -z "$domainname" ] ; then
if grep -q 127.0.1.1 /etc/hosts ; then
sed -i "s/127.0.1.1.*/127.0.1.1 $hostname/" /etc/hosts
else
sed -i "/127.0.0.1.*/a \
127.0.1.1 $hostname" /etc/hosts
fi
if grep -q 127.0.1.1 /etc/hosts ; then
sed -i "s/127.0.1.1.*/127.0.1.1 $hostname/" /etc/hosts
else
sed -i "/127.0.0.1.*/a \
127.0.1.1 $hostname" /etc/hosts
fi
else
if grep -q 127.0.1.1 /etc/hosts ; then
sed -i "s/127.0.1.1.*/127.0.1.1 $hostname.$domainname $hostname/" /etc/hosts
else
sed -i "/127.0.0.1.*/a \
127.0.1.1 $hostname.$domainname $hostname" /etc/hosts
fi
if grep -q 127.0.1.1 /etc/hosts ; then
sed -i "s/127.0.1.1.*/127.0.1.1 $hostname.$domainname $hostname/" /etc/hosts
else
sed -i "/127.0.0.1.*/a \
127.0.1.1 $hostname.$domainname $hostname" /etc/hosts
fi
fi