summaryrefslogtreecommitdiffstats
path: root/core/modules/dnbd3/data/opt/openslx/scripts/systemd-setup_dnbd3
blob: e519b1b8f150be8e2f24857439635dcc996a3a5a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/ash

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 /opt/openslx/bin/dnbd3-client --daemon
slxlog "dnbd3-daemon" "Error launching dnbd3-client daemon"
exit 1