summaryrefslogtreecommitdiffstats
path: root/core/modules/run-virt-docker/data/opt/openslx/vmchooser/plugins/docker/includes/gio_allow_root_fix.inc
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/run-virt-docker/data/opt/openslx/vmchooser/plugins/docker/includes/gio_allow_root_fix.inc')
-rwxr-xr-xcore/modules/run-virt-docker/data/opt/openslx/vmchooser/plugins/docker/includes/gio_allow_root_fix.inc12
1 files changed, 12 insertions, 0 deletions
diff --git a/core/modules/run-virt-docker/data/opt/openslx/vmchooser/plugins/docker/includes/gio_allow_root_fix.inc b/core/modules/run-virt-docker/data/opt/openslx/vmchooser/plugins/docker/includes/gio_allow_root_fix.inc
new file mode 100755
index 00000000..9ef14d81
--- /dev/null
+++ b/core/modules/run-virt-docker/data/opt/openslx/vmchooser/plugins/docker/includes/gio_allow_root_fix.inc
@@ -0,0 +1,12 @@
+#!/bin/bash
+writelog "+ apply 'allow_root' Option for gvfsd-fuse"
+
+# exec dummy call to start gvfsd and gvfsd-fuse
+gio mount
+
+# create gvfs user dir mybe it does not exist at this point
+mkdir -p "/run/user/$(id -u)/gvfs"
+
+fusermount -zu "/run/user/$(id -u)/gvfs"
+killall gvfsd-fuse
+/usr/lib/gvfs/gvfsd-fuse -o allow_root "/run/user/$(id -u)/gvfs"