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:
parent
46f206bb1a
commit
ed4fbda53e
@ -80,17 +80,17 @@ cp /etc/qubes_eventd_serial /etc/event.d/serial
|
|||||||
|
|
||||||
%post
|
%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 root
|
||||||
usermod -L user
|
usermod -L user
|
||||||
if ! [ -f /var/lib/qubes/serial.orig ] ; then
|
if ! [ -f /var/lib/qubes/serial.orig ] ; then
|
||||||
cp /etc/event.d/serial /var/lib/qubes/serial.orig
|
cp /etc/event.d/serial /var/lib/qubes/serial.orig
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$1" != 1 ] ; then
|
|
||||||
# do this whole %post thing only when updating for the first time...
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "--> Disabling SELinux..."
|
echo "--> Disabling SELinux..."
|
||||||
sed -e s/^SELINUX=.*$/SELINUX=disabled/ </etc/selinux/config >/etc/selinux/config.processed
|
sed -e s/^SELINUX=.*$/SELINUX=disabled/ </etc/selinux/config >/etc/selinux/config.processed
|
||||||
mv /etc/selinux/config.processed /etc/selinux/config
|
mv /etc/selinux/config.processed /etc/selinux/config
|
||||||
|
@ -73,6 +73,11 @@ cp /etc/qubes_eventd_serial /etc/event.d/serial
|
|||||||
|
|
||||||
%post
|
%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
|
sed 's/^net.ipv4.ip_forward.*/net.ipv4.ip_forward = 1/' -i /etc/sysctl.conf
|
||||||
usermod -L root
|
usermod -L root
|
||||||
usermod -L user
|
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
|
cp /etc/event.d/serial /var/lib/qubes/serial.orig
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$1" != 1 ] ; then
|
|
||||||
# do this whole %post thing only when updating for the first time...
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "--> Disabling SELinux..."
|
echo "--> Disabling SELinux..."
|
||||||
sed -e s/^SELINUX=.*$/SELINUX=disabled/ </etc/selinux/config >/etc/selinux/config.processed
|
sed -e s/^SELINUX=.*$/SELINUX=disabled/ </etc/selinux/config >/etc/selinux/config.processed
|
||||||
mv /etc/selinux/config.processed /etc/selinux/config
|
mv /etc/selinux/config.processed /etc/selinux/config
|
||||||
|
Loading…
Reference in New Issue
Block a user