blob: 5b1f4e992ad9c02d1ea9d0b92423870502e279c9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
#!/bin/sh
# /etc/init.d/udhcpc: start or stop udhcpc client
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
DAEMON=/sbin/udhcpc
test -x $DAEMON || exit 0
case "$1" in
start)
echo -n "Starting DHCP client: udhcpc"
start-stop-daemon --start --quiet --exec $DAEMON \
-- --script=/etc/udhcpc.script || echo -n " already running"
echo "."
;;
restart)
/etc/init.d/udhcpc stop
/etc/init.d/udhcpc start
;;
reload)
;;
force-reload)
;;
stop)
echo -n "Stopping DHCP client: udhcpc"
start-stop-daemon --stop --quiet --exec $DAEMON || echo -n " not running"
echo "."
;;
renew)
start-stop-daemon --signal USR1 --stop --quiet --exec $DAEMON || echo -n " not running"
;;
release)
start-stop-daemon --signal USR2 --stop --quiet --exec $DAEMON || echo -n " not running"
;;
*)
echo "Usage: /etc/init.d/udhcpc {start|stop|restart|reload|force-reload}"
exit 1
;;
esac
exit 0
|