Update device hostname based on Organization name

19 views
Skip to first unread message

João Henrique Albuquerque

unread,
Oct 14, 2019, 3:48:21 PM10/14/19
to OpenWISP

Hi is it possible to customize the hostname default with netjson config?
I would like to add a prefix on the devices hostname separete by a common value. Today I'm using underscore '_' which dosen't allow registration.
After subscribing I would have something like 'OrgName_APMAC'

Ideally I would like to keep the underscore but I understand this could be an issue with the RFC for the hostname.

Cheers

Federico Capoano

unread,
Oct 14, 2019, 6:10:53 PM10/14/19
to OpenWISP
Hi João,

at the moment there's no built-in openwisp feature to automate this.

What you can do is to create a custom OpenWRT image which has a script which automatically sets the hostname based on your requirements.


Federico

--
You received this message because you are subscribed to the Google Groups "OpenWISP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openwisp+u...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/openwisp/71682af9-587b-4848-9321-56f8583607e5%40googlegroups.com.

João Henrique Albuquerque

unread,
Oct 15, 2019, 3:58:27 PM10/15/19
to open...@googlegroups.com
Hi Federico thanks for the feedback. I'll look into it the uci defaults.

Do you guys intend to support the "_" as part of the hostname?  Can I manually disable this verification on the sever?


Federico Capoano

unread,
Oct 15, 2019, 4:51:35 PM10/15/19
to OpenWISP
On Tue, Oct 15, 2019 at 4:58 PM João Henrique Albuquerque <joaoh...@gmail.com> wrote:
Hi Federico thanks for the feedback. I'll look into it the uci defaults.

Welcome. 
 
Do you guys intend to support the "_" as part of the hostname?  Can I manually disable this verification on the sever?

I suggest you to use "-" in place of "_", which makes it a valid hostname.

Federico 
 

Em seg, 14 de out de 2019 às 19:10, Federico Capoano <federico...@gmail.com> escreveu:
Hi João,

at the moment there's no built-in openwisp feature to automate this.

What you can do is to create a custom OpenWRT image which has a script which automatically sets the hostname based on your requirements.


Federico

On Mon, Oct 14, 2019 at 4:48 PM João Henrique Albuquerque <joaoh...@gmail.com> wrote:

Hi is it possible to customize the hostname default with netjson config?
I would like to add a prefix on the devices hostname separete by a common value. Today I'm using underscore '_' which dosen't allow registration.
After subscribing I would have something like 'OrgName_APMAC'

Ideally I would like to keep the underscore but I understand this could be an issue with the RFC for the hostname.

Cheers

--
You received this message because you are subscribed to the Google Groups "OpenWISP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openwisp+u...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/openwisp/71682af9-587b-4848-9321-56f8583607e5%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "OpenWISP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openwisp+u...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/openwisp/CAERYH6WDV%3DfivKef5NHZYuo%2Bb%2BPMKTxVoZnK%3Dnb8s3KD2xrVXA%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "OpenWISP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openwisp+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages