
Hi!
In grml dhclient is running in background to obtain an DHCP address on startup. But how do I know, when it has finished, and how can I execute some custom commands afterwards?
Regards, Christian

Hi, * Christian Kollmann nodh1@gmx.at [2006-08-22 03:45]:
In grml dhclient is running in background to obtain an DHCP address on startup. But how do I know, when it has finished,
If you come back to the commandline or get a DHCPACK from.... bound to <ip>... message
and how can I execute some custom commands afterwards?
Are you executing it from the command line or via init scripts? Kind regards Nico

* Christian Kollmann c.kollmann@gmx.net [20060826 10:15]:
Nico Golde wrote:
and how can I execute some custom commands afterwards?
Are you executing it from the command line or via init scripts?
via init script, so I can???t "come back" to the commandline ;-)
The dhcp request (it's 'pump' and not dhclient) is running in the background to speed up booting.
What you could do for example:
* execute ip-screen in your initscript and check it's output or use another program to check for current state of network
* grep for something like 'dhclient: DHCPACK from' in the logs
* boot using "grml nodhcp" and execute dhclient/pump on your own
The last method gives you maximum flexibility, so possibly it's a good choice for your needs.
regards, -mika-

Incoming from Christian Kollmann:
In grml dhclient is running in background to obtain an DHCP address on startup. But how do I know, when it has finished, and how can I execute some custom commands afterwards?
I *always* have xconsole running in my user session, so I know everything about what the box is doing.
- startx into user X session.
- from xterm (et al) "su" (no dash "-"), which lets your root login use your user's XSESSION.
- as root, "xconsole -file /dev/xconsole -daemon -notify -exitOnFail &"
Enjoy the pretty messages. You might want to play with some Xresources:
*XConsole*text.scrollHorizontal: true *XConsole*font: -*-*-medium-r-*-*-*-90-*-*-*-*-iso8859-1 *XConsole*geometry: 596x114-4-4 *XConsole*foreground: wheat *XConsole*background: black *XConsole*scrollColor: wheat
Teilnehmer (5)
-
Christian Kollmann
-
Christian Kollmann
-
Michael Prokop
-
Nico Golde
-
s. keeling