diff --git a/common/qubes_fix_nm_conf.sh b/common/qubes_fix_nm_conf.sh index 5a6bb30..613fa15 100755 --- a/common/qubes_fix_nm_conf.sh +++ b/common/qubes_fix_nm_conf.sh @@ -3,6 +3,8 @@ FILE=/etc/NetworkManager/NetworkManager.conf 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 '^\[keyfile\]$' $FILE ; then echo '[keyfile]' >> $FILE fi if ! grep -q ^unmanaged-devices $FILE ; then diff --git a/proxyvm/bin/qubes_netwatcher b/proxyvm/bin/qubes_netwatcher index 8f9d2e9..a256807 100755 --- a/proxyvm/bin/qubes_netwatcher +++ b/proxyvm/bin/qubes_netwatcher @@ -18,6 +18,7 @@ while true; do /sbin/service qubes_firewall stop /sbin/service qubes_firewall start CURR_NETCFG="$NETCFG" + /usr/bin/xenstore-write qubes_netvm_external_ip "$CURR_NETCFG" fi /usr/bin/xenstore-watch /local/domain/$NET_DOMID/qubes_netvm_external_ip diff --git a/rpm_spec/core-netvm.spec b/rpm_spec/core-netvm.spec index b4f1eb3..9ab815f 100644 --- a/rpm_spec/core-netvm.spec +++ b/rpm_spec/core-netvm.spec @@ -68,6 +68,12 @@ cp ../common/vif-route-qubes $RPM_BUILD_ROOT/etc/xen/scripts %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 chkconfig --add qubes_core_netvm || echo "WARNING: Cannot add service qubes_core!"