File tree Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 2
2
#
3
3
# /etc/init.d/udhcpc
4
4
#
5
+
6
+ IFACE=eth0
7
+
5
8
case " $1 " in
6
9
start)
10
+ if [ ! /sbin/ifconfig $IFACE 2> /dev/null ]; then
11
+ echo " No $IFACE interface found"
12
+ fi
7
13
if [ -e /sbin/udhcpc ]; then
8
- ip link set eth0 up
9
- /sbin/udhcpc -i eth0 -s /etc/udhcp/simple.script
14
+ ip link set $IFACE up
15
+ /sbin/udhcpc -i $IFACE -s /etc/udhcp/simple.script
10
16
else
11
17
echo " No DHCP client found"
12
18
fi
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ file /etc/init.d/rc.init etc/init.d/rc.init 755 0 0
23
23
file /etc/init.d/telnetd etc/init.d/telnetd 755 0 0
24
24
file /etc/init.d/splash etc/init.d/splash 755 0 0
25
25
file /etc/init.d/ledflash etc/init.d/ledflash 755 0 0
26
+ file /etc/init.d/udhcpc etc/init.d/udhcpc 755 0 0
26
27
file /etc/rpc etc/rpc 644 0 0
27
28
file /etc/se.kmap etc/se.kmap 644 0 0
28
29
dir /etc/rc.d 755 0 0
@@ -48,6 +49,8 @@ file /etc/gshadow etc/gshadow 644 0 0
48
49
file /etc/fstab etc/fstab 644 0 0
49
50
file /etc/hosts etc/hosts 644 0 0
50
51
slink /etc/mtab /proc/mounts 755 0 0
52
+ dir /etc/udhcp 755 0 0
53
+ file /etc/udhcp/simple.script stage/etc/udhcp/simple.script 755 0 0
51
54
dir /proc 755 0 0
52
55
dir /sys 755 0 0
53
56
dir /mnt 755 0 0
Original file line number Diff line number Diff line change @@ -156,6 +156,7 @@ mkdir -p ${STAGEDIR}
156
156
mkdir -p ${STAGEDIR} /lib
157
157
mkdir -p ${STAGEDIR} /sbin
158
158
mkdir -p ${BUILDDIR}
159
+ mkdir -p ${STAGEDIR} /etc/udhcp
159
160
160
161
# For using the git version
161
162
cd ${BUSYBOXDIR}
@@ -174,6 +175,10 @@ if [ ! -e ${BUILDDIR}/.config ]; then
174
175
fi
175
176
make -j${_NPROCESSORS_ONLN} O=${BUILDDIR}
176
177
make O=${BUILDDIR} install
178
+
179
+ # copy udhcp simple script to the stage
180
+ cp ${BUSYBOXDIR} /examples/udhcp/simple.script ${STAGEDIR} /etc/udhcp/
181
+
177
182
cd ${CURDIR}
178
183
179
184
# First the flat library where arch-independent stuff will
You can’t perform that action at this time.
0 commit comments