]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Just dump the lease, not any runtime options.
authorRoy Marples <roy@marples.name>
Tue, 24 Aug 2010 10:04:10 +0000 (10:04 +0000)
committerRoy Marples <roy@marples.name>
Tue, 24 Aug 2010 10:04:10 +0000 (10:04 +0000)
dhcpcd.c

index 50ce393821d3a00e7ba9124b80bb9965a0a52941..4a20f0d1f0a0982b7337878fdaffb1617a7146b8 100644 (file)
--- a/dhcpcd.c
+++ b/dhcpcd.c
@@ -1776,8 +1776,9 @@ main(int argc, char **argv)
                snprintf(iface->leasefile, sizeof(iface->leasefile),
                    LEASEFILE, iface->name);
                iface->state = xzalloc(sizeof(*iface->state));
-               select_profile(iface, NULL);
-               add_options(iface->state->options, argc, argv);
+               iface->state->options = xzalloc(sizeof(*iface->state->options));
+               strlcpy(iface->state->options->script, if_options->script,
+                   sizeof(iface->state->options->script));
                iface->state->new = read_lease(iface);
                if (iface->state->new == NULL && errno == ENOENT) {
                        syslog(LOG_ERR, "%s: no lease to dump", iface->name);