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
333fee545a
commit
ee7756b960
@ -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
|
||||
|
@ -96,16 +96,13 @@ mkdir -p $RPM_BUILD_ROOT/etc/sysconfig
|
||||
cp init.d/iptables $RPM_BUILD_ROOT/etc/sysconfig
|
||||
%post
|
||||
|
||||
chkconfig iptables on
|
||||
chkconfig NetworkManager on
|
||||
sed 's/^net.ipv4.ip_forward.*/net.ipv4.ip_forward = 1/' -i /etc/sysctl.conf
|
||||
|
||||
if [ "$1" != 1 ] ; then
|
||||
# do this whole %post thing only when updating for the first time...
|
||||
exit 0
|
||||
fi
|
||||
|
||||
#echo "Enabling essential services..."
|
||||
chkconfig iptables on
|
||||
chkconfig NetworkManager on
|
||||
chkconfig rsyslog on
|
||||
chkconfig haldaemon on
|
||||
chkconfig messagebus on
|
||||
@ -113,6 +110,8 @@ chkconfig xenstored on
|
||||
chkconfig xend on
|
||||
chkconfig xenconsoled on
|
||||
|
||||
sed 's/^net.ipv4.ip_forward.*/net.ipv4.ip_forward = 1/' -i /etc/sysctl.conf
|
||||
|
||||
chkconfig --add qubes_core || echo "WARNING: Cannot add service qubes_core!"
|
||||
chkconfig --add qubes_netvm || echo "WARNING: Cannot add service qubes_netvm!"
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user