<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
<font class="Apple-style-span" face="Tahoma" size="2">Hi,</font><div style="font-family: Tahoma; font-size: 10pt; "><br></div><div style="font-family: Tahoma; font-size: 10pt; ">Thanks to all who explained -r -x.<br><div><br>> <br>> What version of dhcp do you use? Are you sure it's not some old release?<br>> <br><br></div><div><div>% dhclient --help</div><div>Internet Systems Consortium DHCP Client V3.1.3</div><div>Copyright 2004-2009 Internet Systems Consortium.</div><div>All rights reserved.</div><div>For info, please visit https://www.isc.org/software/dhcp/</div><div>Usage: dhclient [-1dqrx] [-nw] [-p <port>] [-s server]</div><div>                [-cf config-file] [-lf lease-file][-pf pid-file] [-e VAR=val]</div><div>                [-sf script-file] [interface]</div></div><div><br></div></div><div style="font-family: Tahoma; font-size: 10pt; ">and the man page states:</div><div style="font-family: Tahoma; font-size: 10pt; "><br></div><div><font class="Apple-style-span" face="Tahoma" size="2">" The -r flag</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> explicitly releases the current lease, and once the lease has been released, the client exits.</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"><br></font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> If the client is killed by a signal (for example at shutdown or reboot) it won't execute the dhclient-script  (8)</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> at  exit.  However  if  you  shut the client down gracefully with -r or -x it will execute dhclient-script (8) at</font></div><div><font class="Apple-style-span" face="Tahoma" size="2"> shutdown with the specific reason for calling the script set.</font></div><div style="font-family: Tahoma; font-size: 10pt; ">"</div><div style="font-family: Tahoma; font-size: 10pt; "><br></div><div style="font-family: Tahoma; font-size: 10pt; ">I know it is not the scope of this mailing list but here is my problem:</div><div style="font-family: Tahoma; font-size: 10pt; "><br></div><div style="font-family: Tahoma; font-size: 10pt; ">I was given, for my work a work-station loaded with Ubuntu 10.4. I do embedded work and I need a plain </div><div style="font-family: Tahoma; font-size: 10pt; ">server. So I started by stopping Gnome and I switched from DHCP to static IP. I did modify the </div><div style="font-family: Tahoma; font-size: 10pt; ">/etc/network/interfaces to switch from dynamic to static and I restarted the network. All fine I'm in static IP.</div><div style="font-family: Tahoma; font-size: 10pt; ">After some time I notice my server is back to DHCP mode. Did some search and noted the dhclient was still</div><div style="font-family: Tahoma; font-size: 10pt; ">alive. On a normal Unix system restarting the network solves this problem. Not with Ubuntu! Try the man page</div><div style="font-family: Tahoma; font-size: 10pt; ">to stop it. Not enough info. Search the /etc/init.d scripts for clues. Nothing! Search the Ubuntu groups and </div><div style="font-family: Tahoma; font-size: 10pt; ">found lots of people having the same problem. NO solution to the problem. The most common work-around </div><div style="font-family: Tahoma; font-size: 10pt; ">is to uninstall dhclient or to rename it. I know Ubuntu is not Unix - but this is too much of Windoze approach.</div><div style="font-family: Tahoma; font-size: 10pt; ">So I started to dig (on my time) for some reasonable and technically correct solution. I found the Ubuntu </div><div style="font-family: Tahoma; font-size: 10pt; ">network-manager is the culprit for restarting dhclient. I removed it. Now I am in the phase of adding some </div><div style="font-family: Tahoma; font-size: 10pt; ">code to /etc/init.d/networking script to properly stop the dhclient when the IP is set to static. I wasn't sure</div><div style="font-family: Tahoma; font-size: 10pt; ">which -r or -x to use. Hence my request.</div><div style="font-family: Tahoma; font-size: 10pt; "><br></div><div style="font-family: Tahoma; font-size: 10pt; ">Sorry for the long story and thanks for the lights!</div><div style="font-family: Tahoma; font-size: 10pt; "><br></div><div style="font-family: Tahoma; font-size: 10pt; ">Yours truly,</div><div style="font-family: Tahoma; font-size: 10pt; ">StephanT</div>                                         </body>
</html>