How to automate script to set network name during IGEL OS boot?


Hello,

Our company uses static IP addresses and static DNS entries. I am attempting to set the network name during boot via reverse DNS lookup. We’re running UMS 6.07.100 and UC5-LX 11.05.133.01.

Learn more, read the entire thread inside the IGEL Community o Slack

I found a script that I modified and I believe should work, I have tried it first under Network -> After network DNS and second under Base -> Final initialization command. I have also enabled “Adjust UMS-internal name if network name has changed”.

#!/bin/bash

RENAME=$(dig -x $(hostname -I) +short)

RENAME=${RENAME%%.*}

HOSTNAME=$(hostname)

if [“$RENAME” != “$HOSTNAME”]

then

setparam network.dns.hostname $RENAME

killall postsetupd

write_rmsettings

fi

If I run these commands via the local terminal I have had success, but I have not been able to automate them as of yet. I am new to Igel, am I doing something wrong, is there an easier way?

EDIT:

I also found a setting in the registry that looked promising, network.dns.hostname_dnslookup but haven’t gotten that to work either.

Thanks


Try setting it in Custom CommandsBaseInitialization. That’s where my script runs for renaming devices, and it has worked well. It does require a reboot.


I’ll give it a shot, I was assuming I would have to wait longer for the network to come up and DNS to work.

Moving it to initialization does not appear to have made a difference.


I put your code into a profile. See attached. Reboot needed for it to take after applied to system.

Continue reading and comment on the thread ‘How to automate script to set network name during IGEL OS boot?’.  Not a member? Join Here!

Learn more, search the IGEL Knowledge Base



Ask a question or comment on the above message thread?

Join or log in to the IGEL Community to ask us anything and meet other IGEL customers, partners, and EUC enthusiasts.

Submit a question, or Join Today!


Popular Message Threads


Categories & Tags: