From cf699586812e833709ce67083dd289d3b34f0b69 Mon Sep 17 00:00:00 2001 From: ADAM David Alan Martin Date: Wed, 2 Jul 2025 12:14:57 -0400 Subject: [PATCH] Add support for virtual hostnames. Sometimes I can't change the hostname, despite it being on my network and having `root`. For those cases, I'll make the virtual hostname match DNS, at least. A future improvement might be to get this from reverse DNS? --- tcshrc.system.common | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tcshrc.system.common b/tcshrc.system.common index 511d65e..b617a06 100644 --- a/tcshrc.system.common +++ b/tcshrc.system.common @@ -147,6 +147,14 @@ if( $?CSHENV_DEBUG ) then echo "Hostname detected as ${CSHENV_HOSTNAME}..." endif +if( $?CSHENV_VIRTUAL_HOSTNAME ) then + setenv CSHENV_HOSTNAME ${CSHENV_VIRTUAL_HOSTNAME} + if( $?CSHENV_DEBUG ) then + echo "Hostname overriden as ${CSHENV_HOSTNAME}..." + endif +endif + + if( $?CSHENV_DEBUG ) then echo "Done sourcing tcshrc.system.common" endif