sgallagh pushed to firewalld (master). "Switch to using $VARIANT directly from /etc/os-release"

notifications at fedoraproject.org notifications at fedoraproject.org
Thu Apr 16 19:38:07 UTC 2015


>From 8aec79859fc2f48cd30a0417edbe121167bc4e7a Mon Sep 17 00:00:00 2001
From: Stephen Gallagher <sgallagh at redhat.com>
Date: Thu, 16 Apr 2015 15:36:22 -0400
Subject: Switch to using $VARIANT directly from /etc/os-release


diff --git a/firewalld.spec b/firewalld.spec
index f4290be..39f7cc6 100644
--- a/firewalld.spec
+++ b/firewalld.spec
@@ -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 at redhat.com> 0.3.13-6
+- Switch to using $VARIANT directly from /etc/os-release
+
 * Fri Mar 13 2015 Stephen Gallagher <sgallagh at redhat.com> 0.3.13-5
 - Fix bugs with posttrans
 - Remove nonexistent fedora-cloud.conf symlink
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/firewalld.git/commit/?h=master&id=8aec79859fc2f48cd30a0417edbe121167bc4e7a


More information about the scm-commits mailing list