From 3aca3f8c481156ed34ec7d8ea177d0492a409df9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Fri, 26 Jun 2015 19:54:22 +0200 Subject: [PATCH] fedora: ensure that /etc/sysconfig/iptables exists (Fedora 20) Even when iptables.service is configured to use different file, the service would not start when there is no /etc/sysconfig/iptables. Fedora 20 package does not provide it. --- rpm_spec/core-vm.spec | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/rpm_spec/core-vm.spec b/rpm_spec/core-vm.spec index d162fb7..6e418c1 100644 --- a/rpm_spec/core-vm.spec +++ b/rpm_spec/core-vm.spec @@ -272,6 +272,16 @@ EOF fi fi +# Make sure that /etc/sysconfig/ip(|6)tables exists. Otherwise iptales.service +# would not start (even when configured to use another configuration file. +if [ ! -e '/etc/sysconfig/iptables' ]; then + ln -s iptables.qubes /etc/sysconfig/iptables +fi +if [ ! -e '/etc/sysconfig/ip6tables' ]; then + ln -s ip6tables.qubes /etc/sysconfig/ip6tables +fi + + # ensure that hostname resolves to 127.0.0.1 resp. ::1 and that /etc/hosts is # in the form expected by qubes-sysinit.sh if ! grep -rq "^/etc/hostname$" "${PROTECTED_FILE_LIST}" 2>/dev/null; then