]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Move -X to -B and give it a long option. This now complements the --background option.
authorRoy Marples <roy@marples.name>
Fri, 18 Jul 2008 09:17:52 +0000 (09:17 +0000)
committerRoy Marples <roy@marples.name>
Fri, 18 Jul 2008 09:17:52 +0000 (09:17 +0000)
dhcpcd.8.in
dhcpcd.c

index f5565b35f509bf06825a4cbaafd88d242b74547a..7316d5acfa8575baf25a3d565d58e315929b1e83 100644 (file)
@@ -29,7 +29,7 @@
 .Nd an RFC 2131 compliant DHCP client
 .Sh SYNOPSIS
 .Nm
-.Op Fl bdknpqADEGKLSTVX
+.Op Fl bdknpqABDEGKLSTV
 .Op Fl c , -script Ar script
 .Op Fl f , -config Ar file
 .Op Fl h , -hostname Ar hostname
@@ -319,6 +319,10 @@ The messages are still logged though.
 .It Fl A , -noarp
 Don't request or claim the address by ARP.
 This also disables IPv4LL.
+.It Fl B , -nobackground
+Don't run in the background when we acquire a lease.
+This is mainly useful for running under the control of another process, such
+as a debugger or a network manager.
 .It Fl C , -nohook Ar script
 Don't run this hook script.
 Matches full name, or prefixed with 2 numbers optionally ending with
@@ -347,10 +351,6 @@ files.
 .It Fl V, -variables
 Display a list of option codes and the associated variable for use in
 .Xr dhcpcd-run-hooks 8 .
-.It Fl X , -nodaemonise
-Don't daemonise when we acquire a lease.
-This is mainly useful for running under the control of another process, such
-as a debugger or a network manager.
 .El
 .Sh NOTES
 .Nm
index 1ca50c64ad28e535f80f88061af8c0c12321c7e3..dfa435a15c949f700c5c65104f417577a4602114 100644 (file)
--- a/dhcpcd.c
+++ b/dhcpcd.c
@@ -52,7 +52,7 @@ const char copyright[] = "Copyright (c) 2006-2008 Roy Marples";
 
 /* Don't set any optional arguments here so we retain POSIX
  * compatibility with getopt */
-#define OPTS "bc:df:h:i:kl:m:no:pqr:s:t:u:v:xAC:DEF:GI:KLO:TVX"
+#define OPTS "bc:df:h:i:kl:m:no:pqr:s:t:u:v:xABC:DEF:GI:KLO:TV"
 
 static int doversion = 0;
 static int dohelp = 0;
@@ -77,6 +77,7 @@ static const struct option longopts[] = {
        {"vendor",      required_argument,  NULL, 'v'},
        {"exit",        no_argument,        NULL, 'x'},
        {"noarp",       no_argument,        NULL, 'A'},
+       {"nobackground",no_argument,        NULL, 'B'},
        {"nohook",      required_argument,  NULL, 'C'},
        {"duid",        no_argument,        NULL, 'D'},
        {"lastlease",   no_argument,        NULL, 'E'},
@@ -485,6 +486,9 @@ parse_option(int opt, char *oarg, struct options *options)
                /* IPv4LL requires ARP */
                options->options &= ~DHCPCD_IPV4LL;
                break;
+       case 'B':
+               options->options &= ~DHCPCD_DAEMONISE;
+               break;
        case 'C':
                /* Commas to spaces for shell */
                while ((p = strchr(oarg, ',')))
@@ -557,9 +561,6 @@ parse_option(int opt, char *oarg, struct options *options)
                        return -1;
                }
                break;
-       case 'X':
-               options->options &= ~DHCPCD_DAEMONISE;
-               break;
        default:
                return 0;
        }