On Monday 12 May 2008 18:34:32 Wojciech Puchar wrote:
> is there an option in dhclient (or other program) to try getting IP
> address but - don't set anything in system.
>
> i mean something to just check for dhcp servers.
>
> or maybe something that just detects what DHCP servers are available.

The largely undocumented dhclient_exit|enter_hooks are suitable for this. Look 
at the source of /sbin/dhclient-script.
In short, if you set exit_status to non-zero in /etc/dhclient-enter-hooks, 
nothing will be set. Some environment variables will be available to you, 
among which should be the ip of the dhcp server that responded. If you simply 
dump the env to stdout, you will see things available.

-- 
Mel

Problem with today's modular software: they start with the modules
    and never get to the software part.
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to