debian: fix initialization of /etc/hosts
This commit is contained in:
parent
36b1793739
commit
a2bba58877
2
debian/postinst
vendored
2
debian/postinst
vendored
@ -112,7 +112,7 @@ case "$1" in
|
|||||||
sed -i "/^${ip}\s/,+0s/\(\s`hostname`\)\+\(\s\|$\)/\2/g" /etc/hosts
|
sed -i "/^${ip}\s/,+0s/\(\s`hostname`\)\+\(\s\|$\)/\2/g" /etc/hosts
|
||||||
sed -i "s/^${ip}\(\s\|$\).*$/\0 `hostname`/" /etc/hosts
|
sed -i "s/^${ip}\(\s\|$\).*$/\0 `hostname`/" /etc/hosts
|
||||||
else
|
else
|
||||||
echo "${ip} `hostname`" >> /etc/hosts
|
echo "${ip//\\/} `hostname`" >> /etc/hosts
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
# remove hostname from 127.0.0.1 line (in debian the hostname is by default
|
# remove hostname from 127.0.0.1 line (in debian the hostname is by default
|
||||||
|
Loading…
Reference in New Issue
Block a user