Start xend and xenstored during package installation
This commit is contained in:
parent
026a109d1f
commit
167c30aa6e
@ -29,15 +29,16 @@
|
|||||||
|
|
||||||
Name: qubes-core-dom0
|
Name: qubes-core-dom0
|
||||||
Version: %{version}
|
Version: %{version}
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: The Qubes core files (Dom0-side)
|
Summary: The Qubes core files (Dom0-side)
|
||||||
|
|
||||||
Group: Qubes
|
Group: Qubes
|
||||||
Vendor: Invisible Things Lab
|
Vendor: Invisible Things Lab
|
||||||
License: GPL
|
License: GPL
|
||||||
URL: http://www.qubes-os.org
|
URL: http://www.qubes-os.org
|
||||||
|
BuildRequires: xen-devel
|
||||||
Requires: python, xen-runtime, pciutils, python-inotify, python-daemon, kernel-qubes-dom0
|
Requires: python, xen-runtime, pciutils, python-inotify, python-daemon, kernel-qubes-dom0
|
||||||
Conflicts: qubes-gui-dom0 < 1.1.13
|
Conflicts: qubes-gui-dom0 < 1.1.13
|
||||||
Requires: NetworkManager >= 0.8.1-1
|
Requires: NetworkManager >= 0.8.1-1
|
||||||
%define _builddir %(pwd)/dom0
|
%define _builddir %(pwd)/dom0
|
||||||
|
|
||||||
@ -126,10 +127,16 @@ mkdir -p $RPM_BUILD_ROOT/var/run/qubes
|
|||||||
|
|
||||||
%post
|
%post
|
||||||
|
|
||||||
|
# Create NetworkManager configuration if we do not have it
|
||||||
|
if ! [ -e /etc/NetworkManager/NetworkManager.conf ]; then
|
||||||
|
echo '[main]' > /etc/NetworkManager/NetworkManager.conf
|
||||||
|
echo 'plugins = keyfile' >> /etc/NetworkManager/NetworkManager.conf
|
||||||
|
echo '[keyfile]' >> /etc/NetworkManager/NetworkManager.conf
|
||||||
|
fi
|
||||||
/usr/lib/qubes/qubes_fix_nm_conf.sh
|
/usr/lib/qubes/qubes_fix_nm_conf.sh
|
||||||
|
|
||||||
if [ -e /etc/yum.repos.d/qubes-r1-dom0.repo ]; then
|
if [ -e /etc/yum.repos.d/qubes-r1-dom0.repo ]; then
|
||||||
# we want the user to use the repo that comes with qubes-code-dom0 packages instead
|
# we want the user to use the repo that comes with qubes-core-dom0 packages instead
|
||||||
rm -f /etc/yum.repos.d/qubes-r1-dom0.repo
|
rm -f /etc/yum.repos.d/qubes-r1-dom0.repo
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -138,15 +145,16 @@ fi
|
|||||||
#exit 0
|
#exit 0
|
||||||
#fi
|
#fi
|
||||||
|
|
||||||
# TODO: This is only temporary, until we will have our own installer
|
## TODO: This is only temporary, until we will have our own installer
|
||||||
for f in /etc/init.d/*
|
#for f in /etc/init.d/*
|
||||||
do
|
#do
|
||||||
srv=`basename $f`
|
# srv=`basename $f`
|
||||||
[ $srv = 'functions' ] && continue
|
# [ $srv = 'functions' ] && continue
|
||||||
[ $srv = 'killall' ] && continue
|
# [ $srv = 'killall' ] && continue
|
||||||
[ $srv = 'halt' ] && continue
|
# [ $srv = 'halt' ] && continue
|
||||||
chkconfig $srv off
|
# [ $srv = 'single' ] && continue
|
||||||
done
|
# chkconfig $srv off
|
||||||
|
#done
|
||||||
|
|
||||||
chkconfig iptables on
|
chkconfig iptables on
|
||||||
chkconfig NetworkManager on
|
chkconfig NetworkManager on
|
||||||
@ -167,6 +175,20 @@ chkconfig qubes_core on || echo "WARNING: Cannot enable service qubes_core!"
|
|||||||
chkconfig qubes_netvm on || echo "WARNING: Cannot enable service qubes_netvm!"
|
chkconfig qubes_netvm on || echo "WARNING: Cannot enable service qubes_netvm!"
|
||||||
chkconfig qubes_setupdvm on || echo "WARNING: Cannot enable service qubes_setupdvm!"
|
chkconfig qubes_setupdvm on || echo "WARNING: Cannot enable service qubes_setupdvm!"
|
||||||
|
|
||||||
|
HAD_SYSCONFIG_NETWORK=yes
|
||||||
|
if ! [ -e /etc/sysconfig/network ]; then
|
||||||
|
HAD_SYSCONFIG_NETWORK=no
|
||||||
|
# supplant empty one so NetworkManager init script does not complain
|
||||||
|
touch /etc/sysconfig/network
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Load evtchn module - xenstored needs it
|
||||||
|
modprobe evtchn
|
||||||
|
|
||||||
|
# Now launch xend - we will need it for subsequent steps
|
||||||
|
service xenstored start
|
||||||
|
service xend start
|
||||||
|
|
||||||
if ! [ -e /var/lib/qubes/qubes.xml ]; then
|
if ! [ -e /var/lib/qubes/qubes.xml ]; then
|
||||||
# echo "Initializing Qubes DB..."
|
# echo "Initializing Qubes DB..."
|
||||||
umask 007; sg qubes -c qvm-init-storage
|
umask 007; sg qubes -c qvm-init-storage
|
||||||
@ -175,13 +197,16 @@ for i in /usr/share/qubes/icons/*.png ; do
|
|||||||
xdg-icon-resource install --novendor --size 48 $i
|
xdg-icon-resource install --novendor --size 48 $i
|
||||||
done
|
done
|
||||||
|
|
||||||
/etc/init.d/qubes_core start
|
service qubes_core start
|
||||||
|
|
||||||
NETVM=$(qvm-get-default-netvm)
|
NETVM=$(qvm-get-default-netvm)
|
||||||
if [ "X"$NETVM = "X""dom0" ] ; then
|
if [ "X"$NETVM = "X""dom0" ] ; then
|
||||||
/etc/init.d/qubes_netvm start
|
service qubes_netvm start
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "x"$HAD_SYSCONFIG_NETWORK = "xno" ]; then
|
||||||
|
rm -f /etc/sysconfig/network
|
||||||
|
fi
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
Loading…
Reference in New Issue
Block a user