diff -urN linux/include/linux/uts.h linux-2.2.5-hostname/include/linux/uts.h --- linux/include/linux/uts.h Mon Jan 5 09:41:01 1998 +++ linux-2.2.5-hostname/include/linux/uts.h Tue Apr 6 15:17:26 1999 @@ -13,7 +13,7 @@ #endif #ifndef UTS_NODENAME -#define UTS_NODENAME "(none)" /* set by sethostname() */ +#define UTS_NODENAME "(none)" /* set by sethostname() or hostname= boot param. */ #endif #ifndef UTS_DOMAINNAME diff -urN linux/init/main.c linux-2.2.5-hostname/init/main.c --- linux/init/main.c Thu Feb 25 00:27:54 1999 +++ linux-2.2.5-hostname/init/main.c Tue Apr 6 15:16:15 1999 @@ -389,6 +389,17 @@ prof_shift = 2; } +static void __init hostname_setup(char *str, int *ints) +{ + int len; + + len = strlen(str); + if (len && len <= __NEW_UTS_LEN) { + strcpy(system_utsname.nodename, str); + system_utsname.nodename[len] = 0; + } + printk(KERN_INFO "hostname: %s\n", system_utsname.nodename); +} static struct dev_name_struct { const char *name; @@ -540,6 +551,7 @@ { "reserve=", pnp_reserve_setup }, #endif { "profile=", profile_setup }, + { "hostname=", hostname_setup }, #ifdef __SMP__ { "nosmp", smp_setup }, { "maxcpus=", smp_setup }, .