rpm specs: %post cleanup

Moved some stuff from the begging of %post sections after the
'if installing-for-the-first-time' check.
このコミットが含まれているのは:
Joanna Rutkowska 2010-06-14 23:52:21 +02:00
コミット ed4fbda53e
2個のファイルの変更10行の追加10行の削除

ファイルの表示

@ -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

ファイルの表示

@ -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