source: freewrt/package/busybox/patches/patch-networking_ifupdown_c@ c6b195c

freewrt_1_0 freewrt_2_0
Last change on this file since c6b195c was c6b195c, checked in by Waldemar Brodkorb <wbx@…>, 19 years ago

use make update-patches to generate patches. start ucdhcp as background process, so that you can later attach a cable and still get an ip address without reboot. add address/broadcast parameters to ip link set

git-svn-id: svn://www.freewrt.org/branches/freewrt_1_0@1215 afb5a338-a214-0410-bd46-81f09a774fd1

  • Property mode set to 100644
File size: 1.2 KB
Line 
1$FreeWRT$
2--- busybox-1.1.3.orig/networking/ifupdown.c Wed Mar 22 22:16:19 2006
3+++ busybox-1.1.3/networking/ifupdown.c Sat Nov 25 19:55:20 2006
4@@ -486,6 +486,16 @@ static int static_down(struct interface_
5 return ((result == 2) ? 2 : 0);
6 }
7
8+static int manual_up(struct interface_defn_t *ifd, execfn *exec)
9+{
10+ return 1;
11+}
12+
13+static int manual_down(struct interface_defn_t *ifd, execfn *exec)
14+{
15+ return 1;
16+}
17+
18 static int execable(char *program)
19 {
20 struct stat buf;
21@@ -500,7 +510,7 @@ static int execable(char *program)
22 static int dhcp_up(struct interface_defn_t *ifd, execfn *exec)
23 {
24 if (execable("/sbin/udhcpc")) {
25- return( execute("udhcpc -n -p /var/run/udhcpc.%iface%.pid -i "
26+ return( execute("udhcpc -b -p /var/run/udhcpc.%iface%.pid -i "
27 "%iface% [[-H %hostname%]] [[-c %clientid%]]", ifd, exec));
28 } else if (execable("/sbin/pump")) {
29 return( execute("pump -i %iface% [[-h %hostname%]] [[-l %leasehours%]]", ifd, exec));
30@@ -569,6 +579,7 @@ static struct method_t methods[] =
31 { "bootp", bootp_up, static_down, },
32 { "dhcp", dhcp_up, dhcp_down, },
33 { "loopback", loopback_up, loopback_down, },
34+ { "manual", manual_up, manual_down, },
35 };
36
37 static struct address_family_t addr_inet =
Note: See TracBrowser for help on using the repository browser.