summaryrefslogtreecommitdiffstats
path: root/remote/modules/dnbd3
diff options
context:
space:
mode:
authorSimon Rettberg2013-11-27 17:29:34 +0100
committerSimon Rettberg2013-11-27 17:29:34 +0100
commita2188dbd9864cf4def14741866a48a4dfc0e2357 (patch)
tree0b1ac3db89d71cdb384def46754f94b7029bfbc0 /remote/modules/dnbd3
parent[pam] Remote logging of login/out (diff)
downloadtm-scripts-a2188dbd9864cf4def14741866a48a4dfc0e2357.tar.gz
tm-scripts-a2188dbd9864cf4def14741866a48a4dfc0e2357.tar.xz
tm-scripts-a2188dbd9864cf4def14741866a48a4dfc0e2357.zip
[dnbd3] Add slxlog
Diffstat (limited to 'remote/modules/dnbd3')
-rwxr-xr-xremote/modules/dnbd3/data/opt/openslx/scripts/systemd-setup_dnbd39
1 files changed, 8 insertions, 1 deletions
diff --git a/remote/modules/dnbd3/data/opt/openslx/scripts/systemd-setup_dnbd3 b/remote/modules/dnbd3/data/opt/openslx/scripts/systemd-setup_dnbd3
index f424e3b9..d41fe57e 100755
--- a/remote/modules/dnbd3/data/opt/openslx/scripts/systemd-setup_dnbd3
+++ b/remote/modules/dnbd3/data/opt/openslx/scripts/systemd-setup_dnbd3
@@ -1,9 +1,16 @@
#!/bin/sh
-insmod /lib/modules/dnbd3/dnbd3.ko || exit 1
+if ! insmod /lib/modules/dnbd3/dnbd3.ko; then
+ slxlog "dnbd3-kernel" "Error loading dnbd3 client kernel module"
+ exit 1
+fi
+
[ -e "/dev/dnbd0" ] || exit 1
for i in /dev/dnbd*; do
echo 8192 > "/sys/block/dnbd${i#/dev/dnbd}/queue/nr_requests"
done
+
exec -- dnbd3-client --daemon
+slxlog "dnbd3-daemon" "Error launching dnbd3-client daemon"
+exit 1