diff --git a/core/debian/changelog b/core/debian/changelog index b0861b5ef8b32978e48f95e864d4cc9d3f9d35dd..693606bb56aaf8ad0aaa784ff3f7c3f962dcb2df 100644 --- a/core/debian/changelog +++ b/core/debian/changelog @@ -1,3 +1,9 @@ +sympl-core (10.0.190702.1) stable; urgency=medium + + * Disabled hostname enforcement + + -- Paul Cammish Tue, 02 Jul 2019 17:00:58 +0100 + sympl-core (10.0.190702.0) stable; urgency=medium * Adjusted security permissions for domains Exim config files diff --git a/core/debian/postinst b/core/debian/postinst index 3d9894051efaafe8cbc8366130fc5d5debe45096..4f9fe83af158decc3f7762a8a4220dab99fe6e44 100755 --- a/core/debian/postinst +++ b/core/debian/postinst @@ -97,27 +97,27 @@ fi # partially mangled hosts files, but will deal with someone changing the # hostname but not also changing /etc/hosts # -if [ $( grep -c $_HOSTNAME '/etc/hosts' ) == 0 ]; then - echo "I: Updating hostname configuration with complete name." - if hostname -i > /dev/null ; then - hostname_ips="$( hostname -i )" - else - hostname_ips="127.0.1.1" - fi - sed -i "s|^$hostname_ips|# $hostname_ips|" '/etc/hosts' - sed -i "1i$hostname_ips\t$_HOSTNAME $( echo $_HOSTNAME | cut -d '.' -f 1 )" '/etc/hosts' - export HOSTNAME="$_HOSTNAME" - hostname -b "$_HOSTNAME" -fi +#if [ $( grep -c $_HOSTNAME '/etc/hosts' ) == 0 ]; then +# echo "I: Updating hostname configuration with complete name." +# if hostname -i > /dev/null ; then +# hostname_ips="$( hostname -i )" +# else +# hostname_ips="127.0.1.1" +# fi +# sed -i "s|^$hostname_ips|# $hostname_ips|" '/etc/hosts' +# sed -i "1i$hostname_ips\t$_HOSTNAME $( echo $_HOSTNAME | cut -d '.' -f 1 )" '/etc/hosts' +# export HOSTNAME="$_HOSTNAME" +# hostname -b "$_HOSTNAME" +#fi # # Enforce using the full hostname # -echo "I: Checking hostname configuration files." -if [ "$HOSTNAME" != "$_HOSTNAME" ]; then export HOSTNAME="$_HOSTNAME"; fi -if [ "$( hostname )" != "$_HOSTNAME" ]; then hostname -b "$_HOSTNAME" ; fi -if [ "$( cat /etc/hostname )" != "$_HOSTNAME" ]; then echo "$_HOSTNAME" > "/etc/hostname" ; fi -if [ -f "/etc/mailname" ] && [ "$( cat "/etc/mailname" )" != "$_HOSTNAME" ]; then echo "$_HOSTNAME" > "/etc/mailname" ; fi +#echo "I: Checking hostname configuration files." +#if [ "$HOSTNAME" != "$_HOSTNAME" ]; then export HOSTNAME="$_HOSTNAME"; fi +#if [ "$( hostname )" != "$_HOSTNAME" ]; then hostname -b "$_HOSTNAME" ; fi +#if [ "$( cat /etc/hostname )" != "$_HOSTNAME" ]; then echo "$_HOSTNAME" > "/etc/hostname" ; fi +#if [ -f "/etc/mailname" ] && [ "$( cat "/etc/mailname" )" != "$_HOSTNAME" ]; then echo "$_HOSTNAME" > "/etc/mailname" ; fi # # If there are no existing directories beneath /srv/ create the defaults.