net-fs/ksmbd-tools: add initial version of openrc files

Bug: https://bugs.gentoo.org/828515
Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
This commit is contained in:
Georgy Yakovlev
2021-12-13 14:30:57 -08:00
parent 3643c61539
commit 160c2caff8
3 changed files with 38 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
# /etc/conf.d/ksmbd: config file for /etc/init.d/ksmbd
#
# Full path to config file. /etc/ksmbd/smb.conf is default if not set.
#KSMBD_CONF="/etc/ksmbd/smb.conf"
+32
View File
@@ -0,0 +1,32 @@
#!/sbin/openrc-run
# Copyright 2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
KSMBD_CONF="${KSMBD_CONF:-/etc/ksmbd/smb.conf}"
depend() {
need localmount
use net
}
description="ksmbd userspace daemon"
command="/usr/sbin/ksmbd.mountd"
command_control="/usr/sbin/ksmbd.control"
command_args="-s"
required_files="${KSMBD_CONF}"
start_pre() {
/sbin/modprobe ksmbd || return 1
}
stop() {
ebegin "Stopping ${RC_SVCNAME}"
"${command_control} -s"
eend $?
}
stop_post() {
/sbin/modprobe -r -q ksmbd || return 0
}
@@ -13,7 +13,7 @@ SRC_URI="https://github.com/cifsd-team/${PN}/archive/${EGIT_COMMIT}.tar.gz -> ${
LICENSE="GPL-2+"
SLOT="0"
# no keywords for now, for testing.
KEYWORDS=""
#KEYWORDS="~amd64"
DEPEND="
dev-libs/glib:2