Debian Codegraph @

support/init.d.examples/dhcpcd.in

raw
1 #!@SBINDIR@/openrc-run
2 # Copyright (c) 2007-2015 The OpenRC Authors.
3 # See the Authors file at the top-level directory of this distribution and
4 # https://github.com/OpenRC/openrc/blob/HEAD/AUTHORS
5 #
6 # This file is part of OpenRC. It is subject to the license terms in
7 # the LICENSE file found in the top-level directory of this
8 # distribution and at https://github.com/OpenRC/openrc/blob/HEAD/LICENSE
9 # This file may not be copied, modified, propagated, or distributed
10 # except according to the terms contained in the LICENSE file.
11
12 command=/sbin/dhcpcd
13 pidfile=/var/run/dhcpcd.pid
14 command_args=-q
15 name="DHCP Client Daemon"
16
17 depend()
18 {
19 provide net
20 need localmount
21 use logger
22 after bootmisc modules
23 before dns
24 }
25
26 stop_pre()
27 {
28 # When shutting down, kill dhcpcd but preserve network
29 # We do this as /var/run/dhcpcd could be cleaned out when we
30 # return to multiuser.
31 if yesno $RC_GOINGDOWN; then
32 : ${stopsig:=SIGKILL}
33 fi
34 }