[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Re: Getty is spawning to early



Tim Heckman wrote:
> I've created a dhclient-exit-hook script to handle the processing.
> This checks whether the hostname should be set and completes the
> process. Only sets it if it really is needed.

Ah, very good.  In this case it is six of one and a half dozen of the
other.  Either way should be fine.

> Luckily the two of these issues won't come in to play here.  This is
> going to be used on a system that does not have X installed and will
> have a static IP address.  We use DHCP to assign the address as it
> is easier to deploy a new distribution for our customers.

The language you are using is confusing.  If it has a static address
then you wouldn't be assigning it using dhcp.

I think you really mean to say that you have your dhcp server
configured to assign addresses by ethernet address?  So that the dhcpd
will always be assigning the same address?  That isn't the same as a
static ip address.

File /etc/network/interfaces with a static address:

  iface eth0 inet static
          address 192.168.1.101
          netmask 255.255.255.0
          gateway 192.168.1.1
          dns-search example.com
          dns-nameservers 0.0.0.0  # local caching named

File /etc/network/interfaces with a dynamically assigned address:

  iface eth0 inet dhcp

The language used can really confuse things sometimes.

> The last time dhclient was attempted with this would have been on
> Debian 5.0.  In our most recent Debian 6.0 template someone decided
> to use dhcpcd,

What were they using before?

> but it requires additional configuration for someone to set their
> own hostname later on.  Not an ideal situation as it is not the
> default dhcp system and so people do not expect it.

Sorry but I don't understand.  DHCP normally does not set the
hostname.  Normally DHCP only sets the network device address and
associated configuration such as gateway and nameservers.  Trying to
set the name from the dhcp server isn't very common.  People have done
it on occasion.  But it definitely isn't the mainstream.

> >In my case I ended up setting the hostname to localhost.  Since the
> >client machines are true thin clients without any external services
> >they don't need to have a hostname.  That worked best for me.  Perhaps
> >it is something that might be a good option for you?  Then it would be
> >very similar to any live-cd boot system.
> 
> This doesn't work unfortunately.  I work for a popular
> cloud-services (VPS) provider and this is the template that is being
> built for deployment of Debian 6.0 systems moving forward.  This is
> the only thing holding me back from being able to replace the
> current template.

So you are actually trying to build a virtual machine disk image.
That's great.  But that doesn't explain why you can't simply assign a
hostname then.  I am sure you have a good reason but just haven't said
yet why your hostname must be tied to the IP address.  Instead of
being independent of it.

Every VPS I have used assigned me one or more IP addresses.  That was
set up in /etc/network/interfaces as a static assignment.  At that
point the choice of hostname was mine to make.

> The purpose of this configuration is for a customer to deploy this
> distribution template and be assigned an IP address, a hostname that
> is not personal, and be good to go.  They can then override dhcp
> setting the hostname by placing information in '/etc/hostname'.

I am still not seeing why you can't simply assign the IP address and
then let the client pick their own hostname as they want.

> It's a unique use-case, but in theory it should work.  Getty is just
> a bit too energetic.  :p

If you are setting up a virtual machine image then that isn't that
unique of a case.  :-)

> Thanks for the insight and input, Bob.  If I wish I would be able to
> use one of your recommendations as it would be easier.  But just
> doesn't fit my needs.

I am sure you have reasons but so far I don't see it yet.

Good luck!
Bob

Attachment: signature.asc
Description: Digital signature


Reply to: