Switch to using $VARIANT directly from /etc/os-release

This commit is contained in:
Stephen Gallagher 2015-04-16 15:36:22 -04:00
parent 82cf3d8869
commit 8aec79859f

View File

@ -8,7 +8,7 @@
Summary: A firewall daemon with D-Bus interface providing a dynamic firewall
Name: firewalld
Version: 0.3.13
Release: 5%{?dist}
Release: 6%{?dist}
URL: http://www.firewalld.org
License: GPLv2+
Source0: https://fedorahosted.org/released/firewalld/%{name}-%{version}.tar.bz2
@ -197,14 +197,14 @@ rm -f %{buildroot}%{_datadir}/polkit-1/actions/org.fedoraproject.FirewallD1.poli
# create it. Note: this will intentionally reset the policykit policy
# at the same time, so they are in sync.
if [ \! -e %{_sysconfdir}/firewalld/firewalld.conf ]; then
# Select the default config file based on /etc/os-release
variant=$(awk -F "=" '/VARIANT/ {print $2}' /etc/os-release) || :
# Import /etc/os-release to get the variant definition
. /etc/os-release
# Make sure that we remove any dangling links
rm -f %{_sysconfdir}/firewalld/firewalld.conf || :
rm -f %{_datadir}/polkit-1/actions/org.fedoraproject.FirewallD1.policy || :
case $variant in
case $VARIANT in
"Server")
ln -sf firewalld-server.conf %{_sysconfdir}/firewalld/firewalld.conf || :
ln -sf org.fedoraproject.FirewallD1.server.policy %{_datadir}/polkit-1/actions/org.fedoraproject.FirewallD1.policy || :
@ -347,6 +347,9 @@ fi
%{_mandir}/man1/firewall-config*.1*
%changelog
* Thu Apr 16 2015 Stephen Gallagher <sgallagh@redhat.com> 0.3.13-6
- Switch to using $VARIANT directly from /etc/os-release
* Fri Mar 13 2015 Stephen Gallagher <sgallagh@redhat.com> 0.3.13-5
- Fix bugs with posttrans
- Remove nonexistent fedora-cloud.conf symlink