[vox-tech] my computer has no name

Troy Arnold vox-tech@lists.lugod.org
Sat, 3 May 2003 18:43:50 -0700


On Sat, May 03, 2003 at 05:49:05PM -0700, Peter Jay Salzman wrote:
> apache refuses to run.  using strace, i figured out it's because apache
> doesn't know my system's name (i wish it printed some kind of error
> msg instead of forcing me to use strace).
> 
> using strace again on hostname led me to look at uname.
> 
> using strace on uname led me to a system call named uname().
> 
> looking at the man page for uname() led me to what i believe to be why
> apache isn't running on my system:
> 
>    satan# cat /proc/sys/kernel/hostname
>    (none)
> 
> this is kernel data.  does anybody know how the kernel discovers the
> hostname?

On debian:
/etc/init.d/hostname.sh 

#
# hostname.sh	Set hostname.
#
# Version:	@(#)hostname.sh  1.10  26-Feb-2001  miquels@cistron.nl
#

if [ -f /etc/hostname ]
then
	hostname --file /etc/hostname
fi