.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd Jun 18, 2008
+.Dd Jun 30, 2008
.Dt DHCPCD 8 SMM
.Sh NAME
.Nm dhcpcd
.Nd an RFC 2131 compliant DHCP client
.Sh SYNOPSIS
.Nm
-.Op Fl dknpADEGLSTV
+.Op Fl dknpADEGKLSTV
.Op Fl c , -script Ar script
.Op Fl f , -config Ar file
.Op Fl h , -hostname Ar hostname
.Pp
So to stop dhcpcd from touching your DNS or MTU settings you would do:-
.D1 dhcpcd -C resolv.conf -C mtu eth0
+.It Fl K , -nodaemonise
+Don't daemonise when we acquire a lease.
+This disables the
+.Fl t, -timeout
+option.
+This is mainly useful for running under the control of another process, such
+as a debugger or a network manager.
.It Fl L , -noipv4ll
Don't use IPv4LL at all.
.It Fl O , -nooption Ar option
/* Don't set any optional arguments here so we retain POSIX
* compatibility with getopt */
-#define OPTS "c:df:h:i:kl:m:no:pr:s:t:u:xAC:DEF:GI:LO:TV"
+#define OPTS "c:df:h:i:kl:m:no:pr:s:t:u:xAC:DEF:GI:KLO:TV"
static int doversion = 0;
static int dohelp = 0;
{"fqdn", optional_argument, NULL, 'F'},
{"nogateway", no_argument, NULL, 'G'},
{"clientid", optional_argument, NULL, 'I'},
+ {"nodaemonise", no_argument, NULL, 'K'},
{"noipv4ll", no_argument, NULL, 'L'},
{"nooption", optional_argument, NULL, 'O'},
{"test", no_argument, NULL, 'T'},
static void
usage(void)
{
- printf("usage: "PACKAGE" [-dknpxADEGHLOSTV] [-c script] [-f file ] [-h hostname]\n"
+ printf("usage: "PACKAGE" [-dknpxADEGHKLOTV] [-c script] [-f file ] [-h hostname]\n"
" [-i classID ] [-l leasetime] [-m metric] [-o option] [-r ipaddr]\n"
" [-s ipaddr] [-t timeout] [-u userclass] [-F none|ptr|both]\n"
" [-I clientID] [-C hookscript] <interface>\n");
options->options &= ~DHCPCD_CLIENTID;
}
break;
+ case 'K':
+ options->options &= ~DHCPCD_DAEMONISE;
+ break;
case 'L':
options->options &= ~DHCPCD_IPV4LL;
break;
}
}
+ if (!(options->options & DHCPCD_DAEMONISE))
+ options->timeout = 0;
+
if (IN_LINKLOCAL(ntohl(options->request_address.s_addr))) {
logger(LOG_ERR,
"you are not allowed to request a link local address");