This document is for folks who don't want all of the features of the
various packages contained in change-sun-hostid but just want to "get
on with it" and simply change the hostid reported by their system for
all processes without making any permanent changes to the hardware.

Sections are included for both Solaris 2.x and Sun OS 4.1.x

hostids are always specified in hexadecimal notation.

------------------------------------------------------------------------
Quick start for Sun OS 4.1.x, Solaris 1.x

1. compile the program hid.c using the command
    cc -o hid hid.c

2. To change the hostid reported by gethostid only until the next
   reboot execute (as root)

   hid <desired_hostid> | sh

e.g.

ratatosk% cc -o hid hid.c
ratatosk% su 
Password:
ratatosk# ./hid deadbeef | sh
physmem 3fe7
_gethostid+4:   0x1137ab6f      =       0x1137ab6f
_gethostid+8:   0x901222ef      =       0x901222ef
ratatosk# hostid
deadbeef
ratatosk# lmhostid
lmhostid - Copyright (C) 1989, 1993 Globetrotter Software, Inc.
The FLEXlm host ID of this machine is "deadbeef"

3. to change the hostid so that it is the same after the next reboot, 
   just add the hid command above to your /etc/rc.local (with full paths)

e.g.
a)  install hid in /usr/etc
b)  add the following to /etc/rc.local
    if [ -f /usr/etc/hid ] ; then
        /usr/etc/hid deadbeef | /bin/sh
    fi

Of course, /etc/rc.local is executed sequentially, so you'll want to 
add these lines BEFORE starting any licence managers which depend on the
hostid. 

------------------------------------------------------------------------

Quick Start for Solaris 2.4/2.5/2.5.1 (probably also 2.3, but untested)

1. If you are on a non-INTEL/x86 machine you'll need to have a compiler 
   and compile hid2 (e.g. gcc -o hid2 hid2.c -lelf). A precompiled binary
   is provided for SPARC and INTEL platforms, so this step is not necessary
   for folks with SPARC/x86 workstations. The x86 binary is hid2.x86, so if
   you are on a x86 machine substitute hid2.x86 for hid2 in the instructions
   below.

2. To change the hostid until the next reboot:
   as root using the hid2 binary
   hid2 <desired_hostid>

e.g.
squirrel% su
Password: 
# ./hid2 deadbeef
current hostid is 0x80808080
setting hostid to 0xdeadbeef
# /usr/ucb/hostid
deadbeef
# lmhostid
lmhostid - Copyright (C) 1989-1994 Globetrotter Software, Inc.
The FLEXlm host ID of this machine is "deadbeef"

3. To change the hostid across reboots, install hid2 somewhere
   and make a file in /etc/rc2.d or /etc/rc3.d which executes hid2.
   Of course, you'll want to make sure that hid2 gets executed before
   any licence managers.

e.g. (as root)
cp hid2 /usr/sbin
cat <<EOF >/etc/rc2.d/S50hostid
#!/bin/sh

if [ -f /usr/sbin/hid2 ] ; then
    /usr/sbin/hid2 deadbeef
fi
EOF
chmod 755 /etc/rc2.d/S50hostid
