Move iptables symlink creation to %posttrans
Previous (< 2.1.66) version of the package owned /etc/sysconfig/iptables, the current on doesn't. This means that during update, the file will be removed during cleanup phase. Since cleanup is executing after %post, it will also remove symlink created there. So move that code to %posttrans, which is executed after cleanup phase. Fixes QubesOS/qubes-issues#1278
This commit is contained in:
parent
e4619265a9
commit
ae3507c662
|
@ -263,15 +263,6 @@ 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
|
||||
|
@ -376,6 +367,15 @@ fi
|
|||
%posttrans
|
||||
/usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
|
||||
|
||||
# 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
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
rm -f %{name}-%{version}
|
||||
|
|
Loading…
Reference in New Issue
Block a user