diff options
author | Simon Rettberg | 2016-10-19 15:07:25 +0200 |
---|---|---|
committer | Simon Rettberg | 2016-10-19 15:07:25 +0200 |
commit | 7c70ebde186c9589bd6e56f04d9f9bab682a3c14 (patch) | |
tree | a50105db62d13275dfacb774a15c51cdea76bcfc /remote/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/setup_firewall.inc | |
parent | [vmware/run-virt] Try to rename includes to what they actually do (diff) | |
download | tm-scripts-7c70ebde186c9589bd6e56f04d9f9bab682a3c14.tar.gz tm-scripts-7c70ebde186c9589bd6e56f04d9f9bab682a3c14.tar.xz tm-scripts-7c70ebde186c9589bd6e56f04d9f9bab682a3c14.zip |
[run-virt] More cleanup; kill legacy support, rename and move includes, kill dead code
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.inc | 12 |
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 +} |