Stephen Bennett ha scritto:

On Wed, 2005-02-16 at 19:13 +0100, Malte S. Stretz wrote:


You might also want to try
sysctl -n kernel.hostname



Except that on FreeBSD and Darwin/MacOS at least the sysctl is
'kern.hostname'.


digging around

# qpkg -f $(which hostname)
sys-apps/net-tools *

# qpkg -f $(which uname)
sys-apps/coreutils *

# qpkg -f $(which sysctl)
sys-apps/procps *

Looking at old and new stuff in /usr/portage/profiles/ and considering the previous emails

   hostname="$(hostname 2>/dev/null)"
   hostname="${hostname%%.*}"
   if [[ -z "${hostname}" ]] ; then
       # uh on what arch/os are you ? I will give you another possibility
       hostname=$(uname -n 2>/dev/null)
       if [[ -z "${hostname}" ]] ; then
           # hey dude we do not support windoz !
           hostname="noname"
       fi
   fi

   # recursive "${thanks}"


-- [email protected] mailing list



Reply via email to