Merge branch 'master' of git.qubes-os.org:/var/lib/qubes/git/marmarek/core

This commit is contained in:
Joanna Rutkowska 2012-01-30 15:39:28 +01:00
commit d2b67d16e5
9 changed files with 29 additions and 3 deletions

View File

@ -0,0 +1,10 @@
#!/bin/sh
if [ -d /etc/NetworkManager/system-connections ]; then
mkdir -p /rw/config/NM-system-connections
mv /etc/NetworkManager/system-connections/* /rw/config/NM-system-connections/ 2> /dev/null || true
rmdir /etc/NetworkManager/system-connections
ln -s /rw/config/NM-system-connections /etc/NetworkManager/system-connections
fi
exit 0

View File

@ -4,6 +4,9 @@ VIFMAC=mac:fe:ff:ff:ff:ff:ff
if ! grep -q ^plugins.*keyfile $FILE ; then
sed -i 's/^plugins.*$/&,keyfile/' $FILE
fi
if grep -q ^plugins.*ifcfg-rh $FILE ; then
sed -i 's/^plugins=\(.*\)ifcfg-rh,\(.*\)$/plugins=\1\2/' $FILE
fi
if ! grep -q '^\[keyfile\]$' $FILE ; then
echo '[keyfile]' >> $FILE
fi

View File

@ -14,7 +14,7 @@ source /var/run/qubes/qubes_ns
if [ "X"$NS1 = "X" ] ; then exit ; fi
iptables -t nat -F PR-QBS
FIRSTONE=yes
grep ^nameserver /etc/resolv.conf | head -2 |
grep ^nameserver /etc/resolv.conf | grep -v ":.*:" | head -2 |
(
while read x y z ; do
addrule "$y"

View File

@ -119,6 +119,7 @@ install network/qubes_network.rules $RPM_BUILD_ROOT/etc/udev/rules.d/99-qubes_ne
install network/qubes_setup_dnat_to_ns $RPM_BUILD_ROOT/usr/lib/qubes
install network/qubes_fix_nm_conf.sh $RPM_BUILD_ROOT/usr/lib/qubes
install network/setup_ip $RPM_BUILD_ROOT/usr/lib/qubes/
install network/network-manager-prepare-conf-dir $RPM_BUILD_ROOT/usr/lib/qubes/
install -d $RPM_BUILD_ROOT/etc/dhclient.d
ln -s /usr/lib/qubes/qubes_setup_dnat_to_ns $RPM_BUILD_ROOT/etc/dhclient.d/qubes_setup_dnat_to_ns.sh
install -d $RPM_BUILD_ROOT/etc/NetworkManager/dispatcher.d/
@ -240,7 +241,7 @@ if [ "$1" != 1 ] ; then
exit 0
fi
if ! [ -f /var/lib/qubes/serial.orig ] ; then
if [ -e /etc/init/serial.conf ] && ! [ -f /var/lib/qubes/serial.orig ] ; then
cp /etc/init/serial.conf /var/lib/qubes/serial.orig
fi
@ -342,6 +343,7 @@ rm -rf $RPM_BUILD_ROOT
/usr/lib/qubes/block_cleanup
/usr/lib/qubes/block_remove
/usr/lib/qubes/meminfo-writer
/usr/lib/qubes/network-manager-prepare-conf-dir
/usr/lib/qubes/qfile-agent
/usr/lib/qubes/qfile-unpacker
/usr/lib/qubes/qopen-in-vm

View File

@ -15,6 +15,7 @@ start()
type=$(/usr/bin/xenstore-read qubes_vm_type)
if [ "$type" == "NetVM" ]; then
/usr/lib/qubes/network-manager-prepare-conf-dir
/sbin/service NetworkManager start
fi

View File

@ -1,3 +1,8 @@
.include /lib/systemd/system/NetworkManager.service
[Unit]
ConditionPathExists=/var/run/qubes-service/network-manager
# For /rw
After=qubes-misc-post.service
[Service]
ExecStartPre=/usr/lib/qubes/network-manager-prepare-conf-dir

View File

@ -11,4 +11,5 @@ if [ "x$network" != "x" ]; then
echo "NS2=$secondary_dns" >> /var/run/qubes/qubes_ns
/usr/lib/qubes/qubes_setup_dnat_to_ns
echo "1" > /proc/sys/net/ipv4/ip_forward
/sbin/ethtool -K eth0 sg off
fi

View File

@ -7,7 +7,6 @@ Before=network.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStartPre=/sbin/ethtool -K eth0 sg off
ExecStart=/usr/lib/qubes/init/network-proxy-setup.sh
StandardOutput=syslog

View File

@ -13,6 +13,11 @@ read_service() {
$XS_READ qubes-service/$1 2> /dev/null
}
# Wait for evtchn initialization
while [ ! -e /proc/xen/xenbus ]; do
sleep 0.1
done
mkdir -p /var/run/qubes
mkdir -p /var/run/qubes-service
mkdir -p /var/run/xen-hotplug