You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/12/29 07:59:43 UTC

[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on pull request #944: Add a system tool to get/set hostname

xiaoxiang781216 commented on pull request #944:
URL: https://github.com/apache/incubator-nuttx-apps/pull/944#issuecomment-1002444962


   > fwiw, `uname -n` can also be used to get the hostname, but it's not as intuitive, and doesn't support setting the hostname (which inspired adding the tool).
   
   It's fine to add hostname program since it exists on FreeBSD/Linux too.
   
   
   > A related question: I want to automatically include a unique identifier from the board, eg network mac address or something, in the hostname. What do you think the best way to achieve that would be? Obviously writing a small userspace tool to generate the hostname which can be fed to the `hostname` tool via back quotes would work, but maybe an option to append `BOARDCTL_UNIQUEID` to `LIBC_HOSTNAME` would be viable? 
   
   you can create a PR and see the feedback from other.
   
   > I'd prefer to avoid it in `board_app_initialize`. (Also I noticed `NETUTILS_DHCPC_HOST_NAME`, maybe it should just be replace with `LIBC_HOSTNAME` these days?)
   
   or let `NETUTILS_DHCPC_HOST_NAME` default value to `LIBC_HOSTNAME`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org