summaryrefslogtreecommitdiff
path: root/net-fs
diff options
context:
space:
mode:
authorGeorgy Yakovlev <gyakovlev@gentoo.org>2021-12-13 14:28:18 -0800
committerGeorgy Yakovlev <gyakovlev@gentoo.org>2021-12-13 14:30:57 -0800
commit160c2caff897a88545e9f4e0d8ccd889ffa3fb85 (patch)
tree5163687058a4c1dc552855746f8ea1fb5794c87e /net-fs
parentsys-apps/cpuid: drop 20211129 (diff)
downloadgentoo-160c2caff897a88545e9f4e0d8ccd889ffa3fb85.tar.gz
gentoo-160c2caff897a88545e9f4e0d8ccd889ffa3fb85.tar.bz2
gentoo-160c2caff897a88545e9f4e0d8ccd889ffa3fb85.zip
net-fs/ksmbd-tools: add initial version of openrc files
Bug: https://bugs.gentoo.org/828515 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Diffstat (limited to 'net-fs')
-rw-r--r--net-fs/ksmbd-tools/files/confd5
-rw-r--r--net-fs/ksmbd-tools/files/initd32
-rw-r--r--net-fs/ksmbd-tools/ksmbd-tools-3.4.3_pre20212111.ebuild2
3 files changed, 38 insertions, 1 deletions
diff --git a/net-fs/ksmbd-tools/files/confd b/net-fs/ksmbd-tools/files/confd
new file mode 100644
index 000000000000..81248468d530
--- /dev/null
+++ b/net-fs/ksmbd-tools/files/confd
@@ -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"
diff --git a/net-fs/ksmbd-tools/files/initd b/net-fs/ksmbd-tools/files/initd
new file mode 100644
index 000000000000..1492c15444e9
--- /dev/null
+++ b/net-fs/ksmbd-tools/files/initd
@@ -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
+}
diff --git a/net-fs/ksmbd-tools/ksmbd-tools-3.4.3_pre20212111.ebuild b/net-fs/ksmbd-tools/ksmbd-tools-3.4.3_pre20212111.ebuild
index db27ead43cd4..fc4deb510fbd 100644
--- a/net-fs/ksmbd-tools/ksmbd-tools-3.4.3_pre20212111.ebuild
+++ b/net-fs/ksmbd-tools/ksmbd-tools-3.4.3_pre20212111.ebuild
@@ -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