Skip to content

Commit

Permalink
* #1335: try to use "firewall-offline-cmd" if "firewall-cmd" failed
Browse files Browse the repository at this point in the history
* remove debug "env" from lz4 build

git-svn-id: https://xpra.org/svn/Xpra/trunk@14484 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Nov 24, 2016
1 parent 6b1f7ee commit 39b022d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
1 change: 0 additions & 1 deletion rpmbuild/lz4.spec
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ chmod +x ./configure

%build
%configure
env
make


Expand Down
24 changes: 18 additions & 6 deletions rpmbuild/xpra.spec
Original file line number Diff line number Diff line change
Expand Up @@ -516,10 +516,16 @@ if [ ! -e "/etc/xpra/ssl-cert.pem" ]; then
-keyout "/etc/xpra/ssl-cert.pem" -out "/etc/xpra/ssl-cert.pem" 2> /dev/null
umask $umask
fi
ZONE=`firewall-cmd --get-default-zone 2> /dev/null`
ZONE=`firewall-offline-cmd --get-default-zone 2> /dev/null`
if [ ! -z "${ZONE}" ]; then
firewall-cmd --zone=${ZONE} --add-port=14500/tcp --permanent | grep -v "^success" || :
firewall-cmd --reload | grep -v "^success" || :
set +e
firewall-cmd --zone=${ZONE} --add-port=14500/tcp --permanent 2> /dev/null
if [ $? == "0" ]; then
firewall-cmd --reload | grep -v "^success"
else
firewall-offline-cmd --add-port=14500/tcp | grep -v "^success"
fi
set -e
fi
/usr/bin/update-mime-database &> /dev/null || :
/usr/bin/update-desktop-database &> /dev/null || :
Expand Down Expand Up @@ -551,10 +557,16 @@ if [ $1 -ge 1 ] ; then
/bin/systemctl try-restart xpra.service >/dev/null 2>&1 || :
fi
%endif
ZONE=`firewall-cmd --get-default-zone 2> /dev/null`
ZONE=`firewall-offline-cmd --get-default-zone 2> /dev/null`
if [ ! -z "${ZONE}" ]; then
firewall-cmd --zone=${ZONE} --remove-port=14500/tcp --permanent | grep -v "^success"
firewall-cmd --reload | grep -v "^success"
set +e
firewall-cmd --zone=${ZONE} --remove-port=14500/tcp --permanent 2> /dev/null
if [ $? == "0" ]; then
firewall-cmd --reload | grep -v "^success"
else
firewall-offline-cmd --add-port=14500/tcp | grep -v "^success"
fi
set -e
fi
/usr/bin/update-mime-database &> /dev/null || :
/usr/bin/update-desktop-database &> /dev/null || :
Expand Down

0 comments on commit 39b022d

Please sign in to comment.