rpm specs: %post cleanup

Moved some stuff from the begging of %post sections after the
'if installing-for-the-first-time' check.
This commit is contained in:
Joanna Rutkowska 2010-06-14 23:52:21 +02:00
parent 46f206bb1a
commit ed4fbda53e
2 changed files with 10 additions and 10 deletions

View File

@ -80,17 +80,17 @@ cp /etc/qubes_eventd_serial /etc/event.d/serial
%post
if [ "$1" != 1 ] ; then
# do this whole %post thing only when updating for the first time...
exit 0
fi
usermod -L root
usermod -L user
if ! [ -f /var/lib/qubes/serial.orig ] ; then
cp /etc/event.d/serial /var/lib/qubes/serial.orig
fi
if [ "$1" != 1 ] ; then
# do this whole %post thing only when updating for the first time...
exit 0
fi
echo "--> Disabling SELinux..."
sed -e s/^SELINUX=.*$/SELINUX=disabled/ </etc/selinux/config >/etc/selinux/config.processed
mv /etc/selinux/config.processed /etc/selinux/config

View File

@ -73,6 +73,11 @@ cp /etc/qubes_eventd_serial /etc/event.d/serial
%post
if [ "$1" != 1 ] ; then
# do this whole %post thing only when updating for the first time...
exit 0
fi
sed 's/^net.ipv4.ip_forward.*/net.ipv4.ip_forward = 1/' -i /etc/sysctl.conf
usermod -L root
usermod -L user
@ -80,11 +85,6 @@ if ! [ -f /var/lib/qubes/serial.orig ] ; then
cp /etc/event.d/serial /var/lib/qubes/serial.orig
fi
if [ "$1" != 1 ] ; then
# do this whole %post thing only when updating for the first time...
exit 0
fi
echo "--> Disabling SELinux..."
sed -e s/^SELINUX=.*$/SELINUX=disabled/ </etc/selinux/config >/etc/selinux/config.processed
mv /etc/selinux/config.processed /etc/selinux/config