the-linux-schools-project / karoshi-client

Central repository for Karoshi Client development
http://linuxschools.org.uk
5 stars 6 forks source link

Instate maximum client name length #122

Closed Eldara98 closed 9 years ago

Eldara98 commented 9 years ago

Client names should not exceed 15 characters, as this causes issues. Instates maximum length check during karoshi-set-network

Fixes #120

cc: @Xenopathic

RobinMcCorkell commented 9 years ago

Use the double bracket syntax when performing numerical comparisons rather than double square brackets:

if (( ${#foobar} > 15 )); then ... fi

Also, make the error message more explicit. We shouldn't be asking the user to enter a hostname of 15 chars or less, we should be telling them that over 15 chars is bad. A straightforward 'Hostname must be 15 characters or less' will suffice :smile:

RobinMcCorkell commented 9 years ago

Thanks!