summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Hubbs <williamh@gentoo.org>2022-07-16 16:37:20 -0500
committerWilliam Hubbs <williamh@gentoo.org>2022-07-16 16:39:22 -0500
commit3d7978052da3f2cc54fce6653d7ee0c23d98be09 (patch)
treeb252a26a2011ff2928ebf1820786ac6b3a3f79f6 /app-containers/cni-plugins/files
parentx11-libs/libnotify: Version bump to 0.8.0 (diff)
downloadgentoo-3d7978052da3f2cc54fce6653d7ee0c23d98be09.tar.gz
gentoo-3d7978052da3f2cc54fce6653d7ee0c23d98be09.tar.bz2
gentoo-3d7978052da3f2cc54fce6653d7ee0c23d98be09.zip
net-misc/cni-plugins: move to app-containers/cni-plugins
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>
Diffstat (limited to 'app-containers/cni-plugins/files')
-rw-r--r--app-containers/cni-plugins/files/cni-dhcp.initd20
1 files changed, 20 insertions, 0 deletions
diff --git a/app-containers/cni-plugins/files/cni-dhcp.initd b/app-containers/cni-plugins/files/cni-dhcp.initd
new file mode 100644
index 000000000000..26b838c516bd
--- /dev/null
+++ b/app-containers/cni-plugins/files/cni-dhcp.initd
@@ -0,0 +1,20 @@
+#!/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
+}