1 diff -ruN busybox-1.2.0-old/include/usage.h busybox-1.2.0-new/include/usage.h
2 --- busybox-1.2.0-old/include/usage.h 2006-07-31 10:47:56.000000000 +0200
3 +++ busybox-1.2.0-new/include/usage.h 2006-07-31 11:08:49.000000000 +0200
5 "\t-n,\t--now\tExit with failure if lease cannot be immediately negotiated\n" \
6 "\t-p,\t--pidfile=file\tStore process ID of daemon in file\n" \
7 "\t-q,\t--quit\tQuit after obtaining lease\n" \
8 + "\t-R,\t--release\tRelease IP on quit\n" \
9 "\t-r,\t--request=IP\tIP address to request (default: none)\n" \
10 "\t-s,\t--script=file\tRun file at dhcp events (default: /usr/share/udhcpc/default.script)\n" \
11 "\t-t,\t--retries=NUM\tSend up to NUM request packets\n"\
12 diff -ruN busybox-1.2.0-old/networking/udhcp/dhcpc.c busybox-1.2.0-new/networking/udhcp/dhcpc.c
13 --- busybox-1.2.0-old/networking/udhcp/dhcpc.c 2006-07-01 00:42:02.000000000 +0200
14 +++ busybox-1.2.0-new/networking/udhcp/dhcpc.c 2006-07-31 11:08:49.000000000 +0200
16 .abort_if_no_lease = 0,
18 .quit_after_lease = 0,
19 + .release_on_quit = 0,
20 .background_if_no_lease = 0,
24 {"now", no_argument, 0, 'n'},
25 {"pidfile", required_argument, 0, 'p'},
26 {"quit", no_argument, 0, 'q'},
27 + {"release", no_argument, 0, 'R'},
28 {"request", required_argument, 0, 'r'},
29 {"script", required_argument, 0, 's'},
30 {"timeout", required_argument, 0, 'T'},
35 - c = getopt_long(argc, argv, "c:CV:fbH:h:F:i:np:qr:s:T:t:v", arg_options, &option_index);
36 + c = getopt_long(argc, argv, "c:CV:fbH:h:F:i:np:qRr:s:T:t:v", arg_options, &option_index);
42 client_config.quit_after_lease = 1;
45 + client_config.release_on_quit = 1;
48 requested_ip = inet_addr(optarg);
53 change_mode(LISTEN_NONE);
54 - if (client_config.quit_after_lease)
55 + if (client_config.quit_after_lease) {
56 + if (client_config.release_on_quit)
60 if (!client_config.foreground)
71 LOG(LOG_INFO, "Received SIGTERM");
72 + if (!client_config.release_on_quit)
78 } else if (retval == -1 && errno == EINTR) {
79 /* a signal was caught */
80 diff -ruN busybox-1.2.0-old/networking/udhcp/dhcpc.h busybox-1.2.0-new/networking/udhcp/dhcpc.h
81 --- busybox-1.2.0-old/networking/udhcp/dhcpc.h 2006-07-01 00:42:02.000000000 +0200
82 +++ busybox-1.2.0-new/networking/udhcp/dhcpc.h 2006-07-31 11:08:49.000000000 +0200
84 struct client_config_t {
85 char foreground; /* Do not fork */
86 char quit_after_lease; /* Quit after obtaining lease */
87 + char release_on_quit; /* perform release on quit */
88 char abort_if_no_lease; /* Abort if no lease */
89 char background_if_no_lease; /* Fork to background if no lease */
90 char *interface; /* The name of the interface to use */