summaryrefslogtreecommitdiffstats
path: root/remote/modules/dnbd3/data/opt/openslx/scripts/systemd-setup_dnbd3
blob: c6e9d9823a5e69f56a97f1e6601dc96cc8273192 (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 -- dnbd3-client --daemon
slxlog "dnbd3-daemon" "Error launching dnbd3-client daemon"
exit 1