From e52557caae39b3bcad5ca80b051bd60c3e1c0bd1 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 1 Feb 2024 11:57:32 +0100 Subject: [dnbd3-proxy-mode] Add user dnbd3 to fuse group at build time --- .../data/opt/openslx/scripts/systemd-setup_dnbd3_proxy | 1 - core/modules/dnbd3-proxy-mode/module.build | 3 ++- core/modules/dnbd3-proxy-mode/module.conf | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/core/modules/dnbd3-proxy-mode/data/opt/openslx/scripts/systemd-setup_dnbd3_proxy b/core/modules/dnbd3-proxy-mode/data/opt/openslx/scripts/systemd-setup_dnbd3_proxy index 96d62ae4..47ad92d8 100755 --- a/core/modules/dnbd3-proxy-mode/data/opt/openslx/scripts/systemd-setup_dnbd3_proxy +++ b/core/modules/dnbd3-proxy-mode/data/opt/openslx/scripts/systemd-setup_dnbd3_proxy @@ -291,7 +291,6 @@ if [ -n "$islocal" ]; then # Prepare, so dnbd3-server will be launched with -m mkdir -p /mnt/dnbd3 chown dnbd3:dnbd3 /mnt/dnbd3 - adduser dnbd3 fuse # Start service, is not symlinked when not in proxy mode systemctl --no-block start dnbd3-proxy.service dnbd3-local-stage4.service fi diff --git a/core/modules/dnbd3-proxy-mode/module.build b/core/modules/dnbd3-proxy-mode/module.build index cdd58c45..6027ceeb 100644 --- a/core/modules/dnbd3-proxy-mode/module.build +++ b/core/modules/dnbd3-proxy-mode/module.build @@ -8,5 +8,6 @@ build() { } post_copy() { - useradd --system --user-group --no-create-home "dnbd3" + useradd --system --user-group --no-create-home --groups "fuse" "dnbd3" \ + || perror "Cannot create user dnbd3 with supp. group fuse" } diff --git a/core/modules/dnbd3-proxy-mode/module.conf b/core/modules/dnbd3-proxy-mode/module.conf index 3ba16fc0..98afcdf4 100644 --- a/core/modules/dnbd3-proxy-mode/module.conf +++ b/core/modules/dnbd3-proxy-mode/module.conf @@ -1,2 +1,3 @@ #!/bin/bash -# Nothing - static module + +REQUIRED_MODULES="dnbd3" -- cgit v1.2.3-55-g7522