summaryrefslogtreecommitdiffstats
path: root/remote/modules/run-virt/data/opt/openslx/vmchooser/run-virt-includes/setup_firewall.inc
blob: f0820ed75e258c5f228dbf3dcdd9d7650d56a718 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
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
}