summaryrefslogtreecommitdiffstats
path: root/remote/modules/dnbd3
diff options
context:
space:
mode:
Diffstat (limited to 'remote/modules/dnbd3')
-rw-r--r--remote/modules/dnbd3/data/etc/systemd/system/setup-dnbd3.service12
l---------remote/modules/dnbd3/data/etc/systemd/system/sysinit.target.wants/setup-dnbd3.service1
-rwxr-xr-xremote/modules/dnbd3/data/opt/openslx/scripts/systemd-setup_dnbd39
-rw-r--r--remote/modules/dnbd3/dnbd3.build2
-rw-r--r--remote/modules/dnbd3/dnbd3.conf2
5 files changed, 25 insertions, 1 deletions
diff --git a/remote/modules/dnbd3/data/etc/systemd/system/setup-dnbd3.service b/remote/modules/dnbd3/data/etc/systemd/system/setup-dnbd3.service
new file mode 100644
index 00000000..97f6703d
--- /dev/null
+++ b/remote/modules/dnbd3/data/etc/systemd/system/setup-dnbd3.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Setup dnbd3 kernel module and user space daemon
+After=sysinit.target
+Before=shutdown.target
+DefaultDependencies=no
+
+[Service]
+Type=service
+ExecStart=/opt/openslx/scripts/systemd-setup_dnbd3
+ExecStop=/opt/openslx/bin/dnbd3-client --kill
+ExecStopPost=/bin/rm /var/run/dnbd3.socket
+Restart=on-abort
diff --git a/remote/modules/dnbd3/data/etc/systemd/system/sysinit.target.wants/setup-dnbd3.service b/remote/modules/dnbd3/data/etc/systemd/system/sysinit.target.wants/setup-dnbd3.service
new file mode 120000
index 00000000..05dd4ac2
--- /dev/null
+++ b/remote/modules/dnbd3/data/etc/systemd/system/sysinit.target.wants/setup-dnbd3.service
@@ -0,0 +1 @@
+../setup-dnbd3.service \ No newline at end of file
diff --git a/remote/modules/dnbd3/data/opt/openslx/scripts/systemd-setup_dnbd3 b/remote/modules/dnbd3/data/opt/openslx/scripts/systemd-setup_dnbd3
new file mode 100755
index 00000000..9c76bfa6
--- /dev/null
+++ b/remote/modules/dnbd3/data/opt/openslx/scripts/systemd-setup_dnbd3
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+insmod /lib/modules/dnbd3/dnbd3.ko
+[ -e "/dev/dnbd0" ] || exit 1
+for i in 0 1 2 3 4 5 6 7; do
+ echo 8192 > "/sys/block/dnbd${i}/queue/nr_requests"
+done
+exec -- dnbd3-client --daemon
+
diff --git a/remote/modules/dnbd3/dnbd3.build b/remote/modules/dnbd3/dnbd3.build
index 5dd2769f..e285788b 100644
--- a/remote/modules/dnbd3/dnbd3.build
+++ b/remote/modules/dnbd3/dnbd3.build
@@ -32,6 +32,8 @@ build() {
cd "$MODULE_BUILD_DIR/opt/openslx/bin" || perror "Could not cd to build dir for client binary"
cmake "$MODULE_DIR/src/dnbd3" || perror "Could not cmake"
make dnbd3-client || perror "Could not make dnbd3-client"
+ chown root:root "dnbd3-client"
+ chmod +xs "dnbd3-client"
cd "$MODULE_DIR"
}
diff --git a/remote/modules/dnbd3/dnbd3.conf b/remote/modules/dnbd3/dnbd3.conf
index c1a3eb2e..31c411d0 100644
--- a/remote/modules/dnbd3/dnbd3.conf
+++ b/remote/modules/dnbd3/dnbd3.conf
@@ -2,7 +2,7 @@
#REQUIRED_CONTENT_PACKAGES="libgconf-2-4 fontconfig-config"
REQUIRED_MODULES="kernel"
REQUIRED_GIT="git://git.openslx.org/dnbd3.git"
-REQUIRED_COMMIT="37868b9e5f7c26c61a928a61b7cc705eedb7e5a6"
+REQUIRED_COMMIT="89a7af0ceb1cdc13f7d3a4ffac54f32576e1138d"
REQUIRED_BINARIES="
dnbd3-client
"