mirror of
https://anongit.gentoo.org/git/repo/gentoo.git
synced 2025-12-17 15:43:55 +00:00
Closes: https://github.com/gentoo/gentoo/pull/25627 Thanks-to: Randall T. Vasquez <ran.dall@icloud.com> Signed-off-by: William Hubbs <williamh@gentoo.org>
20 lines
376 B
Text
20 lines
376 B
Text
#!/sbin/openrc-run
|
|
|
|
name="CNI-DHCP"
|
|
description="virtual dhcp server for containers"
|
|
command="/opt/cni/bin/dhcp"
|
|
command_args="daemon"
|
|
command_background=true
|
|
pidfile="/run/${RC_SVCNAME}.pid"
|
|
|
|
depend() {
|
|
need net
|
|
}
|
|
|
|
stop_post() {
|
|
if [ -e /run/cni/dhcp.sock ]; then
|
|
ebegin "Cleaning socket for ${name}"
|
|
rm -f /run/cni/dhcp.sock
|
|
eend $? "Failed to cleanup socket"
|
|
fi
|
|
}
|