BytemarkHosting / symbiosis

A hosting environment that works with you, not against you.
GNU General Public License v2.0
21 stars 14 forks source link

common: postinst needs to check for a better valid hostname #57

Closed patch0 closed 7 years ago

patch0 commented 7 years ago

The HOSTNAME env variable doesn't tend to bell

It should probably check against a regexp for the presence of a dot in the $HOSTNAME env variable:

/^[_a-z0-9-]+\.([_a-z0-9-]+\.?)+$/

would do the trick

Originally reported on Bytemark's Gitlab by @patch0 on 2017-04-21T19:29:30.820Z

patch0 commented 7 years ago

I think this was following testing inside docker containers, where HOSTNAME gets set weirdly, and really shouldn't be used.

telyn commented 7 years ago

it's causing similar problems with systemd containers i think

telyn commented 7 years ago

Is this bug meant to fix-up invalid $HOSTNAMEs by appending '.localdomain', or just complain early in the install process?