summaryrefslogtreecommitdiffstats
path: root/remote/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/setup_firewall.inc
diff options
context:
space:
mode:
Diffstat (limited to 'remote/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/setup_firewall.inc')
-rw-r--r--remote/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/setup_firewall.inc12
1 files changed, 12 insertions, 0 deletions
diff --git a/remote/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/setup_firewall.inc b/remote/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/setup_firewall.inc
new file mode 100644
index 00000000..f0820ed7
--- /dev/null
+++ b/remote/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/setup_firewall.inc
@@ -0,0 +1,12 @@
+
+setup_firewall () {
+ local LOGF="${TMPDIR}/firewall.log"
+ local RET
+ [ "$DISPLAY" = ":0" ] || return 0 # For now, to avoid conflicts, we only do this on display :0
+ slxfwtool "$IMGUUID" > "$LOGF" 2>&1
+ RET=$?
+ if [ "$RET" != "0" ]; then
+ slxlog "runvirt-firewall" "Error setting up firewall rules for lecture $IMGUUID (Exit code $RET)" "$LOGF"
+ fi
+ return 0
+}