diff options
author | Sebastian | 2016-04-25 12:01:08 +0200 |
---|---|---|
committer | Sebastian | 2016-04-25 12:01:08 +0200 |
commit | 5acda3eaeabae9045609539303a8c12c4ce401f1 (patch) | |
tree | 7e71975f8570b05aafe2ea6ec0e242a8912387bb /core/modules/dnbd3/data | |
parent | initial commit (diff) | |
download | mltk-5acda3eaeabae9045609539303a8c12c4ce401f1.tar.gz mltk-5acda3eaeabae9045609539303a8c12c4ce401f1.tar.xz mltk-5acda3eaeabae9045609539303a8c12c4ce401f1.zip |
merge with latest dev version
Diffstat (limited to 'core/modules/dnbd3/data')
6 files changed, 43 insertions, 0 deletions
diff --git a/core/modules/dnbd3/data/etc/fuse.conf b/core/modules/dnbd3/data/etc/fuse.conf new file mode 100644 index 00000000..926d936f --- /dev/null +++ b/core/modules/dnbd3/data/etc/fuse.conf @@ -0,0 +1,8 @@ +# /etc/fuse.conf - Configuration file for Filesystem in Userspace (FUSE) + +# Set the maximum number of FUSE mounts allowed to non-root users. +# The default is 1000. +#mount_max = 1000 + +# Allow non-root users to specify the allow_other or allow_root mount options. +user_allow_other diff --git a/core/modules/dnbd3/data/etc/systemd/system/setup-dnbd3.service b/core/modules/dnbd3/data/etc/systemd/system/setup-dnbd3.service new file mode 100644 index 00000000..516cbfa2 --- /dev/null +++ b/core/modules/dnbd3/data/etc/systemd/system/setup-dnbd3.service @@ -0,0 +1,11 @@ +[Unit] +Description=Setup dnbd3 kernel module and user space daemon +After=sysinit.target +Before=shutdown.target +DefaultDependencies=no + +[Service] +ExecStart=/opt/openslx/scripts/systemd-setup_dnbd3 +ExecStop=/opt/openslx/bin/dnbd3-client --kill +ExecStopPost=/opt/openslx/bin/rm /var/run/dnbd3.socket +Restart=on-abort diff --git a/core/modules/dnbd3/data/etc/systemd/system/sysinit.target.wants/setup-dnbd3.service b/core/modules/dnbd3/data/etc/systemd/system/sysinit.target.wants/setup-dnbd3.service new file mode 120000 index 00000000..05dd4ac2 --- /dev/null +++ b/core/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/core/modules/dnbd3/data/etc/udev/rules.d/90-dnbd3.rules b/core/modules/dnbd3/data/etc/udev/rules.d/90-dnbd3.rules new file mode 100644 index 00000000..0eb1f52d --- /dev/null +++ b/core/modules/dnbd3/data/etc/udev/rules.d/90-dnbd3.rules @@ -0,0 +1 @@ +KERNEL=="dnbd*", SUBSYSTEM=="block", MODE="0664" diff --git a/core/modules/dnbd3/data/opt/openslx/scripts/pam_script_auth.d/10-fuse b/core/modules/dnbd3/data/opt/openslx/scripts/pam_script_auth.d/10-fuse new file mode 100644 index 00000000..85d8a75a --- /dev/null +++ b/core/modules/dnbd3/data/opt/openslx/scripts/pam_script_auth.d/10-fuse @@ -0,0 +1,6 @@ + +adduser "${PAM_USER}" "fuse" +ret=$? +[ "$ret" -ne "0" ] && slxlog "pam-auth-fuse" "Could not add $PAM_USER to group 'fuse'" +true + diff --git a/core/modules/dnbd3/data/opt/openslx/scripts/systemd-setup_dnbd3 b/core/modules/dnbd3/data/opt/openslx/scripts/systemd-setup_dnbd3 new file mode 100755 index 00000000..e519b1b8 --- /dev/null +++ b/core/modules/dnbd3/data/opt/openslx/scripts/systemd-setup_dnbd3 @@ -0,0 +1,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 + |